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

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

Snap for 10204122 from 75acc339 to udc-qpr1-release

Change-Id: I47947a4cafdec0ee0f7d0a33d0dc885fe309bf02
parents 6158aae4 75acc339
Loading
Loading
Loading
Loading
+25 −21
Original line number Diff line number Diff line
@@ -2833,9 +2833,11 @@ public class Notification implements Parcelable
    }
    /**
     * Note all {@link Uri} that are referenced internally, with the expectation
     * that Uri permission grants will need to be issued to ensure the recipient
     * of this object is able to render its contents.
    * Note all {@link Uri} that are referenced internally, with the expectation that Uri permission
    * grants will need to be issued to ensure the recipient of this object is able to render its
    * contents.
    * See b/281044385 for more context and examples about what happens when this isn't done
    * correctly.
    *
    * @hide
    */
@@ -2882,13 +2884,13 @@ public class Notification implements Parcelable
            ArrayList<Person> people = extras.getParcelableArrayList(EXTRA_PEOPLE_LIST, android.app.Person.class);
            if (people != null && !people.isEmpty()) {
                for (Person p : people) {
                    visitor.accept(p.getIconUri());
                    p.visitUris(visitor);
                }
            }
            final Person person = extras.getParcelable(EXTRA_MESSAGING_PERSON, Person.class);
            if (person != null) {
                visitor.accept(person.getIconUri());
                person.visitUris(visitor);
            }
            final RemoteInputHistoryItem[] history = extras.getParcelableArray(
@@ -2910,12 +2912,7 @@ public class Notification implements Parcelable
            if (!ArrayUtils.isEmpty(messages)) {
                for (MessagingStyle.Message message : MessagingStyle.Message
                        .getMessagesFromBundleArray(messages)) {
                    visitor.accept(message.getDataUri());
                    Person senderPerson = message.getSenderPerson();
                    if (senderPerson != null) {
                        visitor.accept(senderPerson.getIconUri());
                    }
                    message.visitUris(visitor);
                }
            }
@@ -2924,12 +2921,7 @@ public class Notification implements Parcelable
            if (!ArrayUtils.isEmpty(historic)) {
                for (MessagingStyle.Message message : MessagingStyle.Message
                        .getMessagesFromBundleArray(historic)) {
                    visitor.accept(message.getDataUri());
                    Person senderPerson = message.getSenderPerson();
                    if (senderPerson != null) {
                        visitor.accept(senderPerson.getIconUri());
                    }
                    message.visitUris(visitor);
                }
            }
@@ -2939,7 +2931,7 @@ public class Notification implements Parcelable
        if (isStyle(CallStyle.class) & extras != null) {
            Person callPerson = extras.getParcelable(EXTRA_CALL_PERSON, Person.class);
            if (callPerson != null) {
                visitor.accept(callPerson.getIconUri());
                callPerson.visitUris(visitor);
            }
            visitIconUri(visitor, extras.getParcelable(EXTRA_VERIFICATION_ICON, Icon.class));
        }
@@ -8832,6 +8824,18 @@ public class Notification implements Parcelable
                return bundle;
            }
            /**
             * See {@link Notification#visitUris(Consumer)}.
             *
             * @hide
             */
            public void visitUris(@NonNull Consumer<Uri> visitor) {
                visitor.accept(getDataUri());
                if (mSender != null) {
                    mSender.visitUris(visitor);
                }
            }
            /**
             * Returns a list of messages read from the given bundle list, e.g.
             * {@link #EXTRA_MESSAGES} or {@link #EXTRA_HISTORIC_MESSAGES}.
+14 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.os.Parcel;
import android.os.Parcelable;

import java.util.Objects;
import java.util.function.Consumer;

/**
 * Provides an immutable reference to an entity that appears repeatedly on different surfaces of the
@@ -177,6 +178,19 @@ public final class Person implements Parcelable {
        dest.writeBoolean(mIsBot);
    }

    /**
     * Note all {@link Uri} that are referenced internally, with the expectation that Uri permission
     * grants will need to be issued to ensure the recipient of this object is able to render its
     * contents.
     * See b/281044385 for more context and examples about what happens when this isn't done
     * correctly.
     *
     * @hide
     */
    public void visitUris(@NonNull Consumer<Uri> visitor) {
        visitor.accept(getIconUri());
    }

    /** Builder for the immutable {@link Person} class. */
    public static class Builder {
        @Nullable private CharSequence mName;
+29 −1
Original line number Diff line number Diff line
@@ -110,6 +110,8 @@ public final class Light implements Parcelable {
    private final int mOrdinal;
    private final int mType;
    private final int mCapabilities;
    @Nullable
    private final int[] mPreferredBrightnessLevels;

    /**
     * Creates a new light with the given data.
@@ -117,7 +119,7 @@ public final class Light implements Parcelable {
     * @hide
     */
    public Light(int id, int ordinal, int type) {
        this(id, "Light", ordinal, type, 0);
        this(id, "Light", ordinal, type, 0, null);
    }

    /**
@@ -126,11 +128,22 @@ public final class Light implements Parcelable {
     * @hide
     */
    public Light(int id, String name, int ordinal, int type, int capabilities) {
        this(id, name, ordinal, type, capabilities, null);
    }

    /**
     * Creates a new light with the given data.
     *
     * @hide
     */
    public Light(int id, String name, int ordinal, int type, int capabilities,
            @Nullable int[] preferredBrightnessLevels) {
        mId = id;
        mName = name;
        mOrdinal = ordinal;
        mType = type;
        mCapabilities = capabilities;
        mPreferredBrightnessLevels = preferredBrightnessLevels;
    }

    private Light(@NonNull Parcel in) {
@@ -139,6 +152,7 @@ public final class Light implements Parcelable {
        mOrdinal = in.readInt();
        mType = in.readInt();
        mCapabilities = in.readInt();
        mPreferredBrightnessLevels = in.createIntArray();
    }

    /** Implement the Parcelable interface */
@@ -149,6 +163,7 @@ public final class Light implements Parcelable {
        dest.writeInt(mOrdinal);
        dest.writeInt(mType);
        dest.writeInt(mCapabilities);
        dest.writeIntArray(mPreferredBrightnessLevels);
    }

    /** Implement the Parcelable interface */
@@ -252,4 +267,17 @@ public final class Light implements Parcelable {
        return (mCapabilities & LIGHT_CAPABILITY_COLOR_RGB) == LIGHT_CAPABILITY_COLOR_RGB;
    }

    /**
     * Returns preferred brightness levels for the light which will be used when user
     * increase/decrease brightness levels for the light (currently only used for Keyboard
     * backlight control using backlight up/down keys).
     *
     * The values in the preferred brightness level array are in the range [0, 255].
     *
     * @hide
     */
    @Nullable
    public int[] getPreferredBrightnessLevels() {
        return mPreferredBrightnessLevels;
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -812,7 +812,7 @@ public class SpeechRecognizer {
            Intent recognizerIntent,
            Executor callbackExecutor,
            RecognitionSupportCallback recognitionSupportCallback) {
        if (!maybeInitializeManagerService()) {
        if (!maybeInitializeManagerService() || !checkOpenConnection()) {
            return;
        }
        try {
@@ -831,7 +831,7 @@ public class SpeechRecognizer {
            Intent recognizerIntent,
            @Nullable Executor callbackExecutor,
            @Nullable ModelDownloadListener modelDownloadListener) {
        if (!maybeInitializeManagerService()) {
        if (!maybeInitializeManagerService() || !checkOpenConnection()) {
            return;
        }

+1 −1
Original line number Diff line number Diff line
@@ -6967,7 +6967,7 @@ public final class ViewRootImpl implements ViewParent,

            int groupNavigationDirection = 0;

            if (event.getAction() == KeyEvent.ACTION_DOWN && event.isCtrlPressed()
            if (event.getAction() == KeyEvent.ACTION_DOWN
                    && event.getKeyCode() == KeyEvent.KEYCODE_TAB) {
                if (KeyEvent.metaStateHasModifiers(event.getMetaState(), KeyEvent.META_CTRL_ON)) {
                    groupNavigationDirection = View.FOCUS_FORWARD;
Loading