Show Power usage details for the correct user

Settings > Battery > Details has to observe managed profiles and start the
Power Usage Detail fragment for the correct profile.

Bug: 17523189

Change-Id: I7a47b972a8a0492b4a411197cd2c8c65f24c2e7e
This commit is contained in:
Zoltan Szatmary-Ban
2014-09-18 10:26:11 +01:00
parent 894af268de
commit 7a2ccf201e
3 changed files with 39 additions and 2 deletions

View File

@@ -609,6 +609,13 @@ public final class Utils {
}
}
public static void startWithFragmentAsUser(Context context, String fragmentName, Bundle args,
int titleResId, CharSequence title, boolean isShortcut, UserHandle userHandle) {
Intent intent = onBuildStartFragmentIntent(context, fragmentName, args, titleResId,
title, isShortcut);
context.startActivityAsUser(intent, userHandle);
}
/**
* Build an Intent to launch a new activity showing the selected fragment.
* The implementation constructs an Intent that re-launches the current activity with the