summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Weaver <pweaver@google.com>2017-07-17 23:40:48 (GMT)
committerMSe <mse1969@posteo.de>2017-10-04 22:18:32 (GMT)
commit4a3de6674dc4ac89ea86a6e3951fef8f0d49283c (patch)
tree3dc7782975b47aa09d4f0c2356549a5109e6d04c
parent7a204a0e265a0a92537d57fd1bab594250c96149 (diff)
downloadandroid_packages_apps_PackageInstaller-4a3de6674dc4ac89ea86a6e3951fef8f0d49283c.zip
android_packages_apps_PackageInstaller-4a3de6674dc4ac89ea86a6e3951fef8f0d49283c.tar.gz
android_packages_apps_PackageInstaller-4a3de6674dc4ac89ea86a6e3951fef8f0d49283c.tar.bz2
Back-port ag/2514922
Bug: 62196835 Test: Verify overlays disappear on a11y capabilities dialog. Change-Id: I9a58fd647e53cb41f577d8d4782221d73b49f668 (cherry picked from commit 787c5b4948e309c0dbbf0f762c06fa07f88526b1)
-rw-r--r--AndroidManifest.xml1
-rw-r--r--src/com/android/packageinstaller/permission/ui/OverlayTouchActivity.java9
2 files changed, 10 insertions, 0 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 7fbc1d4..68df735 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -18,6 +18,7 @@
<uses-permission android:name="android.permission.UPDATE_APP_OPS_STATS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.KILL_UID" />
+ <uses-permission android:name="android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS" />
<uses-permission android:name="com.google.android.permission.INSTALL_WEARABLE_PACKAGES" />
diff --git a/src/com/android/packageinstaller/permission/ui/OverlayTouchActivity.java b/src/com/android/packageinstaller/permission/ui/OverlayTouchActivity.java
index 7b1d379..b3938b1 100644
--- a/src/com/android/packageinstaller/permission/ui/OverlayTouchActivity.java
+++ b/src/com/android/packageinstaller/permission/ui/OverlayTouchActivity.java
@@ -15,8 +15,11 @@
*/
package com.android.packageinstaller.permission.ui;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
+
import android.app.Activity;
import android.content.Intent;
+import android.os.Bundle;
import android.view.MotionEvent;
public class OverlayTouchActivity extends Activity {
@@ -28,6 +31,12 @@ public class OverlayTouchActivity extends Activity {
}
@Override
+ protected void onCreate(Bundle savedInstanceState) {
+ getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
+ super.onCreate(savedInstanceState);
+ }
+
+ @Override
public boolean dispatchTouchEvent(MotionEvent event) {
mObscuredTouch = (event.getFlags() & (MotionEvent.FLAG_WINDOW_IS_OBSCURED
| MotionEvent.FLAG_WINDOW_IS_PARTIALLY_OBSCURED)) != 0;