Loading core/java/android/app/admin/DevicePolicyManager.java +15 −1 Original line number Original line Diff line number Diff line Loading @@ -12572,10 +12572,24 @@ public class DevicePolicyManager { **/ **/ @SystemApi @SystemApi public void setSecondaryLockscreenEnabled(@NonNull ComponentName admin, boolean enabled) { public void setSecondaryLockscreenEnabled(@NonNull ComponentName admin, boolean enabled) { setSecondaryLockscreenEnabled(admin, enabled, null); } /** * Called by the system supervision app to set whether a secondary lockscreen needs to be shown. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. Null if the * caller is not a device admin. * @param enabled Whether or not the lockscreen needs to be shown. * @param options A {@link PersistableBundle} to supply options to the lock screen. * @hide */ public void setSecondaryLockscreenEnabled(@Nullable ComponentName admin, boolean enabled, @Nullable PersistableBundle options) { throwIfParentInstance("setSecondaryLockscreenEnabled"); throwIfParentInstance("setSecondaryLockscreenEnabled"); if (mService != null) { if (mService != null) { try { try { mService.setSecondaryLockscreenEnabled(admin, enabled); mService.setSecondaryLockscreenEnabled(admin, enabled, options); } catch (RemoteException e) { } catch (RemoteException e) { throw e.rethrowFromSystemServer(); throw e.rethrowFromSystemServer(); } } core/java/android/app/admin/IDevicePolicyManager.aidl +1 −1 Original line number Original line Diff line number Diff line Loading @@ -303,7 +303,7 @@ interface IDevicePolicyManager { String[] getAccountTypesWithManagementDisabled(String callerPackageName); String[] getAccountTypesWithManagementDisabled(String callerPackageName); String[] getAccountTypesWithManagementDisabledAsUser(int userId, String callerPackageName, in boolean parent); String[] getAccountTypesWithManagementDisabledAsUser(int userId, String callerPackageName, in boolean parent); void setSecondaryLockscreenEnabled(in ComponentName who, boolean enabled); void setSecondaryLockscreenEnabled(in ComponentName who, boolean enabled, in PersistableBundle options); boolean isSecondaryLockscreenEnabled(in UserHandle userHandle); boolean isSecondaryLockscreenEnabled(in UserHandle userHandle); void setPreferentialNetworkServiceConfigs( void setPreferentialNetworkServiceConfigs( Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -14799,7 +14799,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } } @Override @Override public void setSecondaryLockscreenEnabled(ComponentName who, boolean enabled) { public void setSecondaryLockscreenEnabled(ComponentName who, boolean enabled, PersistableBundle options) { Objects.requireNonNull(who, "ComponentName is null"); Objects.requireNonNull(who, "ComponentName is null"); // Check can set secondary lockscreen enabled // Check can set secondary lockscreen enabled Loading
core/java/android/app/admin/DevicePolicyManager.java +15 −1 Original line number Original line Diff line number Diff line Loading @@ -12572,10 +12572,24 @@ public class DevicePolicyManager { **/ **/ @SystemApi @SystemApi public void setSecondaryLockscreenEnabled(@NonNull ComponentName admin, boolean enabled) { public void setSecondaryLockscreenEnabled(@NonNull ComponentName admin, boolean enabled) { setSecondaryLockscreenEnabled(admin, enabled, null); } /** * Called by the system supervision app to set whether a secondary lockscreen needs to be shown. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. Null if the * caller is not a device admin. * @param enabled Whether or not the lockscreen needs to be shown. * @param options A {@link PersistableBundle} to supply options to the lock screen. * @hide */ public void setSecondaryLockscreenEnabled(@Nullable ComponentName admin, boolean enabled, @Nullable PersistableBundle options) { throwIfParentInstance("setSecondaryLockscreenEnabled"); throwIfParentInstance("setSecondaryLockscreenEnabled"); if (mService != null) { if (mService != null) { try { try { mService.setSecondaryLockscreenEnabled(admin, enabled); mService.setSecondaryLockscreenEnabled(admin, enabled, options); } catch (RemoteException e) { } catch (RemoteException e) { throw e.rethrowFromSystemServer(); throw e.rethrowFromSystemServer(); } }
core/java/android/app/admin/IDevicePolicyManager.aidl +1 −1 Original line number Original line Diff line number Diff line Loading @@ -303,7 +303,7 @@ interface IDevicePolicyManager { String[] getAccountTypesWithManagementDisabled(String callerPackageName); String[] getAccountTypesWithManagementDisabled(String callerPackageName); String[] getAccountTypesWithManagementDisabledAsUser(int userId, String callerPackageName, in boolean parent); String[] getAccountTypesWithManagementDisabledAsUser(int userId, String callerPackageName, in boolean parent); void setSecondaryLockscreenEnabled(in ComponentName who, boolean enabled); void setSecondaryLockscreenEnabled(in ComponentName who, boolean enabled, in PersistableBundle options); boolean isSecondaryLockscreenEnabled(in UserHandle userHandle); boolean isSecondaryLockscreenEnabled(in UserHandle userHandle); void setPreferentialNetworkServiceConfigs( void setPreferentialNetworkServiceConfigs( Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -14799,7 +14799,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } } @Override @Override public void setSecondaryLockscreenEnabled(ComponentName who, boolean enabled) { public void setSecondaryLockscreenEnabled(ComponentName who, boolean enabled, PersistableBundle options) { Objects.requireNonNull(who, "ComponentName is null"); Objects.requireNonNull(who, "ComponentName is null"); // Check can set secondary lockscreen enabled // Check can set secondary lockscreen enabled