diff options
| author | Eran Messeri <eranm@google.com> | 2019-10-18 14:15:10 +0100 |
|---|---|---|
| committer | Eran Messeri <eranm@google.com> | 2019-11-06 17:27:43 +0000 |
| commit | afdacb2ec4c5cdc2fb2a9943fa5b48100f4725c8 (patch) | |
| tree | 55458cedd3ca744674b209d0192b9ff68952acb0 /src | |
| parent | 924b6b462f710e02267fa0e80d47a10b3e36753d (diff) | |
| download | platform_packages_apps_CertInstaller-afdacb2ec4c5cdc2fb2a9943fa5b48100f4725c8.tar.gz platform_packages_apps_CertInstaller-afdacb2ec4c5cdc2fb2a9943fa5b48100f4725c8.tar.bz2 platform_packages_apps_CertInstaller-afdacb2ec4c5cdc2fb2a9943fa5b48100f4725c8.zip | |
KeyChain: Do not allow hiding Cert Install dialog
Do not allow apps to float a window on top of the certificate
installation / naming dialog.
This obscures the CA certificate installation dialog and could be used
to trick a user into installing a CA certificate.
This is fixed by adding the HIDE_NON_SYSTEM_OVERLAY_WINDOWS system
flag when the activity is created (onCreate), so that another activity
starting in the foreground would not be able to obscure the dialog.
Bug: 139017101
Test: Manual, with an app that floats a window.
Change-Id: Iff8e678743c3883cf1f7f64390097a768ca00856
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/certinstaller/CertInstaller.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/certinstaller/CertInstaller.java b/src/com/android/certinstaller/CertInstaller.java index 8b381cb..dd849a7 100644 --- a/src/com/android/certinstaller/CertInstaller.java +++ b/src/com/android/certinstaller/CertInstaller.java @@ -16,6 +16,8 @@ package com.android.certinstaller; +import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; + import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; @@ -85,6 +87,7 @@ public class CertInstaller extends Activity { @Override protected void onCreate(Bundle savedStates) { super.onCreate(savedStates); + getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); mCredentials = createCredentialHelper(getIntent()); |
