Loading packages/VpnDialogs/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ <uses-permission android:name="android.permission.CONTROL_VPN" /> <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" /> <uses-permission android:name="android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS"/> <application android:label="VpnDialogs" android:allowBackup="false" > Loading packages/VpnDialogs/src/com/android/vpndialogs/ConfirmDialog.java +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.vpndialogs; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import android.content.Context; import android.content.DialogInterface; import android.content.pm.PackageManager; Loading Loading @@ -78,6 +80,7 @@ public class ConfirmDialog extends AlertActivity setupAlert(); getWindow().setCloseOnTouchOutside(false); getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); Button button = mAlert.getButton(DialogInterface.BUTTON_POSITIVE); button.setFilterTouchesWhenObscured(true); } Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +21 −13 Original line number Diff line number Diff line Loading @@ -4601,20 +4601,12 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D mLockTaskNotify = new LockTaskNotify(mService.mContext); } mLockTaskNotify.show(false); try { boolean shouldLockKeyguard = Settings.Secure.getIntForUser( mService.mContext.getContentResolver(), Settings.Secure.LOCK_TO_APP_EXIT_LOCKED, UserHandle.USER_CURRENT) != 0; if (mLockTaskModeState == LOCK_TASK_MODE_PINNED && shouldLockKeyguard) { if (mLockTaskModeState == LOCK_TASK_MODE_PINNED && shouldLockKeyguard()) { mWindowManager.lockNow(null); mWindowManager.dismissKeyguard(null /* callback */); new LockPatternUtils(mService.mContext) .requireCredentialEntry(UserHandle.USER_ALL); } } catch (SettingNotFoundException e) { // No setting, don't lock. } } catch (RemoteException ex) { throw new RuntimeException(ex); } finally { Loading @@ -4640,6 +4632,22 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D } } private boolean shouldLockKeyguard() { // This functionality should be kept consistent with // com.android.settings.security.ScreenPinningSettings (see b/127605586) try { return Settings.Secure.getIntForUser( mService.mContext.getContentResolver(), Settings.Secure.LOCK_TO_APP_EXIT_LOCKED, UserHandle.USER_CURRENT) != 0; } catch (Settings.SettingNotFoundException e) { // Log to SafetyNet for b/127605586 android.util.EventLog.writeEvent(0x534e4554, "127605586", -1, ""); LockPatternUtils lockPatternUtils = new LockPatternUtils(mService.mContext); return lockPatternUtils.isSecure(mCurrentUser); } } // TODO: Move to its own file. /** Exactly one of these classes per Display in the system. Capable of holding zero or more * attached {@link ActivityStack}s */ Loading Loading
packages/VpnDialogs/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ <uses-permission android:name="android.permission.CONTROL_VPN" /> <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" /> <uses-permission android:name="android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS"/> <application android:label="VpnDialogs" android:allowBackup="false" > Loading
packages/VpnDialogs/src/com/android/vpndialogs/ConfirmDialog.java +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.vpndialogs; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import android.content.Context; import android.content.DialogInterface; import android.content.pm.PackageManager; Loading Loading @@ -78,6 +80,7 @@ public class ConfirmDialog extends AlertActivity setupAlert(); getWindow().setCloseOnTouchOutside(false); getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); Button button = mAlert.getButton(DialogInterface.BUTTON_POSITIVE); button.setFilterTouchesWhenObscured(true); } Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +21 −13 Original line number Diff line number Diff line Loading @@ -4601,20 +4601,12 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D mLockTaskNotify = new LockTaskNotify(mService.mContext); } mLockTaskNotify.show(false); try { boolean shouldLockKeyguard = Settings.Secure.getIntForUser( mService.mContext.getContentResolver(), Settings.Secure.LOCK_TO_APP_EXIT_LOCKED, UserHandle.USER_CURRENT) != 0; if (mLockTaskModeState == LOCK_TASK_MODE_PINNED && shouldLockKeyguard) { if (mLockTaskModeState == LOCK_TASK_MODE_PINNED && shouldLockKeyguard()) { mWindowManager.lockNow(null); mWindowManager.dismissKeyguard(null /* callback */); new LockPatternUtils(mService.mContext) .requireCredentialEntry(UserHandle.USER_ALL); } } catch (SettingNotFoundException e) { // No setting, don't lock. } } catch (RemoteException ex) { throw new RuntimeException(ex); } finally { Loading @@ -4640,6 +4632,22 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D } } private boolean shouldLockKeyguard() { // This functionality should be kept consistent with // com.android.settings.security.ScreenPinningSettings (see b/127605586) try { return Settings.Secure.getIntForUser( mService.mContext.getContentResolver(), Settings.Secure.LOCK_TO_APP_EXIT_LOCKED, UserHandle.USER_CURRENT) != 0; } catch (Settings.SettingNotFoundException e) { // Log to SafetyNet for b/127605586 android.util.EventLog.writeEvent(0x534e4554, "127605586", -1, ""); LockPatternUtils lockPatternUtils = new LockPatternUtils(mService.mContext); return lockPatternUtils.isSecure(mCurrentUser); } } // TODO: Move to its own file. /** Exactly one of these classes per Display in the system. Capable of holding zero or more * attached {@link ActivityStack}s */ Loading