diff options
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. * |