As far as I know, there is no implicit Intent to open this Activity .
To find out how to do this explicitly, look at the Logcat output by opening this menu on your device to see what happens. At some point, the thread should be processed by the ActivityManager , so you can filter it.
You should look for something like this in the log:
I / ActivityManager: START u0 {cmp = com.miui.powerkeeper / .ui.PowerHideModeActivity} of uid 1000 on display 0
After acquiring this information, you just need to create the corresponding Intent so that you can start the same Activity yourself:
try { Intent intent = new Intent(); intent.setClassName("com.miui.powerkeeper", "com.miui.powerkeeper.ui.PowerHideModeActivity"); startActivity(intent); } catch (ActivityNotFoundException anfe) { // this is not an MIUI device, or the component got moved/renamed }
On the other hand, you should not open OS components explicitly. Whenever they change the class name or package of this component, your code is interrupted.
earthw0rmjim
source share