diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2015-05-15 01:45:18 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-15 01:45:19 +0000 |
commit | 096c11dc3795120dbc75cc1ee15abaa019fb74d1 (patch) | |
tree | 8bf308f4266981f57fec4b6ec8dc6bf202d72728 /core/java | |
parent | 8309a19181151a78a288368becd3d3a9b1b1e389 (diff) | |
parent | 7f75da2405cd910854448bb3801f776e036f926a (diff) | |
download | frameworks_base-096c11dc3795120dbc75cc1ee15abaa019fb74d1.zip frameworks_base-096c11dc3795120dbc75cc1ee15abaa019fb74d1.tar.gz frameworks_base-096c11dc3795120dbc75cc1ee15abaa019fb74d1.tar.bz2 |
Merge "camera2: Fix work-profile eviction handling." into mnc-dev
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/hardware/ICameraService.aidl | 2 | ||||
-rw-r--r-- | core/java/android/os/UserManager.java | 21 |
2 files changed, 21 insertions, 2 deletions
diff --git a/core/java/android/hardware/ICameraService.aidl b/core/java/android/hardware/ICameraService.aidl index 7b96e20..9201b61 100644 --- a/core/java/android/hardware/ICameraService.aidl +++ b/core/java/android/hardware/ICameraService.aidl @@ -81,5 +81,5 @@ interface ICameraService * * Callers require the android.permission.CAMERA_SEND_SYSTEM_EVENTS permission. */ - oneway void notifySystemEvent(int eventId, int arg0); + oneway void notifySystemEvent(int eventId, in int[] args); } diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index cc37d5e..3dee68c 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -936,7 +936,7 @@ public class UserManager { * Returns list of the profiles of userHandle including * userHandle itself. * Note that this returns both enabled and not enabled profiles. See - * {@link #getUserProfiles()} if you need only the enabled ones. + * {@link #getEnabledProfiles(int)} if you need only the enabled ones. * * Requires {@link android.Manifest.permission#MANAGE_USERS} permission. * @param userHandle profiles of this user will be returned. @@ -953,6 +953,25 @@ public class UserManager { } /** + * Returns list of the profiles of userHandle including + * userHandle itself. + * Note that this returns only enabled. + * + * Requires {@link android.Manifest.permission#MANAGE_USERS} permission. + * @param userHandle profiles of this user will be returned. + * @return the list of profiles. + * @hide + */ + public List<UserInfo> getEnabledProfiles(int userHandle) { + try { + return mService.getProfiles(userHandle, true /* enabledOnly */); + } catch (RemoteException re) { + Log.w(TAG, "Could not get user list", re); + return null; + } + } + + /** * Returns a list of UserHandles for profiles associated with the user that the calling process * is running on, including the user itself. * |