Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5807,6 +5807,7 @@ package android.app.admin { method public java.lang.String getLongSupportMessage(android.content.ComponentName); method public int getMaximumFailedPasswordsForWipe(android.content.ComponentName); method public long getMaximumTimeToLock(android.content.ComponentName); method public int getOrganizationColor(android.content.ComponentName); method public boolean getPackageSuspended(android.content.ComponentName, java.lang.String); method public android.app.admin.DevicePolicyManager getParentProfileInstance(android.content.ComponentName); method public long getPasswordExpiration(android.content.ComponentName); Loading Loading @@ -5875,6 +5876,7 @@ package android.app.admin { method public void setMasterVolumeMuted(android.content.ComponentName, boolean); method public void setMaximumFailedPasswordsForWipe(android.content.ComponentName, int); method public void setMaximumTimeToLock(android.content.ComponentName, long); method public void setOrganizationColor(android.content.ComponentName, int); method public boolean setPackageSuspended(android.content.ComponentName, java.lang.String, boolean); method public void setPasswordExpirationTimeout(android.content.ComponentName, long); method public void setPasswordHistoryLength(android.content.ComponentName, int); api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5947,6 +5947,7 @@ package android.app.admin { method public java.lang.String getLongSupportMessage(android.content.ComponentName); method public int getMaximumFailedPasswordsForWipe(android.content.ComponentName); method public long getMaximumTimeToLock(android.content.ComponentName); method public int getOrganizationColor(android.content.ComponentName); method public boolean getPackageSuspended(android.content.ComponentName, java.lang.String); method public android.app.admin.DevicePolicyManager getParentProfileInstance(android.content.ComponentName); method public long getPasswordExpiration(android.content.ComponentName); Loading Loading @@ -6021,6 +6022,7 @@ package android.app.admin { method public void setMasterVolumeMuted(android.content.ComponentName, boolean); method public void setMaximumFailedPasswordsForWipe(android.content.ComponentName, int); method public void setMaximumTimeToLock(android.content.ComponentName, long); method public void setOrganizationColor(android.content.ComponentName, int); method public boolean setPackageSuspended(android.content.ComponentName, java.lang.String, boolean); method public void setPasswordExpirationTimeout(android.content.ComponentName, long); method public void setPasswordHistoryLength(android.content.ComponentName, int); api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5809,6 +5809,7 @@ package android.app.admin { method public java.lang.String getLongSupportMessage(android.content.ComponentName); method public int getMaximumFailedPasswordsForWipe(android.content.ComponentName); method public long getMaximumTimeToLock(android.content.ComponentName); method public int getOrganizationColor(android.content.ComponentName); method public boolean getPackageSuspended(android.content.ComponentName, java.lang.String); method public android.app.admin.DevicePolicyManager getParentProfileInstance(android.content.ComponentName); method public long getPasswordExpiration(android.content.ComponentName); Loading Loading @@ -5877,6 +5878,7 @@ package android.app.admin { method public void setMasterVolumeMuted(android.content.ComponentName, boolean); method public void setMaximumFailedPasswordsForWipe(android.content.ComponentName, int); method public void setMaximumTimeToLock(android.content.ComponentName, long); method public void setOrganizationColor(android.content.ComponentName, int); method public boolean setPackageSuspended(android.content.ComponentName, java.lang.String, boolean); method public void setPasswordExpirationTimeout(android.content.ComponentName, long); method public void setPasswordHistoryLength(android.content.ComponentName, int); core/java/android/app/admin/DevicePolicyManager.java +51 −0 Original line number Diff line number Diff line Loading @@ -5142,4 +5142,55 @@ public class DevicePolicyManager { return null; } } /** * Called by a profile owner of a managed profile to set the color used for customization. * This color is used as background color of the confirm credentials screen for that user. * The default color is {@link android.graphics.Color#GRAY}. * * <p>The confirm credentials screen can be created using * {@link android.app.KeyguardManager#createConfirmDeviceCredentialIntent}. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param color The 32bit representation of the color to be used. */ public void setOrganizationColor(@NonNull ComponentName admin, int color) { try { mService.setOrganizationColor(admin, color); } catch (RemoteException re) { Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, re); } } /** * Called by a profile owner of a managed profile to retrieve the color used for customization. * This color is used as background color of the confirm credentials screen for that user. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @return The 32bit representation of the color to be used. */ public int getOrganizationColor(@NonNull ComponentName admin) { try { return mService.getOrganizationColor(admin); } catch (RemoteException re) { Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, re); return 0; } } /** * @hide * Retrieve the customization color for a given user. * * @param userHandle The user id of the user we're interested in. * @return The 32bit representation of the color to be used. */ public int getOrganizationColorForUser(int userHandle) { try { return mService.getOrganizationColorForUser(userHandle); } catch (RemoteException re) { Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, re); return 0; } } } core/java/android/app/admin/IDevicePolicyManager.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -263,4 +263,8 @@ interface IDevicePolicyManager { String getLongSupportMessageForUser(in ComponentName admin, int userHandle); boolean isSeparateProfileChallengeAllowed(int userHandle); void setOrganizationColor(in ComponentName admin, in int color); int getOrganizationColor(in ComponentName admin); int getOrganizationColorForUser(int userHandle); } Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5807,6 +5807,7 @@ package android.app.admin { method public java.lang.String getLongSupportMessage(android.content.ComponentName); method public int getMaximumFailedPasswordsForWipe(android.content.ComponentName); method public long getMaximumTimeToLock(android.content.ComponentName); method public int getOrganizationColor(android.content.ComponentName); method public boolean getPackageSuspended(android.content.ComponentName, java.lang.String); method public android.app.admin.DevicePolicyManager getParentProfileInstance(android.content.ComponentName); method public long getPasswordExpiration(android.content.ComponentName); Loading Loading @@ -5875,6 +5876,7 @@ package android.app.admin { method public void setMasterVolumeMuted(android.content.ComponentName, boolean); method public void setMaximumFailedPasswordsForWipe(android.content.ComponentName, int); method public void setMaximumTimeToLock(android.content.ComponentName, long); method public void setOrganizationColor(android.content.ComponentName, int); method public boolean setPackageSuspended(android.content.ComponentName, java.lang.String, boolean); method public void setPasswordExpirationTimeout(android.content.ComponentName, long); method public void setPasswordHistoryLength(android.content.ComponentName, int);
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5947,6 +5947,7 @@ package android.app.admin { method public java.lang.String getLongSupportMessage(android.content.ComponentName); method public int getMaximumFailedPasswordsForWipe(android.content.ComponentName); method public long getMaximumTimeToLock(android.content.ComponentName); method public int getOrganizationColor(android.content.ComponentName); method public boolean getPackageSuspended(android.content.ComponentName, java.lang.String); method public android.app.admin.DevicePolicyManager getParentProfileInstance(android.content.ComponentName); method public long getPasswordExpiration(android.content.ComponentName); Loading Loading @@ -6021,6 +6022,7 @@ package android.app.admin { method public void setMasterVolumeMuted(android.content.ComponentName, boolean); method public void setMaximumFailedPasswordsForWipe(android.content.ComponentName, int); method public void setMaximumTimeToLock(android.content.ComponentName, long); method public void setOrganizationColor(android.content.ComponentName, int); method public boolean setPackageSuspended(android.content.ComponentName, java.lang.String, boolean); method public void setPasswordExpirationTimeout(android.content.ComponentName, long); method public void setPasswordHistoryLength(android.content.ComponentName, int);
api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5809,6 +5809,7 @@ package android.app.admin { method public java.lang.String getLongSupportMessage(android.content.ComponentName); method public int getMaximumFailedPasswordsForWipe(android.content.ComponentName); method public long getMaximumTimeToLock(android.content.ComponentName); method public int getOrganizationColor(android.content.ComponentName); method public boolean getPackageSuspended(android.content.ComponentName, java.lang.String); method public android.app.admin.DevicePolicyManager getParentProfileInstance(android.content.ComponentName); method public long getPasswordExpiration(android.content.ComponentName); Loading Loading @@ -5877,6 +5878,7 @@ package android.app.admin { method public void setMasterVolumeMuted(android.content.ComponentName, boolean); method public void setMaximumFailedPasswordsForWipe(android.content.ComponentName, int); method public void setMaximumTimeToLock(android.content.ComponentName, long); method public void setOrganizationColor(android.content.ComponentName, int); method public boolean setPackageSuspended(android.content.ComponentName, java.lang.String, boolean); method public void setPasswordExpirationTimeout(android.content.ComponentName, long); method public void setPasswordHistoryLength(android.content.ComponentName, int);
core/java/android/app/admin/DevicePolicyManager.java +51 −0 Original line number Diff line number Diff line Loading @@ -5142,4 +5142,55 @@ public class DevicePolicyManager { return null; } } /** * Called by a profile owner of a managed profile to set the color used for customization. * This color is used as background color of the confirm credentials screen for that user. * The default color is {@link android.graphics.Color#GRAY}. * * <p>The confirm credentials screen can be created using * {@link android.app.KeyguardManager#createConfirmDeviceCredentialIntent}. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param color The 32bit representation of the color to be used. */ public void setOrganizationColor(@NonNull ComponentName admin, int color) { try { mService.setOrganizationColor(admin, color); } catch (RemoteException re) { Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, re); } } /** * Called by a profile owner of a managed profile to retrieve the color used for customization. * This color is used as background color of the confirm credentials screen for that user. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @return The 32bit representation of the color to be used. */ public int getOrganizationColor(@NonNull ComponentName admin) { try { return mService.getOrganizationColor(admin); } catch (RemoteException re) { Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, re); return 0; } } /** * @hide * Retrieve the customization color for a given user. * * @param userHandle The user id of the user we're interested in. * @return The 32bit representation of the color to be used. */ public int getOrganizationColorForUser(int userHandle) { try { return mService.getOrganizationColorForUser(userHandle); } catch (RemoteException re) { Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, re); return 0; } } }
core/java/android/app/admin/IDevicePolicyManager.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -263,4 +263,8 @@ interface IDevicePolicyManager { String getLongSupportMessageForUser(in ComponentName admin, int userHandle); boolean isSeparateProfileChallengeAllowed(int userHandle); void setOrganizationColor(in ComponentName admin, in int color); int getOrganizationColor(in ComponentName admin); int getOrganizationColorForUser(int userHandle); }