diff options
author | Amith Yamasani <yamasani@google.com> | 2012-08-10 17:06:33 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2012-08-11 18:24:07 -0700 |
commit | 258848d2ae04f447ff1c18023fa76b139fcc0862 (patch) | |
tree | 8736421f4007d81206d0f0ea8b32a2013508976a /core/java/android/content/Context.java | |
parent | 75f0fac91bd7fa67fa76cfdd4e163b9f35be0432 (diff) | |
download | frameworks_base-258848d2ae04f447ff1c18023fa76b139fcc0862.zip frameworks_base-258848d2ae04f447ff1c18023fa76b139fcc0862.tar.gz frameworks_base-258848d2ae04f447ff1c18023fa76b139fcc0862.tar.bz2 |
User Manager service to manage users and query user details
Moved a bunch of methods from PackageManager to UserManager.
Fix launching of activities from recents to correct user.
Guest creation APIs
Change-Id: I0733405e6eb2829675665e225c759d6baa2b708f
Diffstat (limited to 'core/java/android/content/Context.java')
-rw-r--r-- | core/java/android/content/Context.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 5a7a989..bf60a96 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -890,6 +890,22 @@ public abstract class Context { public abstract void startActivity(Intent intent, Bundle options); /** + * Same as {@link #startActivity(Intent, Bundle)}, but for a specific user. It requires holding + * the {@link android.Manifest.permission#INTERACT_ACROSS_USERS_FULL} permission. + * @param intent The description of the activity to start. + * @param options Additional options for how the Activity should be started. + * May be null if there are no options. See {@link android.app.ActivityOptions} + * for how to build the Bundle supplied here; there are no supported definitions + * for building it manually. + * @param userId The user id of the user to start this activity for. + * @throws ActivityNotFoundException + * @hide + */ + public void startActivityAsUser(Intent intent, Bundle options, int userId) { + throw new RuntimeException("Not implemented. Must override in a subclass."); + } + + /** * Same as {@link #startActivities(Intent[], Bundle)} with no options * specified. * @@ -2018,6 +2034,15 @@ public abstract class Context { public static final String SCHEDULING_POLICY_SERVICE = "scheduling_policy"; /** + * Use with {@link #getSystemService} to retrieve a + * {@link android.os.UserManager} for managing users on devices that support multiple users. + * + * @see #getSystemService + * @see android.os.UserManager + */ + public static final String USER_SERVICE = "user"; + + /** * Determine whether the given permission is allowed for a particular * process and user ID running in the system. * |