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

Commit eb7cbb87 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix bug in isManagedKiosk" into udc-dev am: 8e712602

parents 4cb8f545 8e712602
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -20215,9 +20215,20 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    }
    private boolean isLockTaskFeatureEnabled(int lockTaskFeature) throws RemoteException {
        int lockTaskFeatures = 0;
        if (isPolicyEngineForFinanceFlagEnabled()) {
            LockTaskPolicy policy = mDevicePolicyEngine.getResolvedPolicy(
                    PolicyDefinition.LOCK_TASK, getCurrentForegroundUserId());
            lockTaskFeatures = policy == null
                    // We default on the power button menu, in order to be consistent with pre-P
                    // behaviour.
                    ? DevicePolicyManager.LOCK_TASK_FEATURE_GLOBAL_ACTIONS
                    : policy.getFlags();
        } else {
            //TODO(b/175285301): Explicitly get the user's identity to check.
        int lockTaskFeatures =
            lockTaskFeatures =
                    getUserData(getCurrentForegroundUserId()).mLockTaskFeatures;
        }
        return (lockTaskFeatures & lockTaskFeature) == lockTaskFeature;
    }