Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f01c5e2e authored by Jason Parks's avatar Jason Parks
Browse files

Add options bundle to setSecondaryLockscreenEnabled

Test: build
Flag: EXEMPT AIDL change
Bug: 361098041
Change-Id: I30b4e102c39e2fb00e1ad3bf78d81c35e4f11b61
parent 1c6f1389
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -12572,10 +12572,24 @@ public class DevicePolicyManager {
     **/
    @SystemApi
    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");
        if (mService != null) {
            try {
                mService.setSecondaryLockscreenEnabled(admin, enabled);
                mService.setSecondaryLockscreenEnabled(admin, enabled, options);
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
            }
+1 −1
Original line number Diff line number Diff line
@@ -303,7 +303,7 @@ interface IDevicePolicyManager {
    String[] getAccountTypesWithManagementDisabled(String callerPackageName);
    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);

    void setPreferentialNetworkServiceConfigs(
+2 −1
Original line number Diff line number Diff line
@@ -14799,7 +14799,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    }
    @Override
    public void setSecondaryLockscreenEnabled(ComponentName who, boolean enabled) {
    public void setSecondaryLockscreenEnabled(ComponentName who, boolean enabled,
            PersistableBundle options) {
        Objects.requireNonNull(who, "ComponentName is null");
        // Check can set secondary lockscreen enabled