Merge "Add non system overlay flag to RequestManageCredentials" into sc-v2-dev am: 3ab85fbd60 am: 15c5e404bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16414974
Change-Id: I24d5979f4673badf9eaa850556ab3c22b459c5d7
diff --git a/src/com/android/settings/security/RequestManageCredentials.java b/src/com/android/settings/security/RequestManageCredentials.java
index 1a8da67..6a1d40a 100644
--- a/src/com/android/settings/security/RequestManageCredentials.java
+++ b/src/com/android/settings/security/RequestManageCredentials.java
@@ -16,6 +16,8 @@
package com.android.settings.security;
+import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
+
import android.annotation.Nullable;
import android.app.Activity;
import android.app.admin.DevicePolicyEventLogger;
@@ -120,6 +122,7 @@
.setStrings(mCredentialManagerPackage)
.write();
setContentView(R.layout.request_manage_credentials);
+ getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
mIsLandscapeMode = getResources().getConfiguration().orientation
== Configuration.ORIENTATION_LANDSCAPE;
@@ -211,7 +214,9 @@
private void loadButtons() {
mButtonPanel = findViewById(R.id.button_panel);
Button dontAllowButton = findViewById(R.id.dont_allow_button);
+ dontAllowButton.setFilterTouchesWhenObscured(true);
Button allowButton = findViewById(R.id.allow_button);
+ allowButton.setFilterTouchesWhenObscured(true);
dontAllowButton.setOnClickListener(b -> {
DevicePolicyEventLogger