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

Commit 690350a4 authored by Sumedh Sen's avatar Sumedh Sen Committed by Automerger Merge Worker
Browse files

Merge "Remove the resolved path of session's APK from user confirmation...

Merge "Remove the resolved path of session's APK from user confirmation intent" into udc-dev am: 7fbad46a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22721812



Change-Id: I168a992ce973c6087b341f5a39f1530631a0b444
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b31c4be2 7fbad46a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -3553,6 +3553,18 @@ public class PackageInstaller {
            return referrerUri;
        }

        /**
         * @return the path to the validated base APK for this session, which may point at an
         * APK inside the session (when the session defines the base), or it may
         * point at the existing base APK (when adding splits to an existing app).
         *
         * @hide
         */
        @RequiresPermission(Manifest.permission.READ_INSTALLED_SESSION_PATHS)
        public @Nullable String getResolvedBaseApkPath() {
            return resolvedBaseCodePath;
        }

        /**
         * Get the value set in {@link SessionParams#setGrantedRuntimePermissions(String[])}.
         *
+9 −0
Original line number Diff line number Diff line
@@ -5418,6 +5418,15 @@
    <permission android:name="android.permission.INSTALL_DPC_PACKAGES"
                android:protectionLevel="signature|role" />

    <!-- Allows an application to read resolved paths to the APKs (Base and any splits)
         of a session based install.
         <p>Not for use by third-party applications.
         @hide
    -->
    <permission android:name="android.permission.READ_INSTALLED_SESSION_PATHS"
                android:protectionLevel="signature|installer" />
    <uses-permission android:name="android.permission.READ_INSTALLED_SESSION_PATHS" />

    <!-- Allows an application to use System Data Loaders.
         <p>Not for use by third-party applications.
         @hide
+3 −6
Original line number Diff line number Diff line
@@ -39,8 +39,7 @@ android_app {

    certificate: "platform",
    privileged: true,
    platform_apis: false,
    sdk_version: "system_current",
    platform_apis: true,
    rename_resources_package: false,
    static_libs: [
        "xz-java",
@@ -57,8 +56,7 @@ android_app {

    certificate: "platform",
    privileged: true,
    platform_apis: false,
    sdk_version: "system_current",
    platform_apis: true,
    rename_resources_package: false,
    overrides: ["PackageInstaller"],

@@ -77,8 +75,7 @@ android_app {

    certificate: "platform",
    privileged: true,
    platform_apis: false,
    sdk_version: "system_current",
    platform_apis: true,
    rename_resources_package: false,
    overrides: ["PackageInstaller"],

+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
    <uses-permission android:name="android.permission.INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.DELETE_PACKAGES" />
    <uses-permission android:name="android.permission.READ_INSTALL_SESSIONS" />
    <uses-permission android:name="android.permission.READ_INSTALLED_SESSION_PATHS" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS" />
    <uses-permission android:name="android.permission.USE_RESERVED_DISK" />
+3 −4
Original line number Diff line number Diff line
@@ -375,16 +375,15 @@ public class PackageInstallerActivity extends AlertActivity {
            final int sessionId = intent.getIntExtra(PackageInstaller.EXTRA_SESSION_ID,
                    -1 /* defaultValue */);
            final SessionInfo info = mInstaller.getSessionInfo(sessionId);
            final String resolvedBaseCodePath = intent.getStringExtra(
                    PackageInstaller.EXTRA_RESOLVED_BASE_PATH);
            if (info == null || !info.isSealed() || resolvedBaseCodePath == null) {
            String resolvedPath = info.getResolvedBaseApkPath();
            if (info == null || !info.isSealed() || resolvedPath == null) {
                Log.w(TAG, "Session " + mSessionId + " in funky state; ignoring");
                finish();
                return;
            }

            mSessionId = sessionId;
            packageSource = Uri.fromFile(new File(resolvedBaseCodePath));
            packageSource = Uri.fromFile(new File(resolvedPath));
            mOriginatingURI = null;
            mReferrerURI = null;
            mPendingUserActionReason = info.getPendingUserActionReason();
Loading