diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-09-15 19:22:29 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-09-15 19:22:29 +0000 |
commit | 94d8bf45e991f9071ae7e3a8982194fb56300920 (patch) | |
tree | 9c8bb346332597ea90287c5af9b2f97efec92a6d | |
parent | 5c49b6bf732c88481466dea341917b8604ce53fa (diff) | |
parent | c18d583b2c741c126ed201ace4d85636375459ec (diff) | |
download | PackageInstaller-nougat-mr1.7-release.tar.gz |
release-request-b6ec1e5a-8dd9-44a3-97f9-f374a706d9ac-for-git_nyc-mr1-security-g-release-4299435 snap-temp-L65100000103194273android-7.1.1_r57nougat-mr1.7-release
Change-Id: I702f7a7b9d73b0801685565a66585c75d054e586
-rw-r--r-- | src/com/android/packageinstaller/PackageInstallerActivity.java | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/com/android/packageinstaller/PackageInstallerActivity.java b/src/com/android/packageinstaller/PackageInstallerActivity.java index 55a1f814e..c419964d5 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); |