Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*jadclipse*/// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
- // Jad home page: http://www.geocities.com/kpdus/jad.html
- // Decompiler options: packimports(3) radix(10) lradix(10)
- package com.android.hiddenmenu;
- import android.app.Activity;
- import android.app.Dialog;
- import android.content.DialogInterface;
- import android.content.res.Resources;
- import android.net.ConnectivityManager;
- import android.os.*;
- import android.util.Log;
- import android.view.View;
- import android.widget.RadioButton;
- import com.android.internal.telephony.Phone;
- import com.android.internal.telephony.PhoneFactory;
- import java.io.*;
- public class DUN extends Activity
- implements android.view.View.OnClickListener
- {
- public DUN()
- {
- byte abyte0[] = new byte[2];
- abyte0[0] = 49;
- abyte0[1] = 0;
- DUN_ON = abyte0;
- byte abyte1[] = new byte[2];
- abyte1[0] = 50;
- abyte1[1] = 0;
- DUN_OFF = abyte1;
- byte abyte2[] = new byte[3];
- abyte2[0] = 48;
- abyte2[1] = 49;
- abyte2[2] = 0;
- MSM_AP = abyte2;
- byte abyte3[] = new byte[4];
- abyte3[0] = 80;
- abyte3[1] = 68;
- abyte3[2] = 65;
- abyte3[3] = 0;
- MSM_CP = abyte3;
- byte abyte4[] = new byte[6];
- abyte4[0] = 77;
- abyte4[1] = 79;
- abyte4[2] = 68;
- abyte4[3] = 69;
- abyte4[4] = 77;
- abyte4[5] = 0;
- MDM = abyte4;
- cm = null;
- mPhone = null;
- IPC_USB_DUN = 2;
- IPC_BROWSER_CALL = 1;
- phone = null;
- mHandler = new Handler() {
- public void handleMessage(Message message)
- {
- message.what;
- JVM INSTR tableswitch 1999 1999: default 24
- // 1999 25;
- goto _L1 _L2
- _L1:
- return;
- _L2:
- Log.i("DUN", "Verify response incoming!!");
- AsyncResult asyncresult = (AsyncResult)message.obj;
- if(asyncresult.exception != null)
- Log.i("DUN", "AsyncResult Exception Occur!!!");
- else
- if(asyncresult.result == null)
- Log.i("DUN", "ar.result == NULL! - No answer");
- else
- finish();
- if(true) goto _L1; else goto _L3
- _L3:
- }
- final DUN this$0;
- {
- this$0 = DUN.this;
- super();
- }
- };
- radio_listener = new android.view.View.OnClickListener() {
- public void onClick(View view)
- {
- (RadioButton)view;
- view.getId();
- JVM INSTR tableswitch 2131165193 2131165194: default 32
- // 2131165193 33
- // 2131165194 61;
- goto _L1 _L2 _L3
- _L1:
- return;
- _L2:
- Log.i("OnClickListener", "DUN ON");
- saveDUNStatus(true);
- showDialog(101);
- continue; /* Loop/switch isn't completed */
- _L3:
- setDataDunEnabled(false);
- saveDUNStatus(false);
- sendOemData(IPC_BROWSER_CALL);
- finish();
- if(true) goto _L1; else goto _L4
- _L4:
- }
- final DUN this$0;
- {
- this$0 = DUN.this;
- super();
- }
- };
- }
- private void changeUsb(String s)
- throws IOException
- {
- if(s.equals("MSM"))
- setUSBSwitching((byte)32);
- else
- if(s.equals("MDM"))
- setUSBSwitching((byte)16);
- break MISSING_BLOCK_LABEL_47;
- Exception exception1;
- exception1;
- exception1.printStackTrace();
- break MISSING_BLOCK_LABEL_47;
- Exception exception;
- exception;
- throw exception;
- }
- private boolean isDUNEnable()
- {
- byte abyte0[];
- String s;
- abyte0 = new byte[100];
- s = new String("MODEM");
- s.trim();
- if(cm.getMobileDataEnabled()) goto _L2; else goto _L1
- _L1:
- FileInputStream fileinputstream = new FileInputStream(new File("/sys/devices/tuna_otg/usb_sel"));
- String s1;
- fileinputstream.read(abyte0);
- s1 = new String(abyte0);
- int i;
- s1.trim();
- i = s1.indexOf(s);
- if(i == -1) goto _L2; else goto _L3
- _L3:
- boolean flag = true;
- _L4:
- return flag;
- Exception exception;
- exception;
- _L5:
- Log.i("DUN", (new StringBuilder()).append("isDUNEnable Exception : ").append(exception).toString());
- _L2:
- flag = false;
- goto _L4
- exception;
- goto _L5
- exception;
- goto _L5
- }
- private void saveDUNStatus(boolean flag)
- {
- FileOutputStream fileoutputstream = null;
- FileOutputStream fileoutputstream1 = new FileOutputStream("/sdcard/cfg_dun_status");
- if(!flag) goto _L2; else goto _L1
- _L1:
- fileoutputstream1.write(DUN_ON);
- _L4:
- if(fileoutputstream1 == null)
- break MISSING_BLOCK_LABEL_33;
- fileoutputstream1.close();
- _L5:
- return;
- _L2:
- if(flag) goto _L4; else goto _L3
- _L3:
- fileoutputstream1.write(DUN_OFF);
- goto _L4
- Exception exception2;
- exception2;
- fileoutputstream = fileoutputstream1;
- _L8:
- Log.i("DUN", (new StringBuilder()).append("Not Save DUNStatus Exeption : ").append(exception2).toString());
- if(fileoutputstream != null)
- try
- {
- fileoutputstream.close();
- }
- catch(Exception exception3)
- {
- Log.e("DUN", (new StringBuilder()).append("DUN Param Close Fail : ").append(exception3).toString());
- }
- goto _L5
- Exception exception4;
- exception4;
- Log.e("DUN", (new StringBuilder()).append("DUN Param Close Fail : ").append(exception4).toString());
- goto _L5
- Exception exception;
- exception;
- _L7:
- if(fileoutputstream != null)
- try
- {
- fileoutputstream.close();
- }
- catch(Exception exception1)
- {
- Log.e("DUN", (new StringBuilder()).append("DUN Param Close Fail : ").append(exception1).toString());
- }
- throw exception;
- exception;
- fileoutputstream = fileoutputstream1;
- if(true) goto _L7; else goto _L6
- _L6:
- exception2;
- goto _L8
- }
- private void sendOemData(byte byte0)
- {
- ByteArrayOutputStream bytearrayoutputstream;
- DataOutputStream dataoutputstream;
- bytearrayoutputstream = new ByteArrayOutputStream();
- dataoutputstream = new DataOutputStream(bytearrayoutputstream);
- mPhone = PhoneFactory.getDefaultPhone();
- dataoutputstream.writeByte(81);
- dataoutputstream.writeByte(21);
- dataoutputstream.writeShort(5);
- dataoutputstream.writeByte(byte0);
- mPhone.invokeOemRilRequestRaw(bytearrayoutputstream.toByteArray(), null);
- _L2:
- return;
- IOException ioexception;
- ioexception;
- if(true) goto _L2; else goto _L1
- _L1:
- }
- private void setChecked(boolean flag)
- {
- if(flag) goto _L2; else goto _L1
- _L1:
- DUN_Off.setChecked(true);
- DUN_On.setChecked(false);
- _L4:
- return;
- _L2:
- if(flag)
- {
- DUN_Off.setChecked(false);
- DUN_On.setChecked(true);
- }
- if(true) goto _L4; else goto _L3
- _L3:
- }
- private void setDataDunEnabled(boolean flag)
- {
- if(!flag)
- break MISSING_BLOCK_LABEL_45;
- cm.setMobileDataEnabled(false);
- changeUsb("MDM");
- setChecked(false);
- Log.i("OnClickListener", "DUN OFF");
- _L1:
- return;
- IOException ioexception1;
- ioexception1;
- ioexception1.printStackTrace();
- goto _L1
- try
- {
- cm.setMobileDataEnabled(true);
- changeUsb("MSM");
- setChecked(false);
- Log.i("OnClickListener", "DUN OFF");
- }
- catch(IOException ioexception)
- {
- ioexception.printStackTrace();
- }
- goto _L1
- }
- private void setUSBSwitching(byte byte0)
- {
- ByteArrayOutputStream bytearrayoutputstream;
- DataOutputStream dataoutputstream;
- Log.d("DUN", (new StringBuilder()).append("setUSBSwitching ").append(byte0).toString());
- phone = PhoneFactory.getDefaultPhone();
- bytearrayoutputstream = new ByteArrayOutputStream();
- dataoutputstream = new DataOutputStream(bytearrayoutputstream);
- dataoutputstream.writeByte(117);
- dataoutputstream.writeByte(19);
- dataoutputstream.writeShort(5);
- dataoutputstream.writeByte(byte0);
- phone.invokeOemRilRequestRaw(bytearrayoutputstream.toByteArray(), null);
- _L2:
- return;
- IOException ioexception;
- ioexception;
- Log.i("DUN", " failed to write");
- if(true) goto _L2; else goto _L1
- _L1:
- }
- public void onClick(View view)
- {
- view.getId();
- JVM INSTR tableswitch 2131165190 2131165190: default 24
- // 2131165190 25;
- goto _L1 _L2
- _L1:
- return;
- _L2:
- Log.i("DUN", "cancel Button");
- finish();
- if(true) goto _L1; else goto _L3
- _L3:
- }
- public void onCreate(Bundle bundle)
- {
- super.onCreate(bundle);
- setContentView(2130903044);
- cm = (ConnectivityManager)getSystemService("connectivity");
- DUN_On = (RadioButton)findViewById(2131165193);
- DUN_Off = (RadioButton)findViewById(2131165194);
- View view = findViewById(2131165190);
- DUN_On.setOnClickListener(radio_listener);
- DUN_Off.setOnClickListener(radio_listener);
- view.setOnClickListener(this);
- setChecked(isDUNEnable());
- }
- protected Dialog onCreateDialog(int i)
- {
- i;
- JVM INSTR tableswitch 101 101: default 20
- // 101 24;
- goto _L1 _L2
- _L1:
- Object obj = null;
- _L4:
- return ((Dialog) (obj));
- _L2:
- obj = (new android.app.AlertDialog.Builder(this)).setMessage(getResources().getString(2131034245)).setTitle(17039380).setIcon(17301543).setPositiveButton(17039379, new android.content.DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialoginterface, int j)
- {
- setDataDunEnabled(true);
- sendOemData(IPC_USB_DUN);
- finish();
- }
- final DUN this$0;
- {
- this$0 = DUN.this;
- super();
- }
- }).setNegativeButton(17039369, new android.content.DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialoginterface, int j)
- {
- setDataDunEnabled(false);
- }
- final DUN this$0;
- {
- this$0 = DUN.this;
- super();
- }
- }).create();
- if(true) goto _L4; else goto _L3
- _L3:
- }
- protected void onResume()
- {
- super.onResume();
- setChecked(isDUNEnable());
- }
- private static final int DIALOG = 101;
- private static final int GET_DATA_DONE = 1998;
- private static final String LOG_TAG = "DUN";
- static final int OEM_FUNCTION_ID_MISC = 117;
- static final int OEM_HIDDEN_DUN_MODE = 21;
- static final int OEM_MAIN_CMD_HIDDEN = 81;
- private static final byte USB_PARAM_MODEM = 16;
- private static final byte USB_PARAM_PDA = 32;
- private static final int VERIFY_DATA_DONE = 1999;
- private final byte DUN_OFF[];
- private final byte DUN_ON[];
- private RadioButton DUN_Off;
- private RadioButton DUN_On;
- private byte IPC_BROWSER_CALL;
- private byte IPC_USB_DUN;
- private final byte MDM[];
- private final byte MSM_AP[];
- private final byte MSM_CP[];
- private final String PARAM_DUN_STATUS = "/sdcard/cfg_dun_status";
- private final String USB_PATH = "/sys/devices/tuna_otg/usb_sel";
- ConnectivityManager cm;
- private Handler mHandler;
- private Phone mPhone;
- private Phone phone;
- android.view.View.OnClickListener radio_listener;
- }
- /*
- DECOMPILATION REPORT
- Decompiled from: /home/bigrushdog/dex2jar_apks/toroplus_cdma/HiddenMenu-dex2jar.jar
- Total time: 18 ms
- Jad reported messages/errors:
- The class file version is 50.0 (only 45.3, 46.0 and 47.0 are supported)
- The class file version is 50.0 (only 45.3, 46.0 and 47.0 are supported)
- The class file version is 50.0 (only 45.3, 46.0 and 47.0 are supported)
- The class file version is 50.0 (only 45.3, 46.0 and 47.0 are supported)
- The class file version is 50.0 (only 45.3, 46.0 and 47.0 are supported)
- Couldn't fully decompile method handleMessage
- Couldn't fully decompile method onClick
- Couldn't fully decompile method changeUsb
- Couldn't resolve all exception handlers in method changeUsb
- Couldn't fully decompile method isDUNEnable
- Couldn't resolve all exception handlers in method isDUNEnable
- Couldn't fully decompile method saveDUNStatus
- Couldn't resolve all exception handlers in method saveDUNStatus
- Couldn't fully decompile method sendOemData
- Couldn't resolve all exception handlers in method sendOemData
- Couldn't fully decompile method setChecked
- Couldn't fully decompile method setDataDunEnabled
- Couldn't resolve all exception handlers in method setDataDunEnabled
- Couldn't fully decompile method setUSBSwitching
- Couldn't resolve all exception handlers in method setUSBSwitching
- Couldn't fully decompile method onClick
- Couldn't fully decompile method onCreateDialog
- Exit status: 0
- Caught exceptions:
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement