summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Blaesius <skate4life@gmx.de>2017-12-10 10:29:58 (GMT)
committerHarry Youd <harry@harryyoud.co.uk>2017-12-23 16:39:01 (GMT)
commit5eac860176e28a8a93642c5e79e16b3bd43178ae (patch)
treed321d5062b0024aa5c8f6c8b5f78a7f5739a55bb
parent9e5edc0e35aee177e44ae9dff33480cf83d04f38 (diff)
downloadandroid_packages_apps_PackageInstaller-5eac860176e28a8a93642c5e79e16b3bd43178ae.zip
android_packages_apps_PackageInstaller-5eac860176e28a8a93642c5e79e16b3bd43178ae.tar.gz
android_packages_apps_PackageInstaller-5eac860176e28a8a93642c5e79e16b3bd43178ae.tar.bz2
Revert "Revert "DO NOT MERGE Disable overlays while installer is resumed""
This reverts commit 54b91b04a2dd9da928230eeb9d62a43fc40eefe4. Change-Id: I0f207b7de5675595a07416aef169985bc322372f
-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 868872a..7cf5189 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;
@@ -52,6 +51,8 @@ import android.widget.Button;
import android.widget.TabHost;
import android.widget.TextView;
+import com.android.packageinstaller.permission.ui.OverlayTouchActivity;
+
import java.io.File;
import java.util.List;
@@ -65,7 +66,8 @@ import java.util.List;
* 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 int mSessionId = -1;
@@ -583,6 +585,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);
+ }
+ }
+
/** Get the ApplicationInfo for the calling package, if available */
private ApplicationInfo getSourceInfo() {
String callingPackage = getCallingPackage();