summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Song Chun Fan <schfan@google.com> 2024-02-24 05:45:17 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-02-24 05:45:17 +0000
commit0f8f3c77e6ca827c5063328e9b357a04e172afa4 (patch)
tree788f831b9b3931c5839d02728cd3195c62ca1abc
parentea0c498c63b10c0e13cb47dd4f5d243018216474 (diff)
parentcf4e62bce4856ce3dbec35c5dc4c1bf3cebbf711 (diff)
Merge "Fix unknown sources app install confirmation" into main
-rw-r--r--packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java b/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java
index 8cb25dc637d4..bb05a75d8306 100644
--- a/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java
@@ -368,7 +368,7 @@ public class PackageInstallerActivity extends AlertActivity {
final SessionInfo info = mInstaller.getSessionInfo(sessionId);
String resolvedPath = info != null ? info.getResolvedBaseApkPath() : null;
if (info == null || !info.isSealed() || resolvedPath == null) {
- Log.w(TAG, "Session " + mSessionId + " in funky state; ignoring");
+ Log.w(TAG, "Session " + sessionId + " in funky state; ignoring");
finish();
return;
}
@@ -383,7 +383,7 @@ public class PackageInstallerActivity extends AlertActivity {
-1 /* defaultValue */);
final SessionInfo info = mInstaller.getSessionInfo(sessionId);
if (info == null || !info.isPreApprovalRequested()) {
- Log.w(TAG, "Session " + mSessionId + " in funky state; ignoring");
+ Log.w(TAG, "Session " + sessionId + " in funky state; ignoring");
finish();
return;
}
@@ -797,7 +797,9 @@ public class PackageInstallerActivity extends AlertActivity {
// work for the multiple user case, i.e. the caller task user and started
// Activity user are not the same. To avoid having multiple PIAs in the task,
// finish the current PackageInstallerActivity
- finish();
+ // Because finish() is overridden to set the installation result, we must use
+ // the original finish() method, or the confirmation dialog fails to appear.
+ PackageInstallerActivity.super.finish();
}
}, 500);