summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Pasanen <dan.pasanen@gmail.com>2017-12-09 14:49:08 (GMT)
committerDan Pasanen <dan.pasanen@gmail.com>2017-12-11 00:33:38 (GMT)
commitd65c53a61609a62907da98b76244cae6ff6c0951 (patch)
tree86320da37decca19e66420e41e3f1795e4d6267c
parentce6a4621a549b27f7566f4f9525788b2c5fb4c17 (diff)
downloadandroid_packages_apps_PackageInstaller-d65c53a61609a62907da98b76244cae6ff6c0951.zip
android_packages_apps_PackageInstaller-d65c53a61609a62907da98b76244cae6ff6c0951.tar.gz
android_packages_apps_PackageInstaller-d65c53a61609a62907da98b76244cae6ff6c0951.tar.bz2
Revert "Revert "DO NOT MERGE Disable overlays while installer is resumed""
This reverts commit 4b0c302eae8d772d09346718559cc42548485f75. Change-Id: Ic69486cc7d1f374a8aba1f4a566e1d96722975fc
-rw-r--r--src/com/android/packageinstaller/PackageInstallerActivity.java25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/com/android/packageinstaller/PackageInstallerActivity.java b/src/com/android/packageinstaller/PackageInstallerActivity.java
index de68582..dab8863 100644
--- a/src/com/android/packageinstaller/PackageInstallerActivity.java
+++ b/src/com/android/packageinstaller/PackageInstallerActivity.java
@@ -16,7 +16,6 @@
*/
package com.android.packageinstaller;
-import android.app.Activity;
import android.app.ActivityManagerNative;
import android.app.AlertDialog;
import android.app.Dialog;
@@ -53,6 +52,8 @@ import android.widget.TabHost;
import android.widget.TextView;
import com.android.packageinstaller.permission.utils.Utils;
+import com.android.packageinstaller.permission.ui.OverlayTouchActivity;
+
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -69,7 +70,8 @@ import java.io.OutputStream;
* Based on the user response the package is then installed by launching InstallAppConfirm
* sub activity. All state transitions are handled in this activity
*/
-public class PackageInstallerActivity extends Activity implements OnCancelListener, OnClickListener {
+public class PackageInstallerActivity extends OverlayTouchActivity implements OnCancelListener,
+ OnClickListener {
private static final String TAG = "PackageInstaller";
private static final int REQUEST_ENABLE_UNKNOWN_SOURCES = 1;
@@ -218,6 +220,25 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen
}
}
+ @Override
+ protected void onResume() {
+ super.onResume();
+
+ if (mOk != null) {
+ mOk.setEnabled(mOkCanInstall);
+ }
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+
+ if (mOk != null) {
+ // Don't allow the install button to be clicked as there might be overlays
+ mOk.setEnabled(false);
+ }
+ }
+
private void showDialogInner(int id) {
// TODO better fix for this? Remove dialog so that it gets created again
removeDialog(id);