Skip to content

Instantly share code, notes, and snippets.

@MrCrambo
Created May 16, 2020 16:46
Show Gist options
  • Save MrCrambo/43e06b388fcc1301b7322c2744eccbb5 to your computer and use it in GitHub Desktop.
Save MrCrambo/43e06b388fcc1301b7322c2744eccbb5 to your computer and use it in GitHub Desktop.
private static final Intent[] POWERMANAGER_INTENTS = {
new Intent().setComponent(new ComponentName("com.miui.securitycenter", "com.miui.permcenter.autostart.AutoStartManagementActivity")),
new Intent().setComponent(new ComponentName("com.letv.android.letvsafe", "com.letv.android.letvsafe.AutobootManageActivity")),
new Intent().setComponent(new ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.startupmgr.ui.StartupNormalAppListActivity")),
new Intent().setComponent(new ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.optimize.process.ProtectActivity")),
new Intent().setComponent(new ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.appcontrol.activity.StartupAppControlActivity")),
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.permission.startup.StartupAppListActivity")),
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.startupapp.StartupAppListActivity")),
new Intent().setComponent(new ComponentName("com.oppo.safe", "com.oppo.safe.permission.startup.StartupAppListActivity")),
new Intent().setComponent(new ComponentName("com.iqoo.secure", "com.iqoo.secure.ui.phoneoptimize.AddWhiteListActivity")),
new Intent().setComponent(new ComponentName("com.iqoo.secure", "com.iqoo.secure.ui.phoneoptimize.BgStartUpManager")),
new Intent().setComponent(new ComponentName("com.vivo.permissionmanager", "com.vivo.permissionmanager.activity.BgStartUpManagerActivity")),
new Intent().setComponent(new ComponentName("com.samsung.android.lool", "com.samsung.android.sm.ui.battery.BatteryActivity")),
new Intent().setComponent(new ComponentName("com.htc.pitroad", "com.htc.pitroad.landingpage.activity.LandingPageActivity")),
new Intent().setComponent(new ComponentName("com.asus.mobilemanager", "com.asus.mobilemanager.MainActivity"))
};
for (Intent intent : POWERMANAGER_INTENTS)
if (getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY) != null) {
// show dialog to ask user action
break;
}
@davidgyoung
Copy link

Hey, @MrCrambo, this is a great idea! May I ask where you got this list? I would love to use this for the Android Beacon Library and I know other projects would find this useful, too. Of course, the list will need to be updated as new OEM components like this are discovered. I would like to help coordinate those updates if possible.

@MrCrambo
Copy link
Author

Hey, @davidgyoung, I found this list after looking for some solution in the web resources like stack overflow, medium and other services with answers and tested it on many devices, so it works perfectly on much of the devices.

Sure, this list now need to be updated and it would be great to cooperate.

You can contact me at [email protected] and let's continue there!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment