diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index c566f6c..ffb55d6 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -858,6 +858,33 @@
     }
 
     /**
+     * Start a new fragment in a new activity containing a preference panel for a given user. If the
+     * preferences are being displayed in multi-pane mode, the given fragment class will be
+     * instantiated and placed in the appropriate pane. If running in single-pane mode, a new
+     * activity will be launched in which to show the fragment.
+     *
+     * @param fragmentClass Full name of the class implementing the fragment.
+     * @param args Any desired arguments to supply to the fragment.
+     * @param titleRes Optional resource identifier of the title of this fragment.
+     * @param titleText Optional text of the title of this fragment.
+     * @param userHandle The user for which the panel has to be started.
+     */
+    public void startPreferencePanelAsUser(String fragmentClass, Bundle args, int titleRes,
+            CharSequence titleText, UserHandle userHandle) {
+        String title = null;
+        if (titleRes < 0) {
+            if (titleText != null) {
+                title = titleText.toString();
+            } else {
+                // There not much we can do in that case
+                title = "";
+            }
+        }
+        Utils.startWithFragmentAsUser(this, fragmentClass, args,
+                titleRes, title, mIsShortcut, userHandle);
+    }
+
+    /**
      * Called by a preference panel fragment to finish itself.
      *
      * @param caller The fragment that is asking to be finished.
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index 60bf226..de9fac7 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -609,6 +609,13 @@
         }
     }
 
+    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
diff --git a/src/com/android/settings/fuelgauge/PowerUsageDetail.java b/src/com/android/settings/fuelgauge/PowerUsageDetail.java
index b745c9d..36a2444 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageDetail.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageDetail.java
@@ -104,6 +104,7 @@
         args.putSerializable(PowerUsageDetail.EXTRA_DRAIN_TYPE, entry.sipper.drainType);
         args.putBoolean(PowerUsageDetail.EXTRA_SHOW_LOCATION_BUTTON, showLocationButton);
 
+        int userId = UserHandle.myUserId();
         int[] types;
         double[] values;
         switch (entry.sipper.drainType) {
@@ -155,6 +156,7 @@
                     printWriter.flush();
                     args.putString(PowerUsageDetail.EXTRA_REPORT_CHECKIN_DETAILS,
                             result.toString());
+                    userId = UserHandle.getUserId(uid.getUid());
                 }
             }
             break;
@@ -256,8 +258,9 @@
         }
         args.putIntArray(PowerUsageDetail.EXTRA_DETAIL_TYPES, types);
         args.putDoubleArray(PowerUsageDetail.EXTRA_DETAIL_VALUES, values);
-        caller.startPreferencePanel(PowerUsageDetail.class.getName(), args,
-                R.string.details_title, null, null, 0);
+
+        caller.startPreferencePanelAsUser(PowerUsageDetail.class.getName(), args,
+                R.string.details_title, null, new UserHandle(userId));
     }
 
     public static final int ACTION_DISPLAY_SETTINGS = 1;
