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

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

Snap for 9075033 from b25a29ed to tm-qpr1-release

Change-Id: Id8b0d2ca0cb839c298054b2ce5169b8b59bf31de
parents 3a62437e b25a29ed
Loading
Loading
Loading
Loading
+1 −31
Original line number Diff line number Diff line
@@ -830,29 +830,8 @@ public abstract class VibrationEffect implements Parcelable {
     *     .addPrimitive(VibrationEffect.Composition.PRIMITIVE_TICK, 1.0f, 100)
     *     .compose();}</pre>
     *
     * <p>Composition elements can also be {@link VibrationEffect} instances, including other
     * compositions, and off durations, which are periods of time when the vibrator will be
     * turned off. Here is an example of a composition that "warms up" with a light tap,
     * a stronger double tap, then repeats a vibration pattern indefinitely:
     *
     * <pre>
     * {@code VibrationEffect repeatingEffect = VibrationEffect.startComposition()
     *     .addPrimitive(VibrationEffect.Composition.PRIMITIVE_LOW_TICK)
     *     .addOffDuration(Duration.ofMillis(10))
     *     .addEffect(VibrationEffect.createPredefined(VibrationEffect.EFFECT_DOUBLE_CLICK))
     *     .addOffDuration(Duration.ofMillis(50))
     *     .addEffect(VibrationEffect.createWaveform(pattern, repeatIndex))
     *     .compose();}</pre>
     *
     * <p>When choosing to play a composed effect, you should check that individual components are
     * supported by the device by using the appropriate vibrator method:
     *
     * <ul>
     *     <li>Primitive support can be checked using {@link Vibrator#arePrimitivesSupported}.
     *     <li>Effect support can be checked using {@link Vibrator#areEffectsSupported}.
     *     <li>Amplitude control for one-shot and waveforms with amplitude values can be checked
     *         using {@link Vibrator#hasAmplitudeControl}.
     * </ul>
     * supported by the device by using {@link Vibrator#arePrimitivesSupported}.
     *
     * @see VibrationEffect#startComposition()
     */
@@ -1021,9 +1000,6 @@ public abstract class VibrationEffect implements Parcelable {
         *
         * @param primitiveId The primitive to add
         * @return This {@link Composition} object to enable adding multiple elements in one chain.
         *
         * @throws UnreachableAfterRepeatingIndefinitelyException if the composition is currently
         * ending with a repeating effect.
         */
        @NonNull
        public Composition addPrimitive(@PrimitiveType int primitiveId) {
@@ -1038,9 +1014,6 @@ public abstract class VibrationEffect implements Parcelable {
         * @param primitiveId The primitive to add
         * @param scale The scale to apply to the intensity of the primitive.
         * @return This {@link Composition} object to enable adding multiple elements in one chain.
         *
         * @throws UnreachableAfterRepeatingIndefinitelyException if the composition is currently
         * ending with a repeating effect.
         */
        @NonNull
        public Composition addPrimitive(@PrimitiveType int primitiveId,
@@ -1056,9 +1029,6 @@ public abstract class VibrationEffect implements Parcelable {
         * @param delay The amount of time in milliseconds to wait before playing this primitive,
         *              starting at the time the previous element in this composition is finished.
         * @return This {@link Composition} object to enable adding multiple elements in one chain.
         *
         * @throws UnreachableAfterRepeatingIndefinitelyException if the composition is currently
         * ending with a repeating effect.
         */
        @NonNull
        public Composition addPrimitive(@PrimitiveType int primitiveId,
+4 −2
Original line number Diff line number Diff line
@@ -3064,7 +3064,8 @@ public final class ViewRootImpl implements ViewParent,
                // WindowManagerService has reported back a frame from a configuration not yet
                // handled by the client. In this case, we need to accept the configuration so we
                // do not lay out and draw with the wrong configuration.
                if (!mPendingMergedConfiguration.equals(mLastReportedMergedConfiguration)) {
                if (mRelayoutRequested
                        && !mPendingMergedConfiguration.equals(mLastReportedMergedConfiguration)) {
                    if (DEBUG_CONFIGURATION) Log.v(mTag, "Visible with new config: "
                            + mPendingMergedConfiguration.getMergedConfiguration());
                    performConfigurationChange(new MergedConfiguration(mPendingMergedConfiguration),
@@ -8085,7 +8086,8 @@ public final class ViewRootImpl implements ViewParent,
        final int measuredWidth = mView.getMeasuredWidth();
        final int measuredHeight = mView.getMeasuredHeight();
        final boolean relayoutAsync;
        if (LOCAL_LAYOUT && !mFirst && viewVisibility == mViewVisibility
        if (LOCAL_LAYOUT
                && (mViewFrameInfo.flags & FrameInfo.FLAG_WINDOW_VISIBILITY_CHANGED) == 0
                && mWindowAttributes.type != TYPE_APPLICATION_STARTING
                && mSyncSeqId <= mLastSyncSeqId
                && winConfigFromAm.diff(winConfigFromWm, false /* compareUndefined */) == 0) {
+16 −9
Original line number Diff line number Diff line
@@ -709,7 +709,7 @@ public class Editor {
        }

        getPositionListener().addSubscriber(mCursorAnchorInfoNotifier, true);
        resumeBlink();
        makeBlink();
    }

    void onDetachedFromWindow() {
@@ -1685,17 +1685,12 @@ public class Editor {

    void onWindowFocusChanged(boolean hasWindowFocus) {
        if (hasWindowFocus) {
            if (mBlink != null) {
                mBlink.uncancel();
                makeBlink();
            }
            resumeBlink();
            if (mTextView.hasSelection() && !extractedTextModeWillBeStarted()) {
                refreshTextActionMode();
            }
        } else {
            if (mBlink != null) {
                mBlink.cancel();
            }
            suspendBlink();
            if (mInputContentType != null) {
                mInputContentType.enterDown = false;
            }
@@ -2851,7 +2846,8 @@ public class Editor {
     * @return True when the TextView isFocused and has a valid zero-length selection (cursor).
     */
    private boolean shouldBlink() {
        if (!isCursorVisible() || !mTextView.isFocused()) return false;
        if (!isCursorVisible() || !mTextView.isFocused()
                || mTextView.getWindowVisibility() != mTextView.VISIBLE) return false;

        final int start = mTextView.getSelectionStart();
        if (start < 0) return false;
@@ -2873,6 +2869,17 @@ public class Editor {
        }
    }

    /**
     *
     * @return whether the Blink runnable is blinking or not, if null return false.
     * @hide
     */
    @VisibleForTesting
    public boolean isBlinking() {
        if (mBlink == null) return false;
        return !mBlink.mCancelled;
    }

    private class Blink implements Runnable {
        private boolean mCancelled;

+25 −16
Original line number Diff line number Diff line
@@ -110,11 +110,11 @@ public final class TransitionInfo implements Parcelable {
    /** The container is an input-method window. */
    public static final int FLAG_IS_INPUT_METHOD = 1 << 8;

    /** The container is ActivityEmbedding embedded. */
    public static final int FLAG_IS_EMBEDDED = 1 << 9;
    /** The container is in a Task with embedded activity. */
    public static final int FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY = 1 << 9;

    /** The first unused bit. This can be used by remotes to attach custom flags to this change. */
    public static final int FLAG_FIRST_CUSTOM = 1 << 10;
    /** The container fills its parent Task before and after the transition. */
    public static final int FLAG_FILLS_TASK = 1 << 10;

    /** The container is going to show IME on its task after the transition. */
    public static final int FLAG_WILL_IME_SHOWN = 1 << 11;
@@ -125,6 +125,9 @@ public final class TransitionInfo implements Parcelable {
    /** The container attaches work profile thumbnail for cross profile animation. */
    public static final int FLAG_CROSS_PROFILE_WORK_THUMBNAIL = 1 << 13;

    /** The first unused bit. This can be used by remotes to attach custom flags to this change. */
    public static final int FLAG_FIRST_CUSTOM = 1 << 14;

    /** @hide */
    @IntDef(prefix = { "FLAG_" }, value = {
            FLAG_NONE,
@@ -137,9 +140,12 @@ public final class TransitionInfo implements Parcelable {
            FLAG_OCCLUDES_KEYGUARD,
            FLAG_DISPLAY_HAS_ALERT_WINDOWS,
            FLAG_IS_INPUT_METHOD,
            FLAG_IS_EMBEDDED,
            FLAG_FIRST_CUSTOM,
            FLAG_WILL_IME_SHOWN
            FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY,
            FLAG_FILLS_TASK,
            FLAG_WILL_IME_SHOWN,
            FLAG_CROSS_PROFILE_OWNER_THUMBNAIL,
            FLAG_CROSS_PROFILE_WORK_THUMBNAIL,
            FLAG_FIRST_CUSTOM
    })
    public @interface ChangeFlags {}

@@ -322,28 +328,31 @@ public final class TransitionInfo implements Parcelable {
            sb.append("IS_INPUT_METHOD");
        }
        if ((flags & FLAG_TRANSLUCENT) != 0) {
            sb.append((sb.length() == 0 ? "" : "|") + "TRANSLUCENT");
            sb.append(sb.length() == 0 ? "" : "|").append("TRANSLUCENT");
        }
        if ((flags & FLAG_STARTING_WINDOW_TRANSFER_RECIPIENT) != 0) {
            sb.append((sb.length() == 0 ? "" : "|") + "STARTING_WINDOW_TRANSFER");
            sb.append(sb.length() == 0 ? "" : "|").append("STARTING_WINDOW_TRANSFER");
        }
        if ((flags & FLAG_IS_VOICE_INTERACTION) != 0) {
            sb.append((sb.length() == 0 ? "" : "|") + "IS_VOICE_INTERACTION");
            sb.append(sb.length() == 0 ? "" : "|").append("IS_VOICE_INTERACTION");
        }
        if ((flags & FLAG_IS_DISPLAY) != 0) {
            sb.append((sb.length() == 0 ? "" : "|") + "IS_DISPLAY");
            sb.append(sb.length() == 0 ? "" : "|").append("IS_DISPLAY");
        }
        if ((flags & FLAG_OCCLUDES_KEYGUARD) != 0) {
            sb.append((sb.length() == 0 ? "" : "|") + "OCCLUDES_KEYGUARD");
            sb.append(sb.length() == 0 ? "" : "|").append("OCCLUDES_KEYGUARD");
        }
        if ((flags & FLAG_DISPLAY_HAS_ALERT_WINDOWS) != 0) {
            sb.append((sb.length() == 0 ? "" : "|") + "DISPLAY_HAS_ALERT_WINDOWS");
            sb.append(sb.length() == 0 ? "" : "|").append("DISPLAY_HAS_ALERT_WINDOWS");
        }
        if ((flags & FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY) != 0) {
            sb.append(sb.length() == 0 ? "" : "|").append("IN_TASK_WITH_EMBEDDED_ACTIVITY");
        }
        if ((flags & FLAG_IS_EMBEDDED) != 0) {
            sb.append((sb.length() == 0 ? "" : "|") + "IS_EMBEDDED");
        if ((flags & FLAG_FILLS_TASK) != 0) {
            sb.append(sb.length() == 0 ? "" : "|").append("FILLS_TASK");
        }
        if ((flags & FLAG_FIRST_CUSTOM) != 0) {
            sb.append((sb.length() == 0 ? "" : "|") + "FIRST_CUSTOM");
            sb.append(sb.length() == 0 ? "" : "|").append("FIRST_CUSTOM");
        }
        return sb.toString();
    }
+3 −1
Original line number Diff line number Diff line
@@ -517,7 +517,9 @@ public class TaskView extends SurfaceView implements SurfaceHolder.Callback,
        getViewTreeObserver().removeOnComputeInternalInsetsListener(this);
    }

    ActivityManager.RunningTaskInfo getTaskInfo() {
    /** Returns the task info for the task in the TaskView. */
    @Nullable
    public ActivityManager.RunningTaskInfo getTaskInfo() {
        return mTaskInfo;
    }

Loading