summaryrefslogtreecommitdiffstats
path: root/src/com/android/packageinstaller/permission/ui/OverlayTouchActivity.java
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-08-06 16:08:03 -0400
committerJason Monk <jmonk@google.com>2015-08-07 12:43:02 -0400
commit5c07dcb0698725e7949b030665d21f96c916f3b8 (patch)
tree52ef0f442d18c0b5f21e0425704ecd43c88ac77f /src/com/android/packageinstaller/permission/ui/OverlayTouchActivity.java
parentcea90ebdaf0156d4796735f9581982a545c81b31 (diff)
downloadandroid_packages_apps_PackageInstaller-5c07dcb0698725e7949b030665d21f96c916f3b8.tar.gz
android_packages_apps_PackageInstaller-5c07dcb0698725e7949b030665d21f96c916f3b8.tar.bz2
android_packages_apps_PackageInstaller-5c07dcb0698725e7949b030665d21f96c916f3b8.zip
Show warning when touches are being blocked by overlays
Bug: 22317719 Change-Id: I5f6526bcce382ae6fabe32d3f8842567d8dc8701
Diffstat (limited to 'src/com/android/packageinstaller/permission/ui/OverlayTouchActivity.java')
-rw-r--r--src/com/android/packageinstaller/permission/ui/OverlayTouchActivity.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/com/android/packageinstaller/permission/ui/OverlayTouchActivity.java b/src/com/android/packageinstaller/permission/ui/OverlayTouchActivity.java
new file mode 100644
index 00000000..e4cbff3a
--- /dev/null
+++ b/src/com/android/packageinstaller/permission/ui/OverlayTouchActivity.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.packageinstaller.permission.ui;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.view.MotionEvent;
+
+public class OverlayTouchActivity extends Activity {
+
+ private boolean mObscuredTouch;
+
+ public boolean isObscuredTouch() {
+ return mObscuredTouch;
+ }
+
+ @Override
+ public boolean dispatchTouchEvent(MotionEvent event) {
+ mObscuredTouch = (event.getFlags() & MotionEvent.FLAG_WINDOW_IS_OBSCURED) != 0;
+ return super.dispatchTouchEvent(event);
+ }
+
+ public void showOverlayDialog() {
+ startActivity(new Intent(this, OverlayWarningDialog.class));
+ }
+}