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

Unverified Commit ff380f86 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'android-13.0.0_r61' into staging/lineage-20.0_merge-android-13.0.0_r61

Android 13.0.0 release 61

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZKXIxgAKCRDorT+BmrEO
# eOrBAJ4r/PVVAww6QOgnk1nW8wS7WfKbsgCfRGkNgCyjxzskKiGrUt0kRVwXDYg=
# =o83k
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Jul  5 22:47:18 2023 EEST
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [marginal]
# gpg: initial-contribution@android.com: Verified 1767 signatures in the past
#      20 months.  Encrypted 4 messages in the past 18 months.
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 4340 D135 70EF 945E 8381  0964 E8AD 3F81 9AB1 0E78

# By Winson Chung (3) and others
# Via Android Build Coastguard Worker
* tag 'android-13.0.0_r61':
  Visit URIs in landscape/portrait custom remote views.
  [RESTRICT AUTOMERGE] Prevent installing apps in policy restricted work profile using ADB
  Verify URI permissions for EXTRA_REMOTE_INPUT_HISTORY_ITEMS.
  [1-time permissions] Use internal api to check proc states
  Watch uid proc state instead of importance for 1-time permissions
  Truncate ShortcutInfo Id
  Dismiss keyguard when simpin auth'd and...
  Only allow NEW_TASK flag when adjusting pending intents
  Grant URI permissions to the CallStyle-related ones
  Revert "Ensure that only SysUI can override pending intent launch flags"
  Ensure that only SysUI can override pending intent launch flags

Change-Id: I29b7d1f00e70e436bb12fd2b860f7f7a7cba3b19
parents 6cc26342 3169dfcf
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ import static android.Manifest.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIO
import static android.Manifest.permission.START_TASKS_FROM_RECENTS;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.Intent.FLAG_RECEIVER_FOREGROUND;
import static android.view.Display.INVALID_DISPLAY;

import android.annotation.IntDef;
@@ -1727,7 +1729,9 @@ public class ActivityOptions extends ComponentOptions {
     * @hide
     */
    public int getPendingIntentLaunchFlags() {
        return mPendingIntentLaunchFlags;
        // b/243794108: Ignore all flags except the new task flag, to be reconsidered in b/254490217
        return mPendingIntentLaunchFlags &
                (FLAG_ACTIVITY_NEW_TASK | FLAG_RECEIVER_FOREGROUND);
    }

    /**
+19 −0
Original line number Diff line number Diff line
@@ -2853,6 +2853,17 @@ public class Notification implements Parcelable
            if (person != null) {
                visitor.accept(person.getIconUri());
            }
            final RemoteInputHistoryItem[] history = (RemoteInputHistoryItem[])
                    extras.getParcelableArray(Notification.EXTRA_REMOTE_INPUT_HISTORY_ITEMS);
            if (history != null) {
                for (int i = 0; i < history.length; i++) {
                    RemoteInputHistoryItem item = history[i];
                    if (item.getUri() != null) {
                        visitor.accept(item.getUri());
                    }
                }
            }
        }
        if (isStyle(MessagingStyle.class) && extras != null) {
@@ -2883,6 +2894,14 @@ public class Notification implements Parcelable
            }
        }
        if (isStyle(CallStyle.class) & extras != null) {
            Person callPerson = extras.getParcelable(EXTRA_CALL_PERSON);
            if (callPerson != null) {
                visitor.accept(callPerson.getIconUri());
            }
            visitIconUri(visitor, extras.getParcelable(EXTRA_VERIFICATION_ICON));
        }
        if (mBubbleMetadata != null) {
            visitIconUri(visitor, mBubbleMetadata.getIcon());
        }
+17 −3
Original line number Diff line number Diff line
@@ -283,6 +283,12 @@ public final class ShortcutInfo implements Parcelable {
     */
    public static final int DISABLED_REASON_OTHER_RESTORE_ISSUE = 103;

    /**
     * The maximum length of Shortcut ID. IDs will be truncated at this limit.
     * @hide
     */
    public static final int MAX_ID_LENGTH = 1000;

    /** @hide */
    @IntDef(prefix = { "DISABLED_REASON_" }, value = {
            DISABLED_REASON_NOT_DISABLED,
@@ -475,8 +481,7 @@ public final class ShortcutInfo implements Parcelable {

    private ShortcutInfo(Builder b) {
        mUserId = b.mContext.getUserId();

        mId = Preconditions.checkStringNotEmpty(b.mId, "Shortcut ID must be provided");
        mId = getSafeId(Preconditions.checkStringNotEmpty(b.mId, "Shortcut ID must be provided"));

        // Note we can't do other null checks here because SM.updateShortcuts() takes partial
        // information.
@@ -582,6 +587,14 @@ public final class ShortcutInfo implements Parcelable {
        return ret;
    }

    @NonNull
    private static String getSafeId(@NonNull String id) {
        if (id.length() > MAX_ID_LENGTH) {
            return id.substring(0, MAX_ID_LENGTH);
        }
        return id;
    }

    /**
     * Throws if any of the mandatory fields is not set.
     *
@@ -2336,7 +2349,8 @@ public final class ShortcutInfo implements Parcelable {
        final ClassLoader cl = getClass().getClassLoader();

        mUserId = source.readInt();
        mId = source.readString8();
        mId = getSafeId(Preconditions.checkStringNotEmpty(source.readString8(),
                "Shortcut ID must be provided"));
        mPackageName = source.readString8();
        mActivity = source.readParcelable(cl, android.content.ComponentName.class);
        mFlags = source.readInt();
+1 −2
Original line number Diff line number Diff line
@@ -77,8 +77,7 @@ interface IPermissionManager {
    List<SplitPermissionInfoParcelable> getSplitPermissions();

    void startOneTimePermissionSession(String packageName, int userId, long timeout,
            long revokeAfterKilledDelay, int importanceToResetTimer,
            int importanceToKeepSessionAlive);
            long revokeAfterKilledDelay);

    void stopOneTimePermissionSession(String packageName, int userId);

+1 −2
Original line number Diff line number Diff line
@@ -1388,8 +1388,7 @@ public final class PermissionManager {
            @ActivityManager.RunningAppProcessInfo.Importance int importanceToKeepSessionAlive) {
        try {
            mPermissionManager.startOneTimePermissionSession(packageName, mContext.getUserId(),
                    timeoutMillis, revokeAfterKilledDelayMillis, importanceToResetTimer,
                    importanceToKeepSessionAlive);
                    timeoutMillis, revokeAfterKilledDelayMillis);
        } catch (RemoteException e) {
            e.rethrowFromSystemServer();
        }
Loading