OSDN Git Service

Settings not showing print jobs for a managed profile.
authorSvetoslav <svetoslavganov@google.com>
Wed, 14 Jan 2015 02:48:29 +0000 (18:48 -0800)
committerSvetoslav <svetoslavganov@google.com>
Wed, 14 Jan 2015 02:48:33 +0000 (18:48 -0800)
The settings app is shared among the personal and work profiles.
When fetching print jobs it was not getting the ones for the work
profile, rather the ones for the current user which is the personal
profile.

bug:18867406

Change-Id: I99f8cf3a3e2b133a0a4d5a8915473d1190e205f4

src/com/android/settings/print/PrintJobSettingsFragment.java
src/com/android/settings/print/PrintSettingsFragment.java

index 34db97b..ccdfc0e 100644 (file)
@@ -78,7 +78,7 @@ public class PrintJobSettingsFragment extends SettingsPreferenceFragment {
 
         mPrintManager = ((PrintManager) getActivity().getSystemService(
                 Context.PRINT_SERVICE)).getGlobalPrintManagerForUser(
-                        ActivityManager.getCurrentUser());
+                        getActivity().getUserId());
 
         getActivity().getActionBar().setTitle(R.string.print_print_job);
 
index b7c74da..581321b 100644 (file)
@@ -465,7 +465,7 @@ public class PrintSettingsFragment extends SettingsPreferenceFragment
             super(context);
             mPrintManager = ((PrintManager) context.getSystemService(
                     Context.PRINT_SERVICE)).getGlobalPrintManagerForUser(
-                        ActivityManager.getCurrentUser());
+                    context.getUserId());
         }
 
         @Override