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

Commit 41e539ab authored by /e/ robot's avatar /e/ robot
Browse files

Merge remote-tracking branch 'origin/lineage-20.0' into v1-t

parents bc4ca1c7 ff380f86
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