List of usage examples for android.content ComponentName ComponentName
private ComponentName(String pkg, Parcel in)
From source file:edu.mit.viral.shen.DroidFish.java
private final void selectScidFile() { Intent intent = new Intent(); intent.setComponent(new ComponentName("org.scid.android", "org.scid.android.SelectFileActivity")); intent.setAction(".si4"); try {//from ww w . ja v a 2 s. c o m startActivityForResult(intent, RESULT_SELECT_SCID); } catch (ActivityNotFoundException e) { Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show(); } }
From source file:com.cognizant.trumobi.PersonaLauncher.java
/** * ADW: Home binding actions/* w w w. j ava 2 s . c om*/ */ public void fireHomeBinding(int bindingValue, int type) { // ADW: switch home button binding user selection if (mIsEditMode || mIsWidgetEditMode) return; switch (bindingValue) { case BIND_DEFAULT: dismissPreviews(); if (!mWorkspace.isDefaultScreenShowing()) { mWorkspace.moveToDefaultScreen(); } break; case BIND_HOME_PREVIEWS: if (!mWorkspace.isDefaultScreenShowing()) { dismissPreviews(); mWorkspace.moveToDefaultScreen(); } else { if (!showingPreviews) { showPreviews(mHandleView, 0, mWorkspace.mHomeScreens); } else { dismissPreviews(); } } break; case BIND_PREVIEWS: if (!showingPreviews) { showPreviews(mHandleView, 0, mWorkspace.mHomeScreens); } else { dismissPreviews(); } break; case BIND_APPS: dismissPreviews(); if (isAllAppsVisible()) { mRAB.setVisibility(View.VISIBLE); mLAB.setVisibility(View.VISIBLE); mHandleView.updateIcon(); closeDrawer(); } else { showAllApps(true, null); } break; case BIND_STATUSBAR: WindowManager.LayoutParams attrs = getWindow().getAttributes(); /* * if((attrs.flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) == * WindowManager.LayoutParams.FLAG_FULLSCREEN){ //go non-full screen * fullScreen(false); }else{ //go full screen fullScreen(true); } */ // 290778 commented for Non full screen mode fullScreen(false); break; case BIND_NOTIFICATIONS: dismissPreviews(); showNotifications(); break; case BIND_HOME_NOTIFICATIONS: if (!mWorkspace.isDefaultScreenShowing()) { dismissPreviews(); mWorkspace.moveToDefaultScreen(); } else { dismissPreviews(); showNotifications(); } break; case BIND_DOCKBAR: dismissPreviews(); if (showDockBar) { if (mDockBar.isOpen()) { mDockBar.close(); } else { mDockBar.open(); } } break; case BIND_APP_LAUNCHER: // Launch or bring to front selected app // Get PackageName and ClassName of selected App String package_name = ""; String name = ""; switch (type) { case 1: package_name = PersonaAlmostNexusSettingsHelper.getHomeBindingAppToLaunchPackageName(this); name = PersonaAlmostNexusSettingsHelper.getHomeBindingAppToLaunchName(this); break; case 2: package_name = PersonaAlmostNexusSettingsHelper.getSwipeUpAppToLaunchPackageName(this); name = PersonaAlmostNexusSettingsHelper.getSwipeUpAppToLaunchName(this); break; case 3: package_name = PersonaAlmostNexusSettingsHelper.getSwipeDownAppToLaunchPackageName(this); name = PersonaAlmostNexusSettingsHelper.getSwipeDownAppToLaunchName(this); break; default: break; } // Create Intent to Launch App if (package_name != "" && name != "") { Intent i = new Intent(); i.setAction(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_LAUNCHER); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); i.setComponent(new ComponentName(package_name, name)); try { startActivity(i); } catch (Exception e) { } } break; default: break; } }
From source file:android.app.Activity.java
/** * Obtain an {@link Intent} that will launch an explicit target activity specified by * this activity's logical parent. The logical parent is named in the application's manifest * by the {@link android.R.attr#parentActivityName parentActivityName} attribute. * Activity subclasses may override this method to modify the Intent returned by * super.getParentActivityIntent() or to implement a different mechanism of retrieving * the parent intent entirely./* ww w . j a va 2s . com*/ * * @return a new Intent targeting the defined parent of this activity or null if * there is no valid parent. */ public Intent getParentActivityIntent() { final String parentName = mActivityInfo.parentActivityName; if (TextUtils.isEmpty(parentName)) { return null; } // If the parent itself has no parent, generate a main activity intent. final ComponentName target = new ComponentName(this, parentName); try { final ActivityInfo parentInfo = getPackageManager().getActivityInfo(target, 0); final String parentActivity = parentInfo.parentActivityName; final Intent parentIntent = parentActivity == null ? Intent.makeMainActivity(target) : new Intent().setComponent(target); return parentIntent; } catch (NameNotFoundException e) { Log.e(TAG, "getParentActivityIntent: bad parentActivityName '" + parentName + "' in manifest"); return null; } }
From source file:com.android.vending.billing.InAppBillingService.LACK.listAppsFragment.java
public void connectToLicensing() { mServiceConnL = new ServiceConnection() { public void onServiceConnected(ComponentName paramAnonymousComponentName, IBinder paramAnonymousIBinder) { System.out.println("Licensing service try to connect."); if (listAppsFragment.this.mServiceL == null) { listAppsFragment.this.mServiceL = ILicensingService.Stub.asInterface(paramAnonymousIBinder); }// w w w. ja va2 s . c o m try { listAppsFragment.this.mServiceL.checkLicense(new Random().nextLong(), listAppsFragment.getInstance().getPackageName(), new ILicenseResultListener.Stub() { public void verifyLicense(int paramAnonymous2Int, String paramAnonymous2String1, String paramAnonymous2String2) throws RemoteException { System.out.println(paramAnonymous2Int); listAppsFragment.this.responseCode = paramAnonymous2Int; listAppsFragment.removeDialogLP(11); switch (paramAnonymous2Int) { case 1: case 2: default: listAppsFragment.handler.post(new Runnable() { public void run() { listAppsFragment.this.showMessage(Utils.getText(2131165549), Utils.getText(2131165547)); } }); } for (;;) { System.out.println("" + paramAnonymous2String1); System.out.println(paramAnonymous2String2); listAppsFragment.this.cleanupService(); return; listAppsFragment.handler.post(new Runnable() { public void run() { listAppsFragment.this.showMessage(Utils.getText(2131165549), Utils.getText(2131165548)); } }); continue; if ((paramAnonymous2String1 != null) && (paramAnonymous2String2 != null) && (Utils.checkCoreJarPatch11()) && (Utils.checkCoreJarPatch12())) { listAppsFragment.handler.post(new Runnable() { public void run() { listAppsFragment.this.showMessage(Utils.getText(2131165549), Utils.getText(2131165550)); } }); } else { listAppsFragment.handler.post(new Runnable() { public void run() { listAppsFragment.this.showMessage(Utils.getText(2131165549), Utils.getText(2131165547)); } }); } } } }); return; } catch (RemoteException paramAnonymousComponentName) { paramAnonymousComponentName.printStackTrace(); } } public void onServiceDisconnected(ComponentName paramAnonymousComponentName) { System.out.println("Licensing service disconnected."); listAppsFragment.this.mServiceL = null; listAppsFragment.removeDialogLP(11); } }; if (this.mServiceL == null) { boolean bool1; label311: do { try { Intent localIntent = new Intent(new String( Base64.decode("Y29tLmFuZHJvaWQudmVuZGluZy5saWNlbnNpbmcuSUxpY2Vuc2luZ1NlcnZpY2U="))); localIntent.setPackage("com.android.vending"); localIntent.putExtra("xexe", "lp"); boolean bool4 = false; bool1 = false; boolean bool3 = false; boolean bool2 = bool4; try { if (getPkgMng().queryIntentServices(localIntent, 0).isEmpty()) { continue; } bool2 = bool4; Iterator localIterator = getPkgMng().queryIntentServices(localIntent, 0).iterator(); bool1 = bool3; Object localObject; cleanupService(); } catch (Exception localException1) { try { for (;;) { if (!localIterator.hasNext()) { break label311; } localObject = (ResolveInfo) localIterator.next(); if ((((ResolveInfo) localObject).serviceInfo.packageName == null) || (!((ResolveInfo) localObject).serviceInfo.packageName .equals("com.android.vending"))) { break; } localObject = new ComponentName(((ResolveInfo) localObject).serviceInfo.packageName, ((ResolveInfo) localObject).serviceInfo.name); localIntent = new Intent(); bool2 = bool1; localIntent.setComponent((ComponentName) localObject); bool2 = bool1; localIntent.putExtra("xexe", "lp"); bool2 = bool1; handler.post(new Runnable() { public void run() { listAppsFragment.removeDialogLP(11); listAppsFragment.showDialogLP(11); listAppsFragment.progress2.setCancelable(true); listAppsFragment.progress2.setMessage(Utils.getText(2131165747)); } }); bool2 = bool1; bool1 = getInstance().bindService(localIntent, mServiceConnL, 1); } } catch (Exception localException2) { for (;;) { } } localException1 = localException1; bool1 = bool2; localException1.printStackTrace(); removeDialogLP(11); } removeDialogLP(11); return; } catch (SecurityException localSecurityException) { localSecurityException.printStackTrace(); cleanupService(); return; } catch (Base64DecoderException localBase64DecoderException) { localBase64DecoderException.printStackTrace(); cleanupService(); return; } } while (!bool1); } }
From source file:com.android.vending.billing.InAppBillingService.LACK.listAppsFragment.java
public void runId(int paramInt) { Object localObject2;//from ww w . j a va 2 s . co m boolean bool; switch (paramInt) { case 2131165211: case 2131165387: case 2131165388: default: case 2131165662: case 2131165705: case 2131165707: case 2131165709: case 2131165713: case 2131165711: case 2131165546: case 2131165315: case 2131165561: case 2131165321: case 2131165256: case 2131165263: case 2131165261: case 2131165285: case 2131165286: case 2131165272: case 2131165292: case 2131165287: case 2131165281: case 2131165266: case 2131165267: case 2131165318: case 2131165296: case 2131165323: case 2131165265: case 2131165271: case 2131165269: case 2131165293: case 2131165257: case 2131165366: case 2131165283: case 2131165258: case 2131165284: case 2131165298: case 2131165299: case 2131165297: case 2131165324: case 2131165279: case 2131165278: case 2131165277: case 2131165766: case 2131165769: case 2131165798: case 2131165799: case 2131165291: case 2131165316: case 2131165317: case 2131165367: case 2131165383: case 2131165282: case 2131165386: case 2131165384: case 2131165254: case 2131165389: case 2131165385: case 2131165624: case 2131165413: case 2131165243: case 2131165375: case 2131165753: case 2131165511: case 2131165787: for (;;) { try { if (!menu_open) { break label5209; } hideMenu(); return; } catch (Exception localException1) { Intent localIntent; localException1.printStackTrace(); return; } getConfig().edit().putBoolean("switch_auto_backup_apk", false).commit(); getConfig().edit().putBoolean("switch_auto_backup_apk_only_gp", false).commit(); getConfig().edit().putBoolean("switch_auto_integrate_update", false).commit(); getConfig().edit().putBoolean("switch_auto_move_to_sd", false).commit(); getConfig().edit().putBoolean("switch_auto_move_to_internal", false).commit(); getPkgMng().setComponentEnabledSetting(new ComponentName(getInstance(), LicensingService.class), 2, 1); getPkgMng().setComponentEnabledSetting(new ComponentName(getInstance(), MarketBillingService.class), 1, 1); getPkgMng().setComponentEnabledSetting(new ComponentName(getInstance(), InAppBillingService.class), 1, 1); getPkgMng().setComponentEnabledSetting(new ComponentName(getInstance(), InAppBillingFService.class), 2, 1); Utils.market_billing_services(true); Utils.market_licensing_services(true); localIntent = new Intent(getInstance(), inapp_widget.class); localIntent.setPackage(getInstance().getPackageName()); localIntent.setAction(inapp_widget.ACTION_WIDGET_RECEIVER_Updater); getInstance().sendBroadcast(localIntent); localIntent = new Intent(getInstance(), lvl_widget.class); localIntent.setPackage(getInstance().getPackageName()); localIntent.setAction(lvl_widget.ACTION_WIDGET_RECEIVER_Updater); getInstance().sendBroadcast(localIntent); runWithWait(new Runnable() { public void run() { PackageInfo localPackageInfo = Utils.getPkgInfo("com.android.vending", 0); File localFile; long l1; if (localPackageInfo != null) { localFile = new File( Utils.getPlaceForOdex(localPackageInfo.applicationInfo.sourceDir, false)); l1 = 0L; } try { long l2 = localFile.length(); l1 = l2; } catch (Exception localException2) { for (;;) { } } if ((l1 > 1048576L) || (l1 == 0L)) { return; } listAppsFragment.this.runToMain(new Runnable() { public void run() { listAppsFragment.showDialogLP(11); listAppsFragment.progress2.setCancelable(true); listAppsFragment.progress2.setMessage(Utils.getText(2131165747)); } }); try { new Utils("").cmdRoot(new String[] { listAppsFragment.dalvikruncommand + ".pinfo " + localPackageInfo.applicationInfo.sourceDir + " " + listAppsFragment.toolfilesdir + " " + String.valueOf(localPackageInfo.applicationInfo.uid) + " recovery" }); Utils.market_billing_services(true); Utils.market_licensing_services(true); Utils.kill("com.android.vending"); listAppsFragment.this.runToMain(new Runnable() { public void run() { listAppsFragment.menu_adapt.notifyDataSetChanged(); } }); return; } catch (Exception localException1) { localException1.printStackTrace(); return; } } }); continue; if (getConfig().getBoolean("switch_auto_backup_apk", false)) { getConfig().edit().putBoolean("switch_auto_backup_apk", false).commit(); } else { getConfig().edit().putBoolean("switch_auto_backup_apk", true).commit(); getConfig().edit().putBoolean("switch_auto_backup_apk_only_gp", false).commit(); continue; if (getConfig().getBoolean("switch_auto_backup_apk_only_gp", false)) { getConfig().edit().putBoolean("switch_auto_backup_apk_only_gp", false).commit(); } else { getConfig().edit().putBoolean("switch_auto_backup_apk_only_gp", true).commit(); getConfig().edit().putBoolean("switch_auto_backup_apk", false).commit(); continue; if (getConfig().getBoolean("switch_auto_integrate_update", false)) { getConfig().edit().putBoolean("switch_auto_integrate_update", false).commit(); } else { getConfig().edit().putBoolean("switch_auto_integrate_update", true).commit(); continue; if (getConfig().getBoolean("switch_auto_move_to_sd", false)) { getConfig().edit().putBoolean("switch_auto_move_to_sd", false).commit(); } else { getConfig().edit().putBoolean("switch_auto_move_to_sd", true).commit(); getConfig().edit().putBoolean("switch_auto_move_to_internal", false).commit(); continue; if (getConfig().getBoolean("switch_auto_move_to_internal", false)) { getConfig().edit().putBoolean("switch_auto_move_to_internal", false).commit(); } else { getConfig().edit().putBoolean("switch_auto_move_to_internal", true).commit(); getConfig().edit().putBoolean("switch_auto_move_to_sd", false).commit(); continue; mod_market_check(); continue; removeDialogLP(7); custompatchselector(); if ((adapt.getCount() > 0) && (adapt.getCount() <= 1)) { func = 1; removeDialogLP(15); customselect = (File) adapt.getItem(0); showDialogLP(15); } else { func = 1; showDialogLP(16); continue; removeDialogLP(7); new_method_lvl(); continue; contextlvl(); removeDialogLP(7); showDialogLP(7); continue; removeDialogLP(20); removeDialogLP(7); showDialogAll(20, contextselpatchlvl(true)); continue; removeDialogLP(21); getpermissions(); removeDialogLP(7); showDialogLP(21); continue; contextpermmenu(); showDialogLP(7); continue; removeDialogLP(22); getpermissions(); removeDialogLP(7); showDialogLP(22); continue; Object localObject1 = ""; try { String str1 = getPkgMng().getPackageInfo(pli.pkgName, 0).applicationInfo.sourceDir; localObject1 = str1; } catch (PackageManager.NameNotFoundException localNameNotFoundException1) { for (;;) { localNameNotFoundException1.printStackTrace(); } } catch (Exception localException5) { for (;;) { localException5.printStackTrace(); } showMessage(Utils.getText(2131165748), Utils.getText(2131165649)); } if ((Utils.checkCoreJarPatch20()) || ((pli.system) && (((String) localObject1).startsWith("/system/app")))) { removeDialogLP(25); getpermissions(); removeDialogLP(7); showDialogLP(25); } else { continue; runWithWait(new Runnable() { public void run() { listAppsFragment.removeDialogLP(10); listAppsFragment.this.getpackagesxml(); listAppsFragment.this.contextpermissions(); listAppsFragment.this.runToMain(new Runnable() { public void run() { listAppsFragment.removeDialogLP(7); listAppsFragment.showDialogLP(10); } }); } }); continue; removeDialogLP(17); contextads(); removeDialogLP(7); showDialogLP(7); continue; removeDialogLP(34); removeDialogLP(7); showDialogAll(34, contextsupport(false)); continue; removeDialogLP(17); removeDialogLP(7); showDialogAll(17, contextselpatchads(true)); continue; removeDialogLP(29); getLPActivity(); removeDialogLP(7); showDialogLP(29); continue; removeDialogLP(31); getComponents(); removeDialogLP(7); showDialogLP(31); continue; contextfix(); removeDialogLP(7); showDialogLP(7); continue; removeDialogLP(7); custompatchselector(); if (adapt.getCount() <= 1) { removeDialogLP(15); customselect = (File) adapt.getItem(0); bootadd(pli, "custom"); } else { func = 2; removeDialogLP(16); showDialogLP(16); continue; startActivity(new Intent(getContext(), LivepatchActivity.class)); continue; try { dexopt_app( getPkgMng().getPackageInfo(pli.pkgName, 0).applicationInfo.sourceDir, pli.pkgName, "" + getPkgMng().getPackageInfo(pli.pkgName, 0).applicationInfo.uid); } catch (Exception localException2) { localException2.printStackTrace(); showMessage(Utils.getText(2131165748), Utils.getText(2131165436)); } continue; try { disable_package(pli.pkgName, true); } catch (Exception localException3) { localException3.printStackTrace(); showMessage(Utils.getText(2131165748), Utils.getText(2131165436)); } continue; try { disable_package(pli.pkgName, false); } catch (Exception localException4) { localException4.printStackTrace(); showMessage(Utils.getText(2131165748), Utils.getText(2131165436)); } continue; context_backup_menu(); removeDialogLP(7); showDialogLP(7); continue; backup(pli); continue; context_restore_menu(); removeDialogLP(7); showDialogLP(7); continue; removeDialogLP(7); backupselector(); removeDialogLP(26); showDialogLP(26); continue; backup_data(); continue; restore_data(); continue; bootadd(pli, "custom"); continue; bootadd(pli, "lvl"); continue; bootadd(pli, "ads"); continue; odex(pli); continue; adapterSelectType = 2131165247; selected_apps(); continue; adapterSelectType = 2131165763; selected_apps(); continue; adapterSelectType = 2131165762; selected_apps(); continue; adapterSelectType = 2131165761; selected_apps(); continue; adapterSelectType = 2131165764; selected_apps(); continue; set_internet(false); continue; set_internet(true); continue; adapterSelectType = 2131165765; selected_apps(); continue; deodex(pli); continue; runextendetpatch(pli); continue; contextselpatch(); continue; contextcreateapk(); removeDialogLP(7); showDialogLP(7); continue; context_remove_saved_purchases(); removeDialogLP(7); showDialogLP(7); continue; removeDialogLP(19); removeDialogLP(7); showDialogAll(19, contextselpatchlvl(false)); continue; removeDialogLP(18); removeDialogLP(7); showDialogAll(18, contextselpatchads(false)); continue; removeDialogLP(7); if (!rebuldApk.equals("")) { Utils.showDialogYesNo(new File(rebuldApk).getName(), Utils.getText(2131165378), new DialogInterface.OnClickListener() { public void onClick( DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) { listAppsFragment.this .toolbar_cloneApplication(); } }, null, null); } else { Utils.showDialogYesNo(pli.name, Utils.getText(2131165378), new DialogInterface.OnClickListener() { public void onClick( DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) { listAppsFragment.this.cloneApplication(); } }, null, null); continue; removeDialogLP(35); removeDialogLP(7); showDialogAll(35, contextsupport(true)); continue; removeDialogLP(7); custompatchselector(); if (adapt.getCount() <= 1) { removeDialogLP(15); customselect = (File) adapt.getItem(0); showDialogLP(15); func = 0; } else { func = 0; removeDialogLP(15); removeDialogLP(16); showDialogLP(16); continue; removeDialogLP(10); getpackagesxml(); contextpermissions(); removeDialogLP(7); showDialogLP(10); continue; startActivity( new Intent(getContext(), BinderActivity.class)); continue; removeDialogLP(3); showDialogLP(3); continue; contextCorePatch(); continue; contextXposedPatch(); continue; if (getInstance().getPackageManager() .getComponentEnabledSetting( new ComponentName(getInstance(), LicensingService.class)) == 2) { getPkgMng().setComponentEnabledSetting( new ComponentName(getInstance(), LicensingService.class), 1, 1); showMessage(Utils.getText(2131165748), Utils.getText(2131165544)); } for (;;) { localObject2 = new Intent(getInstance(), lvl_widget.class); ((Intent) localObject2) .setPackage(getInstance().getPackageName()); ((Intent) localObject2).setAction( lvl_widget.ACTION_WIDGET_RECEIVER_Updater); getInstance().sendBroadcast((Intent) localObject2); break; getPkgMng().setComponentEnabledSetting( new ComponentName(getInstance(), LicensingService.class), 2, 1); Utils.market_licensing_services(true); } paramInt = 0; if (!Utils.isXposedEnabled()) { break label5220; } new ArrayList(); localObject2 = null; try { JSONObject localJSONObject = Utils .readXposedParamBoolean(); localObject2 = localJSONObject; } catch (JSONException localJSONException) { for (;;) { localJSONException.printStackTrace(); } showMessage(Utils.getText(2131165748), Utils.getText(2131165792)); } bool = false; if (localObject2 == null) { break label5210; } bool = ((JSONObject) localObject2).optBoolean("patch4", false); break label5210; } } } } } } } } } } } } for (;;) { if ((Utils.checkCoreJarPatch11()) && (Utils.checkCoreJarPatch12())) { if (paramInt != 0) { showDialogLP(11); progress2.setCancelable(true); progress2.setMessage(Utils.getText(2131165747)); runWithWait(new Runnable() { public void run() { PackageInfo localPackageInfo = Utils.getPkgInfo("com.android.vending", 0); File localFile2; File localFile1; long l2; if (localPackageInfo != null) { if (!new File(listAppsFragment.toolfilesdir + "/p.apk").exists()) { listAppsFragment.this.pinfocopy(); } localFile2 = new File( Utils.getPlaceForOdex(localPackageInfo.applicationInfo.sourceDir, false)); localFile1 = Utils.getFileDalvikCache(localPackageInfo.applicationInfo.sourceDir); l2 = 0L; } try { if (localFile2.exists()) { } for (l1 = localFile2.length(); (l1 > 1048576L) || (l1 == 0L); l1 = localFile1.length()) { Utils.kill("com.android.vending"); new Utils("").cmdRoot(new String[] { listAppsFragment.dalvikruncommand + ".pinfo " + localPackageInfo.applicationInfo.sourceDir + " " + listAppsFragment.toolfilesdir + " " + String.valueOf(localPackageInfo.applicationInfo.uid) + " proxy" }); listAppsFragment.getPkgMng().setComponentEnabledSetting(new ComponentName( listAppsFragment.getInstance(), MarketBillingService.class), 2, 1); listAppsFragment.getPkgMng().setComponentEnabledSetting(new ComponentName( listAppsFragment.getInstance(), InAppBillingService.class), 2, 1); listAppsFragment.getPkgMng().setComponentEnabledSetting(new ComponentName( listAppsFragment.getInstance(), MarketBillingService.class), 1, 1); listAppsFragment.getPkgMng().setComponentEnabledSetting(new ComponentName( listAppsFragment.getInstance(), InAppBillingService.class), 1, 1); Utils.market_billing_services(true); Utils.market_licensing_services(true); Utils.kill("com.android.vending"); listAppsFragment.getPkgMng().setComponentEnabledSetting(new ComponentName( listAppsFragment.getInstance(), InAppBillingFService.class), 2, 1); listAppsFragment.this.runToMain(new Runnable() { public void run() { listAppsFragment.menu_adapt.notifyDataSetChanged(); Intent localIntent = new Intent(listAppsFragment.getInstance(), proxyGP_widget.class); localIntent.setPackage(listAppsFragment.getInstance().getPackageName()); localIntent.setAction(proxyGP_widget.ACTION_WIDGET_RECEIVER_Updater); listAppsFragment.getInstance().sendBroadcast(localIntent); } }); return; } } catch (Exception localException3) { for (;;) { long l1 = l2; try { if (localFile1.exists()) { l1 = localFile1.length(); } } catch (Exception localException2) { localException2.printStackTrace(); l1 = l2; } } listAppsFragment.this.runToMain(new Runnable() { public void run() { listAppsFragment.showDialogLP(11); listAppsFragment.progress2.setCancelable(true); listAppsFragment.progress2.setMessage(Utils.getText(2131165747)); } }); try { new Utils("").cmdRoot(new String[] { listAppsFragment.dalvikruncommand + ".pinfo " + localPackageInfo.applicationInfo.sourceDir + " " + listAppsFragment.toolfilesdir + " " + String.valueOf(localPackageInfo.applicationInfo.uid) + " recovery" }); Utils.market_billing_services(true); Utils.market_licensing_services(true); Utils.kill("com.android.vending"); listAppsFragment.this.runToMain(new Runnable() { public void run() { listAppsFragment.menu_adapt.notifyDataSetChanged(); Intent localIntent = new Intent(listAppsFragment.getInstance(), proxyGP_widget.class); localIntent.setPackage(listAppsFragment.getInstance().getPackageName()); localIntent.setAction(proxyGP_widget.ACTION_WIDGET_RECEIVER_Updater); listAppsFragment.getInstance().sendBroadcast(localIntent); } }); return; } catch (Exception localException1) { localException1.printStackTrace(); } } } }); break; } break; } if (((!Utils.checkCoreJarPatch11()) || (!Utils.checkCoreJarPatch12())) && ((Utils.exists("/system/framework/core.jar.jex")) || (Utils.exists("/system/framework/core-libart.jar.jex")) || (Utils.exists("/system/framework/services.jar.jex")))) { showMessage(Utils.getText(2131165748), Utils.getText(2131165819)); break; } if ((Utils.isBootOatCache()) && (api >= 20)) { Utils.showDialogYesNo(Utils.getText(2131165748), Utils.getText(2131165808), new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) { listAppsFragment.this.runWithWait(new Runnable() { public void run() { if (((Utils.getFileDalvikCache("/system/framework/core.jar") != null) && (!Utils.getCurrentRuntimeValue().equals("ART"))) || ((Utils.isBootOatCache()) && (listAppsFragment.api >= 20))) { listAppsFragment.patchOnlyDalvikCore = true; listAppsFragment.install_market_to_system = true; listAppsFragment.this.corepatch("_patch1"); } } }); } }, null, null); break; } showMessage(Utils.getText(2131165748), Utils.getText(2131165793)); break; if ((getInstance().getPackageManager() .getComponentEnabledSetting(new ComponentName(getInstance(), MarketBillingService.class)) == 2) || (getInstance().getPackageManager().getComponentEnabledSetting( new ComponentName(getInstance(), InAppBillingService.class)) == 2)) { getPkgMng().setComponentEnabledSetting(new ComponentName(getInstance(), MarketBillingService.class), 1, 1); getPkgMng().setComponentEnabledSetting(new ComponentName(getInstance(), InAppBillingService.class), 1, 1); } for (;;) { localObject2 = new Intent(getInstance(), inapp_widget.class); ((Intent) localObject2).setPackage(getInstance().getPackageName()); ((Intent) localObject2).setAction(inapp_widget.ACTION_WIDGET_RECEIVER_Updater); getInstance().sendBroadcast((Intent) localObject2); break; getPkgMng().setComponentEnabledSetting(new ComponentName(getInstance(), MarketBillingService.class), 2, 1); getPkgMng().setComponentEnabledSetting(new ComponentName(getInstance(), InAppBillingService.class), 2, 1); if (getInstance().getPackageManager().getComponentEnabledSetting( new ComponentName(getInstance(), InAppBillingFService.class)) == 2) { Utils.market_billing_services(true); } } if (getInstance().getPackageManager().getComponentEnabledSetting( new ComponentName(getInstance(), InAppBillingFService.class)) == 2) { getPkgMng().setComponentEnabledSetting(new ComponentName(getInstance(), InAppBillingFService.class), 1, 1); } for (;;) { localObject2 = new Intent(getInstance(), inapp_widget.class); ((Intent) localObject2).setPackage(getInstance().getPackageName()); ((Intent) localObject2).setAction(inapp_widget.ACTION_WIDGET_RECEIVER_Updater); getInstance().sendBroadcast((Intent) localObject2); break; getPkgMng().setComponentEnabledSetting(new ComponentName(getInstance(), InAppBillingFService.class), 2, 1); Utils.market_billing_services(true); } if (!su) { break; } localObject2 = Utils.getPkgInfo("com.android.vending", 4); int i = 0; if ((localObject2 == null) || (((PackageInfo) localObject2).services == null) || (((PackageInfo) localObject2).services.length == 0)) { break; } paramInt = 0; int j; for (;;) { j = ((PackageInfo) localObject2).services.length; if (paramInt >= j) { break; } try { if (((localObject2.services[paramInt].name.endsWith("InAppBillingService")) || (localObject2.services[paramInt].name.endsWith("MarketBillingService"))) && (getPkgMng().getComponentEnabledSetting(new ComponentName("com.android.vending", localObject2.services[paramInt].name)) != 1)) { showDialogLP(11); progress2.setCancelable(true); progress2.setMessage(Utils.getText(2131165747)); Utils.market_billing_services(true); } if (!localObject2.services[paramInt].name.endsWith("InAppBillingService")) { j = i; if (!localObject2.services[paramInt].name.endsWith("MarketBillingService")) { } } else { j = i; if (getPkgMng().getComponentEnabledSetting(new ComponentName("com.android.vending", localObject2.services[paramInt].name)) == 1) { showDialogLP(11); progress2.setCancelable(true); progress2.setMessage(Utils.getText(2131165747)); Utils.market_billing_services(false); if (i == 0) { showMessage(Utils.getText(2131165748), Utils.getText(2131165543)); } j = 1; } } } catch (Exception localException6) { for (;;) { localException6.printStackTrace(); j = i; } } paramInt += 1; i = j; } if (!su) { break; } localObject2 = Utils.getPkgInfo("com.android.vending", 4); if ((localObject2 == null) || (((PackageInfo) localObject2).services == null) || (((PackageInfo) localObject2).services.length == 0)) { break; } paramInt = 0; for (;;) { i = ((PackageInfo) localObject2).services.length; if (paramInt >= i) { break; } try { if ((localObject2.services[paramInt].name.endsWith("LicensingService")) && (getPkgMng().getComponentEnabledSetting(new ComponentName("com.android.vending", localObject2.services[paramInt].name)) != 1)) { showDialogLP(11); progress2.setCancelable(true); progress2.setMessage(Utils.getText(2131165747)); Utils.market_licensing_services(true); } if ((localObject2.services[paramInt].name.endsWith("LicensingService")) && (getPkgMng().getComponentEnabledSetting(new ComponentName("com.android.vending", localObject2.services[paramInt].name)) == 1)) { showDialogLP(11); progress2.setCancelable(true); progress2.setMessage(Utils.getText(2131165747)); Utils.market_licensing_services(false); showMessage(Utils.getText(2131165748), Utils.getText(2131165545)); } } catch (Exception localException7) { for (;;) { localException7.printStackTrace(); } } paramInt += 1; } remove_all_saved_purchases(); break; proxyGP_install(); break; removeDialogLP(30); showDialogLP(30); break; localObject2 = new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=eu.chainfire.supersu")); ((Intent) localObject2).addFlags(1073741824); startActivity((Intent) localObject2); break; localObject2 = "none"; try { String str2 = getPkgMng().getPackageInfo("eu.chainfire.supersu", 0).applicationInfo.dataDir; localObject2 = str2; new Utils("supersu") .cmdRoot(new String[] { dalvikruncommand + ".reworkSuperSu " + (String) localObject2 }); } catch (Exception localException8) { for (;;) { localException8.printStackTrace(); } localObject2 = new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=stericson.busybox&feature")); ((Intent) localObject2).addFlags(1073741824); startActivity((Intent) localObject2); break; odex_all_system_app(); break; removefixes(); break; cleardalvik(); break; setDefInstall(); break; dialog_reboot(); break; setDefInstallAuto(); break; setDefInstallInternalMemory(); break; setDefInstallSDcard(); break; localObject2 = new FileApkListItem(getInstance(), new File(rebuldApk), false); removeDialogLP(7); toolbar_restore((FileApkListItem) localObject2, false); break; localObject2 = new FileApkListItem(getInstance(), new File(rebuldApk), false); removeDialogLP(7); toolbar_integrate_dalvik_code((FileApkListItem) localObject2, false); break; rebuldApk = this.current.full; contexttoolbarcreateframework(); removeDialogLP(7); break; rebuldApk = this.current.full; contexttoolbarcreateapk(); removeDialogLP(7); showDialogLP(7); break; localObject2 = new FileApkListItem(getInstance(), new File(rebuldApk), false); removeDialogLP(7); toolbar_uninstall((FileApkListItem) localObject2); break; removeDialogLP(7); toolbar_install_system(new FileApkListItem(getInstance(), new File(rebuldApk), false)); break; removeDialogLP(7); delete_file(); break; removeDialogLP(7); share_app(); break; if (!su) { break; } System.out.println("Disable Google services ads"); localObject2 = null; try { PackageInfo localPackageInfo1 = getPkgMng().getPackageInfo("com.google.android.gms", 4); localObject2 = localPackageInfo1; } catch (PackageManager.NameNotFoundException localNameNotFoundException2) { try { for (;;) { if ((localObject2.services[paramInt].name .startsWith("com.google.android.gms.ads.identifier.")) && (getPkgMng().getComponentEnabledSetting(new ComponentName( "com.google.android.gms", localObject2.services[paramInt].name)) != 2) && (!localObject2.services[paramInt].name .startsWith("com.google.android.gms.ads.social")) && (!localObject2.services[paramInt].name .startsWith("com.google.android.gms.ads.jams."))) { System.out.println( "Disable Google services ads:" + localObject2.services[paramInt].name); showDialogLP(11); progress2.setCancelable(true); progress2.setMessage(Utils.getText(2131165747)); new Utils("") .cmdRoot( new String[] { "pm disable 'com.google.android.gms/" + localObject2.services[paramInt].name + "'", "skipOut" }); } paramInt += 1; } localNameNotFoundException2 = localNameNotFoundException2; localNameNotFoundException2.printStackTrace(); } catch (Exception localException9) { for (;;) { localException9.printStackTrace(); } } } if ((localObject2 == null) || (((PackageInfo) localObject2).services == null) || (((PackageInfo) localObject2).services.length == 0)) { break; } paramInt = 0; i = ((PackageInfo) localObject2).services.length; if ((paramInt >= i) || (!su)) { break; } System.out.println("Enable Google services ads"); localObject2 = null; try { PackageInfo localPackageInfo2 = getPkgMng().getPackageInfo("com.google.android.gms", 4); localObject2 = localPackageInfo2; } catch (PackageManager.NameNotFoundException localNameNotFoundException3) { try { for (;;) { if ((localObject2.services[paramInt].name.startsWith("com.google.android.gms.ads")) && (getPkgMng() .getComponentEnabledSetting(new ComponentName("com.google.android.gms", localObject2.services[paramInt].name)) == 2)) { System.out.println( "Enable Google services ads:" + localObject2.services[paramInt].name); showDialogLP(11); progress2.setCancelable(true); progress2.setMessage(Utils.getText(2131165747)); new Utils("") .cmdRoot( new String[] { "pm enable 'com.google.android.gms/" + localObject2.services[paramInt].name + "'", "skipOut" }); } paramInt += 1; } localNameNotFoundException3 = localNameNotFoundException3; localNameNotFoundException3.printStackTrace(); } catch (Exception localException10) { for (;;) { localException10.printStackTrace(); } } } if ((localObject2 == null) || (((PackageInfo) localObject2).services == null) || (((PackageInfo) localObject2).services.length == 0)) { break; } paramInt = 0; i = ((PackageInfo) localObject2).services.length; if (paramInt >= i) { break; } removeDialogLP(7); toolbar_addfree_on(); break; removeDialogLP(7); toolbar_addfree_off(); break; removeDialogLP(7); toolbar_addfree_clear(); break; move_to_system_click(); break; localObject2 = new ArrayList(1); ((ArrayList) localObject2).add(pli); integrate_to_system((ArrayList) localObject2, true, false); } catch (PackageManager.NameNotFoundException localNameNotFoundException4) { for (;;) { } } label5209: return; label5210: if (!bool) { paramInt = 1; continue; label5220: paramInt = 1; } } }
From source file:com.android.vending.billing.InAppBillingService.LACK.listAppsFragment.java
public void setRootWidgetEnabled(boolean paramBoolean) { PackageManager localPackageManager = getInstance().getPackageManager(); ComponentName localComponentName1; int i;/*from w ww. j a v a 2 s . co m*/ ComponentName localComponentName2; int j; ComponentName localComponentName3; if (localPackageManager != null) { localComponentName1 = new ComponentName(getInstance(), AppDisablerWidget.class); i = localPackageManager.getComponentEnabledSetting(localComponentName1); localComponentName2 = new ComponentName(getInstance(), BinderWidget.class); j = localPackageManager.getComponentEnabledSetting(localComponentName2); localComponentName3 = new ComponentName(getInstance(), AndroidPatchWidget.class); localPackageManager.getComponentEnabledSetting(localComponentName3); if (!paramBoolean) { break label124; } if ((i == 2) || (j == 2)) { localPackageManager.setComponentEnabledSetting(localComponentName1, 1, 1); localPackageManager.setComponentEnabledSetting(localComponentName2, 1, 1); localPackageManager.setComponentEnabledSetting(localComponentName3, 1, 1); } } label124: while ((i != 1) && (j != 1)) { return; } localPackageManager.setComponentEnabledSetting(localComponentName1, 2, 1); localPackageManager.setComponentEnabledSetting(localComponentName2, 2, 1); localPackageManager.setComponentEnabledSetting(localComponentName3, 2, 1); }