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

Commit 9af72223 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-ca7a0f27-e01e-4493-95dc-73b265f88cc9-for-git_oc-mr1-release-43...

release-request-ca7a0f27-e01e-4493-95dc-73b265f88cc9-for-git_oc-mr1-release-4365318 snap-temp-L33600000106883904

Change-Id: Id5a851c294dff7661789642964025f7c2848ca1f
parents 027441a5 a3acf73c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -843,7 +843,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim
        // Assumes forward playing from here on.
        for (int i = 0; i < mEvents.size(); i++) {
            AnimationEvent event = mEvents.get(i);
            if (event.getTime() > currentPlayTime) {
            if (event.getTime() > currentPlayTime || event.getTime() == DURATION_INFINITE) {
                break;
            }

@@ -1264,7 +1264,8 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim
        } else {
            for (int i = mLastEventId + 1; i < size; i++) {
                AnimationEvent event = mEvents.get(i);
                if (event.getTime() <= currentPlayTime) {
                // TODO: need a function that accounts for infinite duration to compare time
                if (event.getTime() != DURATION_INFINITE && event.getTime() <= currentPlayTime) {
                    latestId = i;
                }
            }
+1 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ public abstract class SharedElementCallback {
            Drawable d = imageView.getDrawable();
            Drawable bg = imageView.getBackground();
            if (d != null && (bg == null || bg.getAlpha() == 0)) {
                Bitmap bitmap = TransitionUtils.createDrawableBitmap(d);
                Bitmap bitmap = TransitionUtils.createDrawableBitmap(d, imageView);
                if (bitmap != null) {
                    Bundle bundle = new Bundle();
                    if (bitmap.getConfig() != Bitmap.Config.HARDWARE) {
+4 −2
Original line number Diff line number Diff line
@@ -52,10 +52,12 @@ public final class ParcelableException extends RuntimeException implements Parce
        final String msg = in.readString();
        try {
            final Class<?> clazz = Class.forName(name, true, Parcelable.class.getClassLoader());
            if (Throwable.class.isAssignableFrom(clazz)) {
                return (Throwable) clazz.getConstructor(String.class).newInstance(msg);
            }
        } catch (ReflectiveOperationException e) {
            throw new RuntimeException(name + ": " + msg);
        }
        return new RuntimeException(name + ": " + msg);
    }

    /** {@hide} */
+3 −3
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ public class TransitionUtils {
    /**
     * Get a copy of bitmap of given drawable, return null if intrinsic size is zero
     */
    public static Bitmap createDrawableBitmap(Drawable drawable) {
    public static Bitmap createDrawableBitmap(Drawable drawable, View hostView) {
        int width = drawable.getIntrinsicWidth();
        int height = drawable.getIntrinsicHeight();
        if (width <= 0 || height <= 0) {
@@ -128,7 +128,7 @@ public class TransitionUtils {
        }
        int bitmapWidth = (int) (width * scale);
        int bitmapHeight = (int) (height * scale);
        final RenderNode node = RenderNode.create("TransitionUtils", null);
        final RenderNode node = RenderNode.create("TransitionUtils", hostView);
        node.setLeftTopRightBottom(0, 0, width, height);
        node.setClipToBounds(false);
        final DisplayListCanvas canvas = node.start(width, height);
@@ -172,7 +172,7 @@ public class TransitionUtils {
            matrix.postTranslate(-bounds.left, -bounds.top);
            matrix.postScale(scale, scale);

            final RenderNode node = RenderNode.create("TransitionUtils", null);
            final RenderNode node = RenderNode.create("TransitionUtils", view);
            node.setLeftTopRightBottom(0, 0, bitmapWidth, bitmapHeight);
            node.setClipToBounds(false);
            final DisplayListCanvas canvas = node.start(bitmapWidth, bitmapHeight);
+20 −9
Original line number Diff line number Diff line
@@ -70,14 +70,15 @@ final class SelectionActionModeHelper {
        mEditor = Preconditions.checkNotNull(editor);
        mTextView = mEditor.getTextView();
        mTextClassificationHelper = new TextClassificationHelper(
                mTextView.getTextClassifier(), mTextView.getText(),
                mTextView.getTextClassifier(),
                getText(mTextView),
                0, 1, mTextView.getTextLocales());
        mSelectionTracker = new SelectionTracker(mTextView);
    }

    public void startActionModeAsync(boolean adjustSelection) {
        mSelectionTracker.onOriginalSelection(
                mTextView.getText(),
                getText(mTextView),
                mTextView.getSelectionStart(),
                mTextView.getSelectionEnd(),
                mTextView.isTextEditable());
@@ -166,7 +167,7 @@ final class SelectionActionModeHelper {
    }

    private void startActionMode(@Nullable SelectionResult result) {
        final CharSequence text = mTextView.getText();
        final CharSequence text = getText(mTextView);
        if (result != null && text instanceof Spannable) {
            Selection.setSelection((Spannable) text, result.mStart, result.mEnd);
            mTextClassification = result.mClassification;
@@ -198,7 +199,9 @@ final class SelectionActionModeHelper {
    }

    private void resetTextClassificationHelper() {
        mTextClassificationHelper.reset(mTextView.getTextClassifier(), mTextView.getText(),
        mTextClassificationHelper.reset(
                mTextView.getTextClassifier(),
                getText(mTextView),
                mTextView.getSelectionStart(), mTextView.getSelectionEnd(),
                mTextView.getTextLocales());
    }
@@ -301,7 +304,7 @@ final class SelectionActionModeHelper {
            if (isSelectionStarted()
                    && mAllowReset
                    && textIndex >= mSelectionStart && textIndex <= mSelectionEnd
                    && textView.getText() instanceof Spannable) {
                    && getText(textView) instanceof Spannable) {
                mAllowReset = false;
                boolean selected = editor.selectCurrentWord();
                if (selected) {
@@ -557,7 +560,7 @@ final class SelectionActionModeHelper {
            mSelectionResultSupplier = Preconditions.checkNotNull(selectionResultSupplier);
            mSelectionResultCallback = Preconditions.checkNotNull(selectionResultCallback);
            // Make a copy of the original text.
            mOriginalText = mTextView.getText().toString();
            mOriginalText = getText(mTextView).toString();
        }

        @Override
@@ -573,7 +576,7 @@ final class SelectionActionModeHelper {
        @Override
        @UiThread
        protected void onPostExecute(SelectionResult result) {
            result = TextUtils.equals(mOriginalText, mTextView.getText()) ? result : null;
            result = TextUtils.equals(mOriginalText, getText(mTextView)) ? result : null;
            mSelectionResultCallback.accept(result);
        }

@@ -702,8 +705,6 @@ final class SelectionActionModeHelper {
        }
    }



    @SelectionEvent.ActionType
    private static int getActionType(int menuItemId) {
        switch (menuItemId) {
@@ -724,4 +725,14 @@ final class SelectionActionModeHelper {
                return SelectionEvent.ActionType.OTHER;
        }
    }

    private static CharSequence getText(TextView textView) {
        // Extracts the textView's text.
        // TODO: Investigate why/when TextView.getText() is null.
        final CharSequence text = textView.getText();
        if (text != null) {
            return text;
        }
        return "";
    }
}
Loading