Merge "Add non system overlay flag to RequestManageCredentials" into sc-dev am: ff07f8c34d

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16551092

Change-Id: Ifbce4430f251b7b152538520f318e62900ea64b0
This commit is contained in:
Alex Johnston
2022-01-11 21:09:59 +00:00
committed by Automerger Merge Worker

View File

@@ -16,6 +16,8 @@
package com.android.settings.security; package com.android.settings.security;
import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
import android.annotation.Nullable; import android.annotation.Nullable;
import android.app.Activity; import android.app.Activity;
import android.app.admin.DevicePolicyEventLogger; import android.app.admin.DevicePolicyEventLogger;
@@ -120,6 +122,7 @@ public class RequestManageCredentials extends Activity {
.setStrings(mCredentialManagerPackage) .setStrings(mCredentialManagerPackage)
.write(); .write();
setContentView(R.layout.request_manage_credentials); setContentView(R.layout.request_manage_credentials);
getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
mIsLandscapeMode = getResources().getConfiguration().orientation mIsLandscapeMode = getResources().getConfiguration().orientation
== Configuration.ORIENTATION_LANDSCAPE; == Configuration.ORIENTATION_LANDSCAPE;
@@ -211,7 +214,9 @@ public class RequestManageCredentials extends Activity {
private void loadButtons() { private void loadButtons() {
mButtonPanel = findViewById(R.id.button_panel); mButtonPanel = findViewById(R.id.button_panel);
Button dontAllowButton = findViewById(R.id.dont_allow_button); Button dontAllowButton = findViewById(R.id.dont_allow_button);
dontAllowButton.setFilterTouchesWhenObscured(true);
Button allowButton = findViewById(R.id.allow_button); Button allowButton = findViewById(R.id.allow_button);
allowButton.setFilterTouchesWhenObscured(true);
dontAllowButton.setOnClickListener(b -> { dontAllowButton.setOnClickListener(b -> {
DevicePolicyEventLogger DevicePolicyEventLogger