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

Commit d71956be authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/24140525',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/24140525', 'googleplex-android-review.googlesource.com/24212510', 'googleplex-android-review.googlesource.com/24215103'] into udc-release.

Change-Id: Ifa2fe93a03f73d97d2e0eb0255570e4ba6400ced
parents dc90112c 5ea7e53c
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -233,6 +233,24 @@ public abstract class PackageManager {
    public static final String PROPERTY_COMPAT_OVERRIDE_LANDSCAPE_TO_PORTRAIT =
            "android.camera.PROPERTY_COMPAT_OVERRIDE_LANDSCAPE_TO_PORTRAIT";

    /**
     * Application level {@link android.content.pm.PackageManager.Property PackageManager
     * .Property} for a privileged system installer to define a list of up to 500 packages that
     * should not have their updates owned by any installer. The list must be provided via a default
     * XML resource with the following format:
     *
     * <pre>
     * &lt;deny-ownership&gt;PACKAGE_NAME&lt;/deny-ownership&gt;
     * &lt;deny-ownership&gt;PACKAGE_NAME&lt;/deny-ownership&gt;
     * </pre>
     *
     * <b>NOTE:</b> Installers that provide this property will not granted update ownership for any
     * packages that they request update ownership of.
     * @hide
     */
    public static final String PROPERTY_LEGACY_UPDATE_OWNERSHIP_DENYLIST =
            "android.app.PROPERTY_LEGACY_UPDATE_OWNERSHIP_DENYLIST";

    /**
     * A property value set within the manifest.
     * <p>
+5 −3
Original line number Diff line number Diff line
@@ -2816,12 +2816,14 @@
    <bool name="config_multiuserDelayUserDataLocking">false</bool>

    <!-- Whether the device allows users to start in background visible on displays.
         Should be false for most devices, except automotive vehicle with passenger displays. -->
         Should be false for all devices in production. Can be enabled only for development use
         in automotive vehicles with passenger displays. -->
    <bool name="config_multiuserVisibleBackgroundUsers">false</bool>

    <!-- Whether the device allows users to start in background visible on the default display.
         Should be false for most devices, except passenger-only automotive build (i.e., when
         Android runs in a separate system in the back seat to manage the passenger displays).
         Should be false for all devices in production. Can be enabled only for development use
         in passenger-only automotive build (i.e., when Android runs in a separate system in the
         back seat to manage the passenger displays).
         When set to true, config_multiuserVisibleBackgroundUsers must also be true. -->
    <bool name="config_multiuserVisibleBackgroundUsersOnDefaultDisplay">false</bool>

+0 −3
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@
            android:layout_width="@dimen/dream_overlay_status_bar_icon_size"
            android:layout_height="match_parent"
            android:layout_marginStart="@dimen/dream_overlay_status_icon_margin"
            android:layout_marginTop="@dimen/dream_overlay_status_bar_marginTop"
            android:src="@drawable/ic_alarm"
            android:tint="@android:color/white"
            android:visibility="gone"
@@ -68,7 +67,6 @@
            android:layout_width="@dimen/dream_overlay_status_bar_icon_size"
            android:layout_height="match_parent"
            android:layout_marginStart="@dimen/dream_overlay_status_icon_margin"
            android:layout_marginTop="@dimen/dream_overlay_status_bar_marginTop"
            android:src="@drawable/ic_qs_dnd_on"
            android:tint="@android:color/white"
            android:visibility="gone"
@@ -79,7 +77,6 @@
            android:layout_width="@dimen/dream_overlay_status_bar_icon_size"
            android:layout_height="match_parent"
            android:layout_marginStart="@dimen/dream_overlay_status_icon_margin"
            android:layout_marginTop="@dimen/dream_overlay_status_bar_marginTop"
            android:src="@drawable/ic_signal_wifi_off"
            android:visibility="gone"
            android:contentDescription="@string/dream_overlay_status_bar_wifi_off" />
+0 −1
Original line number Diff line number Diff line
@@ -1781,7 +1781,6 @@
    <dimen name="dream_overlay_status_bar_ambient_text_shadow_dy">0.5dp</dimen>
    <dimen name="dream_overlay_status_bar_ambient_text_shadow_radius">2dp</dimen>
    <dimen name="dream_overlay_icon_inset_dimen">0dp</dimen>
    <dimen name="dream_overlay_status_bar_marginTop">22dp</dimen>

    <!-- Default device corner radius, used for assist UI -->
    <dimen name="config_rounded_mask_size">0px</dimen>
+26 −2
Original line number Diff line number Diff line
@@ -166,6 +166,7 @@ import com.android.internal.util.CollectionUtils;
import com.android.internal.util.FrameworkStatsLog;
import com.android.server.EventLogTags;
import com.android.server.LocalManagerRegistry;
import com.android.server.SystemConfig;
import com.android.server.art.model.DexoptParams;
import com.android.server.art.model.DexoptResult;
import com.android.server.pm.Installer.LegacyDexoptDisabledException;
@@ -230,6 +231,7 @@ final class InstallPackageHelper {
    private final ViewCompiler mViewCompiler;
    private final SharedLibrariesImpl mSharedLibraries;
    private final PackageManagerServiceInjector mInjector;
    private final UpdateOwnershipHelper mUpdateOwnershipHelper;

    // TODO(b/198166813): remove PMS dependency
    InstallPackageHelper(PackageManagerService pm, AppDataHelper appDataHelper) {
@@ -247,6 +249,7 @@ final class InstallPackageHelper {
        mPackageAbiHelper = pm.mInjector.getAbiHelper();
        mViewCompiler = pm.mInjector.getViewCompiler();
        mSharedLibraries = pm.mInjector.getSharedLibrariesImpl();
        mUpdateOwnershipHelper = pm.mInjector.getUpdateOwnershipHelper();
    }

    InstallPackageHelper(PackageManagerService pm) {
@@ -332,6 +335,8 @@ final class InstallPackageHelper {
        final String updateOwnerFromSysconfig = isApex || !pkgSetting.isSystem() ? null
                : mPm.mInjector.getSystemConfig().getSystemAppUpdateOwnerPackageName(
                        parsedPackage.getPackageName());
        final boolean isUpdateOwnershipDenylisted =
                mUpdateOwnershipHelper.isUpdateOwnershipDenylisted(parsedPackage.getPackageName());
        final boolean isUpdateOwnershipEnabled = oldUpdateOwner != null;

        // For standard install (install via session), the installSource isn't null.
@@ -367,6 +372,9 @@ final class InstallPackageHelper {
                        & PackageManager.INSTALL_REQUEST_UPDATE_OWNERSHIP) != 0;
                final boolean isSameUpdateOwner =
                        TextUtils.equals(oldUpdateOwner, installSource.mInstallerPackageName);
                final boolean isInstallerUpdateOwnerDenylistProvider =
                        mUpdateOwnershipHelper.isUpdateOwnershipDenyListProvider(
                                installSource.mUpdateOwnerPackageName);

                // Here we handle the update owner for the package, and the rules are:
                // -. Only enabling update ownership enforcement on initial installation if the
@@ -374,13 +382,16 @@ final class InstallPackageHelper {
                // -. Once the installer changes and users agree to proceed, clear the update
                //    owner (package state in other users are taken into account as well).
                if (!isUpdate) {
                    if (!isRequestUpdateOwnership) {
                    if (!isRequestUpdateOwnership
                            || isUpdateOwnershipDenylisted
                            || isInstallerUpdateOwnerDenylistProvider) {
                        installSource = installSource.setUpdateOwnerPackageName(null);
                    } else if ((!isUpdateOwnershipEnabled && pkgAlreadyExists)
                            || (isUpdateOwnershipEnabled && !isSameUpdateOwner)) {
                        installSource = installSource.setUpdateOwnerPackageName(null);
                    }
                } else if (!isSameUpdateOwner || !isUpdateOwnershipEnabled) {
                } else if (!isSameUpdateOwner
                        || !isUpdateOwnershipEnabled) {
                    installSource = installSource.setUpdateOwnerPackageName(null);
                }
            }
@@ -473,6 +484,19 @@ final class InstallPackageHelper {
            pkgSetting.setLoadingProgress(1f);
        }

        ArraySet<String> listItems = mUpdateOwnershipHelper.readUpdateOwnerDenyList(pkgSetting);
        if (listItems != null && !listItems.isEmpty()) {
            mUpdateOwnershipHelper.addToUpdateOwnerDenyList(pkgSetting.getPackageName(), listItems);
            for (String unownedPackage : listItems) {
                PackageSetting unownedSetting = mPm.mSettings.getPackageLPr(unownedPackage);
                SystemConfig config = SystemConfig.getInstance();
                if (unownedSetting != null
                        && config.getSystemAppUpdateOwnerPackageName(unownedPackage) == null) {
                    unownedSetting.setUpdateOwnerPackage(null);
                }
            }
        }

        return pkg;
    }

Loading