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

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

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

Merge cherrypicks of ['googleplex-android-review.googlesource.com/28498672', 'googleplex-android-review.googlesource.com/28823468', 'googleplex-android-review.googlesource.com/28696275', 'googleplex-android-review.googlesource.com/28718563'] into security-aosp-24Q3-release.

Change-Id: I6755c02e4491b6e848c08ea70066a58ab252f99e
parents f5fc2022 1d68d454
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -189,12 +189,10 @@ public final class Person implements Parcelable {
     */
    public void visitUris(@NonNull Consumer<Uri> visitor) {
        visitor.accept(getIconUri());
        if (Flags.visitPersonUri()) {
        if (mUri != null && !mUri.isEmpty()) {
            visitor.accept(Uri.parse(mUri));
        }
    }
    }

    /** Builder for the immutable {@link Person} class. */
    public static class Builder {
+4 −0
Original line number Diff line number Diff line
@@ -1233,6 +1233,10 @@ public class AccountManagerService
                            obsoleteAuthType.add(type);
                            // And delete it from the TABLE_META
                            accountsDb.deleteMetaByAuthTypeAndUid(type, uid);
                        } else if (knownUid != null && knownUid != uid) {
                            Slog.w(TAG, "authenticator no longer exist for type " + type);
                            obsoleteAuthType.add(type);
                            accountsDb.deleteMetaByAuthTypeAndUid(type, uid);
                        }
                    }
                }
+5 −1
Original line number Diff line number Diff line
@@ -686,6 +686,9 @@ final class InstallPackageHelper {
                    (installFlags & PackageManager.INSTALL_INSTANT_APP) != 0;
            final boolean fullApp =
                    (installFlags & PackageManager.INSTALL_FULL_APP) != 0;
            final boolean isPackageDeviceAdmin = mPm.isPackageDeviceAdmin(packageName, userId);
            final boolean isProtectedPackage = mPm.mProtectedPackages != null
                    && mPm.mProtectedPackages.isPackageStateProtected(userId, packageName);

            // writer
            synchronized (mPm.mLock) {
@@ -694,7 +697,8 @@ final class InstallPackageHelper {
                if (pkgSetting == null || pkgSetting.getPkg() == null) {
                    return Pair.create(PackageManager.INSTALL_FAILED_INVALID_URI, intentSender);
                }
                if (instantApp && (pkgSetting.isSystem() || pkgSetting.isUpdatedSystemApp())) {
                if (instantApp && (pkgSetting.isSystem() || pkgSetting.isUpdatedSystemApp()
                        || isPackageDeviceAdmin || isProtectedPackage)) {
                    return Pair.create(PackageManager.INSTALL_FAILED_INVALID_URI, intentSender);
                }
                if (!snapshot.canViewInstantApps(callingUid, UserHandle.getUserId(callingUid))) {
+9 −4
Original line number Diff line number Diff line
@@ -78,9 +78,9 @@ import android.os.storage.StorageVolume;
import android.provider.Settings;
import android.service.usb.UsbDeviceManagerProto;
import android.service.usb.UsbHandlerProto;
import android.text.TextUtils;
import android.util.Pair;
import android.util.Slog;
import android.text.TextUtils;

import com.android.internal.annotations.GuardedBy;
import com.android.internal.logging.MetricsLogger;
@@ -838,7 +838,7 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
            }
        }

        private void notifyAccessoryModeExit(int operationId) {
        protected void notifyAccessoryModeExit(int operationId) {
            // make sure accessory mode is off
            // and restore default functions
            Slog.d(TAG, "exited USB accessory mode");
@@ -2271,9 +2271,14 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
                     */
                    operationId = sUsbOperationCount.incrementAndGet();
                    if (msg.arg1 != 1) {
                        // Set this since default function may be selected from Developer options
                        if (mCurrentFunctions == UsbManager.FUNCTION_ACCESSORY) {
                            notifyAccessoryModeExit(operationId);
                        } else {
                            // Set this since default function may be selected from Developer
                            // options
                            setEnabledFunctions(mScreenUnlockedFunctions, false, operationId);
                        }
                    }
                    break;
                case MSG_GADGET_HAL_REGISTERED:
                    boolean preexisting = msg.arg1 == 1;