Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f8f3c77 authored by Song Chun Fan's avatar Song Chun Fan Committed by Gerrit Code Review
Browse files

Merge "Fix unknown sources app install confirmation" into main

parents ea0c498c cf4e62bc
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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);