ADD week 5

This commit is contained in:
2025-03-31 16:33:42 +02:00
parent 86f265f22d
commit bf645048e6
4927 changed files with 544053 additions and 0 deletions

View File

@ -0,0 +1,29 @@
package androidx.transition;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
/* loaded from: classes.dex */
class AnimatorUtils {
interface AnimatorPauseListenerCompat {
void onAnimationPause(Animator animator);
void onAnimationResume(Animator animator);
}
static void addPauseListener(Animator animator, AnimatorListenerAdapter animatorListenerAdapter) {
animator.addPauseListener(animatorListenerAdapter);
}
static void pause(Animator animator) {
animator.pause();
}
static void resume(Animator animator) {
animator.resume();
}
private AnimatorUtils() {
}
}

View File

@ -0,0 +1,133 @@
package androidx.transition;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Path;
import android.util.AttributeSet;
import androidx.core.content.res.TypedArrayUtils;
import org.xmlpull.v1.XmlPullParser;
/* loaded from: classes.dex */
public class ArcMotion extends PathMotion {
private static final float DEFAULT_MAX_ANGLE_DEGREES = 70.0f;
private static final float DEFAULT_MAX_TANGENT = (float) Math.tan(Math.toRadians(35.0d));
private static final float DEFAULT_MIN_ANGLE_DEGREES = 0.0f;
private float mMaximumAngle;
private float mMaximumTangent;
private float mMinimumHorizontalAngle;
private float mMinimumHorizontalTangent;
private float mMinimumVerticalAngle;
private float mMinimumVerticalTangent;
public float getMaximumAngle() {
return this.mMaximumAngle;
}
public float getMinimumHorizontalAngle() {
return this.mMinimumHorizontalAngle;
}
public float getMinimumVerticalAngle() {
return this.mMinimumVerticalAngle;
}
public ArcMotion() {
this.mMinimumHorizontalAngle = 0.0f;
this.mMinimumVerticalAngle = 0.0f;
this.mMaximumAngle = DEFAULT_MAX_ANGLE_DEGREES;
this.mMinimumHorizontalTangent = 0.0f;
this.mMinimumVerticalTangent = 0.0f;
this.mMaximumTangent = DEFAULT_MAX_TANGENT;
}
public ArcMotion(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.mMinimumHorizontalAngle = 0.0f;
this.mMinimumVerticalAngle = 0.0f;
this.mMaximumAngle = DEFAULT_MAX_ANGLE_DEGREES;
this.mMinimumHorizontalTangent = 0.0f;
this.mMinimumVerticalTangent = 0.0f;
this.mMaximumTangent = DEFAULT_MAX_TANGENT;
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, Styleable.ARC_MOTION);
XmlPullParser xmlPullParser = (XmlPullParser) attributeSet;
setMinimumVerticalAngle(TypedArrayUtils.getNamedFloat(obtainStyledAttributes, xmlPullParser, "minimumVerticalAngle", 1, 0.0f));
setMinimumHorizontalAngle(TypedArrayUtils.getNamedFloat(obtainStyledAttributes, xmlPullParser, "minimumHorizontalAngle", 0, 0.0f));
setMaximumAngle(TypedArrayUtils.getNamedFloat(obtainStyledAttributes, xmlPullParser, "maximumAngle", 2, DEFAULT_MAX_ANGLE_DEGREES));
obtainStyledAttributes.recycle();
}
public void setMinimumHorizontalAngle(float f) {
this.mMinimumHorizontalAngle = f;
this.mMinimumHorizontalTangent = toTangent(f);
}
public void setMinimumVerticalAngle(float f) {
this.mMinimumVerticalAngle = f;
this.mMinimumVerticalTangent = toTangent(f);
}
public void setMaximumAngle(float f) {
this.mMaximumAngle = f;
this.mMaximumTangent = toTangent(f);
}
private static float toTangent(float f) {
if (f < 0.0f || f > 90.0f) {
throw new IllegalArgumentException("Arc must be between 0 and 90 degrees");
}
return (float) Math.tan(Math.toRadians(f / 2.0f));
}
@Override // androidx.transition.PathMotion
public Path getPath(float f, float f2, float f3, float f4) {
float f5;
float f6;
float f7;
Path path = new Path();
path.moveTo(f, f2);
float f8 = f3 - f;
float f9 = f4 - f2;
float f10 = (f8 * f8) + (f9 * f9);
float f11 = (f + f3) / 2.0f;
float f12 = (f2 + f4) / 2.0f;
float f13 = 0.25f * f10;
boolean z = f2 > f4;
if (Math.abs(f8) < Math.abs(f9)) {
float abs = Math.abs(f10 / (f9 * 2.0f));
if (z) {
f6 = abs + f4;
f5 = f3;
} else {
f6 = abs + f2;
f5 = f;
}
f7 = this.mMinimumVerticalTangent;
} else {
float f14 = f10 / (f8 * 2.0f);
if (z) {
f6 = f2;
f5 = f14 + f;
} else {
f5 = f3 - f14;
f6 = f4;
}
f7 = this.mMinimumHorizontalTangent;
}
float f15 = f13 * f7 * f7;
float f16 = f11 - f5;
float f17 = f12 - f6;
float f18 = (f16 * f16) + (f17 * f17);
float f19 = this.mMaximumTangent;
float f20 = f13 * f19 * f19;
if (f18 >= f15) {
f15 = f18 > f20 ? f20 : 0.0f;
}
if (f15 != 0.0f) {
float sqrt = (float) Math.sqrt(f15 / f18);
f5 = ((f5 - f11) * sqrt) + f11;
f6 = f12 + (sqrt * (f6 - f12));
}
path.cubicTo((f + f5) / 2.0f, (f2 + f6) / 2.0f, (f5 + f3) / 2.0f, (f6 + f4) / 2.0f, f3, f4);
return path;
}
}

View File

@ -0,0 +1,21 @@
package androidx.transition;
import android.content.Context;
import android.util.AttributeSet;
/* loaded from: classes.dex */
public class AutoTransition extends TransitionSet {
public AutoTransition() {
init();
}
public AutoTransition(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
init();
}
private void init() {
setOrdering(1);
addTransition(new Fade(2)).addTransition(new ChangeBounds()).addTransition(new Fade(1));
}
}

View File

@ -0,0 +1,60 @@
package androidx.transition;
import android.graphics.Canvas;
import android.os.Build;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
class CanvasUtils {
private static Method sInorderBarrierMethod;
private static boolean sOrderMethodsFetched;
private static Method sReorderBarrierMethod;
static void enableZ(Canvas canvas, boolean z) {
Method method;
if (Build.VERSION.SDK_INT >= 29) {
if (z) {
canvas.enableZ();
return;
} else {
canvas.disableZ();
return;
}
}
if (Build.VERSION.SDK_INT == 28) {
throw new IllegalStateException("This method doesn't work on Pie!");
}
if (!sOrderMethodsFetched) {
try {
Method declaredMethod = Canvas.class.getDeclaredMethod("insertReorderBarrier", new Class[0]);
sReorderBarrierMethod = declaredMethod;
declaredMethod.setAccessible(true);
Method declaredMethod2 = Canvas.class.getDeclaredMethod("insertInorderBarrier", new Class[0]);
sInorderBarrierMethod = declaredMethod2;
declaredMethod2.setAccessible(true);
} catch (NoSuchMethodException unused) {
}
sOrderMethodsFetched = true;
}
if (z) {
try {
Method method2 = sReorderBarrierMethod;
if (method2 != null) {
method2.invoke(canvas, new Object[0]);
}
} catch (IllegalAccessException unused2) {
return;
} catch (InvocationTargetException e) {
throw new RuntimeException(e.getCause());
}
}
if (z || (method = sInorderBarrierMethod) == null) {
return;
}
method.invoke(canvas, new Object[0]);
}
private CanvasUtils() {
}
}

View File

@ -0,0 +1,412 @@
package androidx.transition;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Property;
import android.view.View;
import android.view.ViewGroup;
import androidx.core.content.res.TypedArrayUtils;
import androidx.core.view.ViewCompat;
import java.util.Map;
/* loaded from: classes.dex */
public class ChangeBounds extends Transition {
private static final Property<View, PointF> BOTTOM_RIGHT_ONLY_PROPERTY;
private static final Property<ViewBounds, PointF> BOTTOM_RIGHT_PROPERTY;
private static final Property<View, PointF> TOP_LEFT_ONLY_PROPERTY;
private static final Property<ViewBounds, PointF> TOP_LEFT_PROPERTY;
private boolean mReparent;
private boolean mResizeClip;
private int[] mTempLocation;
private static final String PROPNAME_BOUNDS = "android:changeBounds:bounds";
private static final String PROPNAME_CLIP = "android:changeBounds:clip";
private static final String PROPNAME_PARENT = "android:changeBounds:parent";
private static final String PROPNAME_WINDOW_X = "android:changeBounds:windowX";
private static final String PROPNAME_WINDOW_Y = "android:changeBounds:windowY";
private static final String[] sTransitionProperties = {PROPNAME_BOUNDS, PROPNAME_CLIP, PROPNAME_PARENT, PROPNAME_WINDOW_X, PROPNAME_WINDOW_Y};
private static final Property<Drawable, PointF> DRAWABLE_ORIGIN_PROPERTY = new Property<Drawable, PointF>(PointF.class, "boundsOrigin") { // from class: androidx.transition.ChangeBounds.1
private Rect mBounds = new Rect();
@Override // android.util.Property
public void set(Drawable drawable, PointF pointF) {
drawable.copyBounds(this.mBounds);
this.mBounds.offsetTo(Math.round(pointF.x), Math.round(pointF.y));
drawable.setBounds(this.mBounds);
}
@Override // android.util.Property
public PointF get(Drawable drawable) {
drawable.copyBounds(this.mBounds);
return new PointF(this.mBounds.left, this.mBounds.top);
}
};
private static final Property<View, PointF> POSITION_PROPERTY = new Property<View, PointF>(PointF.class, "position") { // from class: androidx.transition.ChangeBounds.6
@Override // android.util.Property
public PointF get(View view) {
return null;
}
@Override // android.util.Property
public void set(View view, PointF pointF) {
int round = Math.round(pointF.x);
int round2 = Math.round(pointF.y);
ViewUtils.setLeftTopRightBottom(view, round, round2, view.getWidth() + round, view.getHeight() + round2);
}
};
private static RectEvaluator sRectEvaluator = new RectEvaluator();
public boolean getResizeClip() {
return this.mResizeClip;
}
@Override // androidx.transition.Transition
public String[] getTransitionProperties() {
return sTransitionProperties;
}
public void setResizeClip(boolean z) {
this.mResizeClip = z;
}
static {
String str = "topLeft";
TOP_LEFT_PROPERTY = new Property<ViewBounds, PointF>(PointF.class, str) { // from class: androidx.transition.ChangeBounds.2
@Override // android.util.Property
public PointF get(ViewBounds viewBounds) {
return null;
}
@Override // android.util.Property
public void set(ViewBounds viewBounds, PointF pointF) {
viewBounds.setTopLeft(pointF);
}
};
String str2 = "bottomRight";
BOTTOM_RIGHT_PROPERTY = new Property<ViewBounds, PointF>(PointF.class, str2) { // from class: androidx.transition.ChangeBounds.3
@Override // android.util.Property
public PointF get(ViewBounds viewBounds) {
return null;
}
@Override // android.util.Property
public void set(ViewBounds viewBounds, PointF pointF) {
viewBounds.setBottomRight(pointF);
}
};
BOTTOM_RIGHT_ONLY_PROPERTY = new Property<View, PointF>(PointF.class, str2) { // from class: androidx.transition.ChangeBounds.4
@Override // android.util.Property
public PointF get(View view) {
return null;
}
@Override // android.util.Property
public void set(View view, PointF pointF) {
ViewUtils.setLeftTopRightBottom(view, view.getLeft(), view.getTop(), Math.round(pointF.x), Math.round(pointF.y));
}
};
TOP_LEFT_ONLY_PROPERTY = new Property<View, PointF>(PointF.class, str) { // from class: androidx.transition.ChangeBounds.5
@Override // android.util.Property
public PointF get(View view) {
return null;
}
@Override // android.util.Property
public void set(View view, PointF pointF) {
ViewUtils.setLeftTopRightBottom(view, Math.round(pointF.x), Math.round(pointF.y), view.getRight(), view.getBottom());
}
};
}
public ChangeBounds() {
this.mTempLocation = new int[2];
this.mResizeClip = false;
this.mReparent = false;
}
public ChangeBounds(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.mTempLocation = new int[2];
this.mResizeClip = false;
this.mReparent = false;
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, Styleable.CHANGE_BOUNDS);
boolean namedBoolean = TypedArrayUtils.getNamedBoolean(obtainStyledAttributes, (XmlResourceParser) attributeSet, "resizeClip", 0, false);
obtainStyledAttributes.recycle();
setResizeClip(namedBoolean);
}
private void captureValues(TransitionValues transitionValues) {
View view = transitionValues.view;
if (!ViewCompat.isLaidOut(view) && view.getWidth() == 0 && view.getHeight() == 0) {
return;
}
transitionValues.values.put(PROPNAME_BOUNDS, new Rect(view.getLeft(), view.getTop(), view.getRight(), view.getBottom()));
transitionValues.values.put(PROPNAME_PARENT, transitionValues.view.getParent());
if (this.mReparent) {
transitionValues.view.getLocationInWindow(this.mTempLocation);
transitionValues.values.put(PROPNAME_WINDOW_X, Integer.valueOf(this.mTempLocation[0]));
transitionValues.values.put(PROPNAME_WINDOW_Y, Integer.valueOf(this.mTempLocation[1]));
}
if (this.mResizeClip) {
transitionValues.values.put(PROPNAME_CLIP, ViewCompat.getClipBounds(view));
}
}
@Override // androidx.transition.Transition
public void captureStartValues(TransitionValues transitionValues) {
captureValues(transitionValues);
}
@Override // androidx.transition.Transition
public void captureEndValues(TransitionValues transitionValues) {
captureValues(transitionValues);
}
private boolean parentMatches(View view, View view2) {
if (!this.mReparent) {
return true;
}
TransitionValues matchedTransitionValues = getMatchedTransitionValues(view, true);
if (matchedTransitionValues == null) {
if (view == view2) {
return true;
}
} else if (view2 == matchedTransitionValues.view) {
return true;
}
return false;
}
@Override // androidx.transition.Transition
public Animator createAnimator(final ViewGroup viewGroup, TransitionValues transitionValues, TransitionValues transitionValues2) {
int i;
final View view;
int i2;
Rect rect;
ObjectAnimator objectAnimator;
Animator mergeAnimators;
if (transitionValues == null || transitionValues2 == null) {
return null;
}
Map<String, Object> map = transitionValues.values;
Map<String, Object> map2 = transitionValues2.values;
ViewGroup viewGroup2 = (ViewGroup) map.get(PROPNAME_PARENT);
ViewGroup viewGroup3 = (ViewGroup) map2.get(PROPNAME_PARENT);
if (viewGroup2 == null || viewGroup3 == null) {
return null;
}
final View view2 = transitionValues2.view;
if (parentMatches(viewGroup2, viewGroup3)) {
Rect rect2 = (Rect) transitionValues.values.get(PROPNAME_BOUNDS);
Rect rect3 = (Rect) transitionValues2.values.get(PROPNAME_BOUNDS);
int i3 = rect2.left;
final int i4 = rect3.left;
int i5 = rect2.top;
final int i6 = rect3.top;
int i7 = rect2.right;
final int i8 = rect3.right;
int i9 = rect2.bottom;
final int i10 = rect3.bottom;
int i11 = i7 - i3;
int i12 = i9 - i5;
int i13 = i8 - i4;
int i14 = i10 - i6;
Rect rect4 = (Rect) transitionValues.values.get(PROPNAME_CLIP);
final Rect rect5 = (Rect) transitionValues2.values.get(PROPNAME_CLIP);
if ((i11 == 0 || i12 == 0) && (i13 == 0 || i14 == 0)) {
i = 0;
} else {
i = (i3 == i4 && i5 == i6) ? 0 : 1;
if (i7 != i8 || i9 != i10) {
i++;
}
}
if ((rect4 != null && !rect4.equals(rect5)) || (rect4 == null && rect5 != null)) {
i++;
}
if (i <= 0) {
return null;
}
if (!this.mResizeClip) {
view = view2;
ViewUtils.setLeftTopRightBottom(view, i3, i5, i7, i9);
if (i == 2) {
if (i11 == i13 && i12 == i14) {
mergeAnimators = ObjectAnimatorUtils.ofPointF(view, POSITION_PROPERTY, getPathMotion().getPath(i3, i5, i4, i6));
} else {
ViewBounds viewBounds = new ViewBounds(view);
ObjectAnimator ofPointF = ObjectAnimatorUtils.ofPointF(viewBounds, TOP_LEFT_PROPERTY, getPathMotion().getPath(i3, i5, i4, i6));
ObjectAnimator ofPointF2 = ObjectAnimatorUtils.ofPointF(viewBounds, BOTTOM_RIGHT_PROPERTY, getPathMotion().getPath(i7, i9, i8, i10));
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(ofPointF, ofPointF2);
animatorSet.addListener(new AnimatorListenerAdapter(viewBounds) { // from class: androidx.transition.ChangeBounds.7
private ViewBounds mViewBounds;
final /* synthetic */ ViewBounds val$viewBounds;
{
this.val$viewBounds = viewBounds;
this.mViewBounds = viewBounds;
}
});
mergeAnimators = animatorSet;
}
} else if (i3 != i4 || i5 != i6) {
mergeAnimators = ObjectAnimatorUtils.ofPointF(view, TOP_LEFT_ONLY_PROPERTY, getPathMotion().getPath(i3, i5, i4, i6));
} else {
mergeAnimators = ObjectAnimatorUtils.ofPointF(view, BOTTOM_RIGHT_ONLY_PROPERTY, getPathMotion().getPath(i7, i9, i8, i10));
}
} else {
view = view2;
ViewUtils.setLeftTopRightBottom(view, i3, i5, Math.max(i11, i13) + i3, Math.max(i12, i14) + i5);
ObjectAnimator ofPointF3 = (i3 == i4 && i5 == i6) ? null : ObjectAnimatorUtils.ofPointF(view, POSITION_PROPERTY, getPathMotion().getPath(i3, i5, i4, i6));
if (rect4 == null) {
i2 = 0;
rect = new Rect(0, 0, i11, i12);
} else {
i2 = 0;
rect = rect4;
}
Rect rect6 = rect5 == null ? new Rect(i2, i2, i13, i14) : rect5;
if (rect.equals(rect6)) {
objectAnimator = null;
} else {
ViewCompat.setClipBounds(view, rect);
RectEvaluator rectEvaluator = sRectEvaluator;
Object[] objArr = new Object[2];
objArr[i2] = rect;
objArr[1] = rect6;
ObjectAnimator ofObject = ObjectAnimator.ofObject(view, "clipBounds", rectEvaluator, objArr);
ofObject.addListener(new AnimatorListenerAdapter() { // from class: androidx.transition.ChangeBounds.8
private boolean mIsCanceled;
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationCancel(Animator animator) {
this.mIsCanceled = true;
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
if (this.mIsCanceled) {
return;
}
ViewCompat.setClipBounds(view, rect5);
ViewUtils.setLeftTopRightBottom(view, i4, i6, i8, i10);
}
});
objectAnimator = ofObject;
}
mergeAnimators = TransitionUtils.mergeAnimators(ofPointF3, objectAnimator);
}
if (view.getParent() instanceof ViewGroup) {
final ViewGroup viewGroup4 = (ViewGroup) view.getParent();
ViewGroupUtils.suppressLayout(viewGroup4, true);
addListener(new TransitionListenerAdapter() { // from class: androidx.transition.ChangeBounds.9
boolean mCanceled = false;
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionCancel(Transition transition) {
ViewGroupUtils.suppressLayout(viewGroup4, false);
this.mCanceled = true;
}
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionEnd(Transition transition) {
if (!this.mCanceled) {
ViewGroupUtils.suppressLayout(viewGroup4, false);
}
transition.removeListener(this);
}
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionPause(Transition transition) {
ViewGroupUtils.suppressLayout(viewGroup4, false);
}
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionResume(Transition transition) {
ViewGroupUtils.suppressLayout(viewGroup4, true);
}
});
}
return mergeAnimators;
}
int intValue = ((Integer) transitionValues.values.get(PROPNAME_WINDOW_X)).intValue();
int intValue2 = ((Integer) transitionValues.values.get(PROPNAME_WINDOW_Y)).intValue();
int intValue3 = ((Integer) transitionValues2.values.get(PROPNAME_WINDOW_X)).intValue();
int intValue4 = ((Integer) transitionValues2.values.get(PROPNAME_WINDOW_Y)).intValue();
if (intValue == intValue3 && intValue2 == intValue4) {
return null;
}
viewGroup.getLocationInWindow(this.mTempLocation);
Bitmap createBitmap = Bitmap.createBitmap(view2.getWidth(), view2.getHeight(), Bitmap.Config.ARGB_8888);
view2.draw(new Canvas(createBitmap));
final BitmapDrawable bitmapDrawable = new BitmapDrawable(createBitmap);
final float transitionAlpha = ViewUtils.getTransitionAlpha(view2);
ViewUtils.setTransitionAlpha(view2, 0.0f);
ViewUtils.getOverlay(viewGroup).add(bitmapDrawable);
PathMotion pathMotion = getPathMotion();
int[] iArr = this.mTempLocation;
int i15 = iArr[0];
int i16 = iArr[1];
ObjectAnimator ofPropertyValuesHolder = ObjectAnimator.ofPropertyValuesHolder(bitmapDrawable, PropertyValuesHolderUtils.ofPointF(DRAWABLE_ORIGIN_PROPERTY, pathMotion.getPath(intValue - i15, intValue2 - i16, intValue3 - i15, intValue4 - i16)));
ofPropertyValuesHolder.addListener(new AnimatorListenerAdapter() { // from class: androidx.transition.ChangeBounds.10
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
ViewUtils.getOverlay(viewGroup).remove(bitmapDrawable);
ViewUtils.setTransitionAlpha(view2, transitionAlpha);
}
});
return ofPropertyValuesHolder;
}
private static class ViewBounds {
private int mBottom;
private int mBottomRightCalls;
private int mLeft;
private int mRight;
private int mTop;
private int mTopLeftCalls;
private View mView;
ViewBounds(View view) {
this.mView = view;
}
void setTopLeft(PointF pointF) {
this.mLeft = Math.round(pointF.x);
this.mTop = Math.round(pointF.y);
int i = this.mTopLeftCalls + 1;
this.mTopLeftCalls = i;
if (i == this.mBottomRightCalls) {
setLeftTopRightBottom();
}
}
void setBottomRight(PointF pointF) {
this.mRight = Math.round(pointF.x);
this.mBottom = Math.round(pointF.y);
int i = this.mBottomRightCalls + 1;
this.mBottomRightCalls = i;
if (this.mTopLeftCalls == i) {
setLeftTopRightBottom();
}
}
private void setLeftTopRightBottom() {
ViewUtils.setLeftTopRightBottom(this.mView, this.mLeft, this.mTop, this.mRight, this.mBottom);
this.mTopLeftCalls = 0;
this.mBottomRightCalls = 0;
}
}
}

View File

@ -0,0 +1,87 @@
package androidx.transition;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.Property;
import android.view.View;
import android.view.ViewGroup;
import androidx.core.view.ViewCompat;
/* loaded from: classes.dex */
public class ChangeClipBounds extends Transition {
private static final String PROPNAME_BOUNDS = "android:clipBounds:bounds";
private static final String PROPNAME_CLIP = "android:clipBounds:clip";
private static final String[] sTransitionProperties = {PROPNAME_CLIP};
@Override // androidx.transition.Transition
public String[] getTransitionProperties() {
return sTransitionProperties;
}
public ChangeClipBounds() {
}
public ChangeClipBounds(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
private void captureValues(TransitionValues transitionValues) {
View view = transitionValues.view;
if (view.getVisibility() == 8) {
return;
}
Rect clipBounds = ViewCompat.getClipBounds(view);
transitionValues.values.put(PROPNAME_CLIP, clipBounds);
if (clipBounds == null) {
transitionValues.values.put(PROPNAME_BOUNDS, new Rect(0, 0, view.getWidth(), view.getHeight()));
}
}
@Override // androidx.transition.Transition
public void captureStartValues(TransitionValues transitionValues) {
captureValues(transitionValues);
}
@Override // androidx.transition.Transition
public void captureEndValues(TransitionValues transitionValues) {
captureValues(transitionValues);
}
@Override // androidx.transition.Transition
public Animator createAnimator(ViewGroup viewGroup, TransitionValues transitionValues, TransitionValues transitionValues2) {
ObjectAnimator objectAnimator = null;
if (transitionValues != null && transitionValues2 != null && transitionValues.values.containsKey(PROPNAME_CLIP) && transitionValues2.values.containsKey(PROPNAME_CLIP)) {
Rect rect = (Rect) transitionValues.values.get(PROPNAME_CLIP);
Rect rect2 = (Rect) transitionValues2.values.get(PROPNAME_CLIP);
boolean z = rect2 == null;
if (rect == null && rect2 == null) {
return null;
}
if (rect == null) {
rect = (Rect) transitionValues.values.get(PROPNAME_BOUNDS);
} else if (rect2 == null) {
rect2 = (Rect) transitionValues2.values.get(PROPNAME_BOUNDS);
}
if (rect.equals(rect2)) {
return null;
}
ViewCompat.setClipBounds(transitionValues2.view, rect);
objectAnimator = ObjectAnimator.ofObject(transitionValues2.view, (Property<View, V>) ViewUtils.CLIP_BOUNDS, (TypeEvaluator) new RectEvaluator(new Rect()), (Object[]) new Rect[]{rect, rect2});
if (z) {
final View view = transitionValues2.view;
objectAnimator.addListener(new AnimatorListenerAdapter() { // from class: androidx.transition.ChangeClipBounds.1
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
ViewCompat.setClipBounds(view, null);
}
});
}
}
return objectAnimator;
}
}

View File

@ -0,0 +1,172 @@
package androidx.transition;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Property;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.transition.TransitionUtils;
import java.util.Map;
/* loaded from: classes.dex */
public class ChangeImageTransform extends Transition {
private static final String PROPNAME_MATRIX = "android:changeImageTransform:matrix";
private static final String PROPNAME_BOUNDS = "android:changeImageTransform:bounds";
private static final String[] sTransitionProperties = {PROPNAME_MATRIX, PROPNAME_BOUNDS};
private static final TypeEvaluator<Matrix> NULL_MATRIX_EVALUATOR = new TypeEvaluator<Matrix>() { // from class: androidx.transition.ChangeImageTransform.1
@Override // android.animation.TypeEvaluator
public Matrix evaluate(float f, Matrix matrix, Matrix matrix2) {
return null;
}
};
private static final Property<ImageView, Matrix> ANIMATED_TRANSFORM_PROPERTY = new Property<ImageView, Matrix>(Matrix.class, "animatedTransform") { // from class: androidx.transition.ChangeImageTransform.2
@Override // android.util.Property
public Matrix get(ImageView imageView) {
return null;
}
@Override // android.util.Property
public void set(ImageView imageView, Matrix matrix) {
ImageViewUtils.animateTransform(imageView, matrix);
}
};
@Override // androidx.transition.Transition
public String[] getTransitionProperties() {
return sTransitionProperties;
}
public ChangeImageTransform() {
}
public ChangeImageTransform(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
private void captureValues(TransitionValues transitionValues) {
View view = transitionValues.view;
if ((view instanceof ImageView) && view.getVisibility() == 0) {
ImageView imageView = (ImageView) view;
if (imageView.getDrawable() == null) {
return;
}
Map<String, Object> map = transitionValues.values;
map.put(PROPNAME_BOUNDS, new Rect(view.getLeft(), view.getTop(), view.getRight(), view.getBottom()));
map.put(PROPNAME_MATRIX, copyImageMatrix(imageView));
}
}
@Override // androidx.transition.Transition
public void captureStartValues(TransitionValues transitionValues) {
captureValues(transitionValues);
}
@Override // androidx.transition.Transition
public void captureEndValues(TransitionValues transitionValues) {
captureValues(transitionValues);
}
@Override // androidx.transition.Transition
public Animator createAnimator(ViewGroup viewGroup, TransitionValues transitionValues, TransitionValues transitionValues2) {
if (transitionValues == null || transitionValues2 == null) {
return null;
}
Rect rect = (Rect) transitionValues.values.get(PROPNAME_BOUNDS);
Rect rect2 = (Rect) transitionValues2.values.get(PROPNAME_BOUNDS);
if (rect == null || rect2 == null) {
return null;
}
Matrix matrix = (Matrix) transitionValues.values.get(PROPNAME_MATRIX);
Matrix matrix2 = (Matrix) transitionValues2.values.get(PROPNAME_MATRIX);
boolean z = (matrix == null && matrix2 == null) || (matrix != null && matrix.equals(matrix2));
if (rect.equals(rect2) && z) {
return null;
}
ImageView imageView = (ImageView) transitionValues2.view;
Drawable drawable = imageView.getDrawable();
int intrinsicWidth = drawable.getIntrinsicWidth();
int intrinsicHeight = drawable.getIntrinsicHeight();
if (intrinsicWidth <= 0 || intrinsicHeight <= 0) {
return createNullAnimator(imageView);
}
if (matrix == null) {
matrix = MatrixUtils.IDENTITY_MATRIX;
}
if (matrix2 == null) {
matrix2 = MatrixUtils.IDENTITY_MATRIX;
}
ANIMATED_TRANSFORM_PROPERTY.set(imageView, matrix);
return createMatrixAnimator(imageView, matrix, matrix2);
}
private ObjectAnimator createNullAnimator(ImageView imageView) {
return ObjectAnimator.ofObject(imageView, (Property<ImageView, V>) ANIMATED_TRANSFORM_PROPERTY, (TypeEvaluator) NULL_MATRIX_EVALUATOR, (Object[]) new Matrix[]{MatrixUtils.IDENTITY_MATRIX, MatrixUtils.IDENTITY_MATRIX});
}
private ObjectAnimator createMatrixAnimator(ImageView imageView, Matrix matrix, Matrix matrix2) {
return ObjectAnimator.ofObject(imageView, (Property<ImageView, V>) ANIMATED_TRANSFORM_PROPERTY, (TypeEvaluator) new TransitionUtils.MatrixEvaluator(), (Object[]) new Matrix[]{matrix, matrix2});
}
private static Matrix copyImageMatrix(ImageView imageView) {
Drawable drawable = imageView.getDrawable();
if (drawable.getIntrinsicWidth() > 0 && drawable.getIntrinsicHeight() > 0) {
int i = AnonymousClass3.$SwitchMap$android$widget$ImageView$ScaleType[imageView.getScaleType().ordinal()];
if (i == 1) {
return fitXYMatrix(imageView);
}
if (i == 2) {
return centerCropMatrix(imageView);
}
}
return new Matrix(imageView.getImageMatrix());
}
/* renamed from: androidx.transition.ChangeImageTransform$3, reason: invalid class name */
static /* synthetic */ class AnonymousClass3 {
static final /* synthetic */ int[] $SwitchMap$android$widget$ImageView$ScaleType;
static {
int[] iArr = new int[ImageView.ScaleType.values().length];
$SwitchMap$android$widget$ImageView$ScaleType = iArr;
try {
iArr[ImageView.ScaleType.FIT_XY.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$android$widget$ImageView$ScaleType[ImageView.ScaleType.CENTER_CROP.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
}
}
private static Matrix fitXYMatrix(ImageView imageView) {
Drawable drawable = imageView.getDrawable();
Matrix matrix = new Matrix();
matrix.postScale(imageView.getWidth() / drawable.getIntrinsicWidth(), imageView.getHeight() / drawable.getIntrinsicHeight());
return matrix;
}
private static Matrix centerCropMatrix(ImageView imageView) {
Drawable drawable = imageView.getDrawable();
int intrinsicWidth = drawable.getIntrinsicWidth();
float width = imageView.getWidth();
float f = intrinsicWidth;
int intrinsicHeight = drawable.getIntrinsicHeight();
float height = imageView.getHeight();
float f2 = intrinsicHeight;
float max = Math.max(width / f, height / f2);
int round = Math.round((width - (f * max)) / 2.0f);
int round2 = Math.round((height - (f2 * max)) / 2.0f);
Matrix matrix = new Matrix();
matrix.postScale(max, max);
matrix.postTranslate(round, round2);
return matrix;
}
}

View File

@ -0,0 +1,67 @@
package androidx.transition;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
/* loaded from: classes.dex */
public class ChangeScroll extends Transition {
private static final String PROPNAME_SCROLL_X = "android:changeScroll:x";
private static final String PROPNAME_SCROLL_Y = "android:changeScroll:y";
private static final String[] PROPERTIES = {PROPNAME_SCROLL_X, PROPNAME_SCROLL_Y};
@Override // androidx.transition.Transition
public String[] getTransitionProperties() {
return PROPERTIES;
}
public ChangeScroll() {
}
public ChangeScroll(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
@Override // androidx.transition.Transition
public void captureStartValues(TransitionValues transitionValues) {
captureValues(transitionValues);
}
@Override // androidx.transition.Transition
public void captureEndValues(TransitionValues transitionValues) {
captureValues(transitionValues);
}
private void captureValues(TransitionValues transitionValues) {
transitionValues.values.put(PROPNAME_SCROLL_X, Integer.valueOf(transitionValues.view.getScrollX()));
transitionValues.values.put(PROPNAME_SCROLL_Y, Integer.valueOf(transitionValues.view.getScrollY()));
}
@Override // androidx.transition.Transition
public Animator createAnimator(ViewGroup viewGroup, TransitionValues transitionValues, TransitionValues transitionValues2) {
ObjectAnimator objectAnimator;
ObjectAnimator objectAnimator2 = null;
if (transitionValues == null || transitionValues2 == null) {
return null;
}
View view = transitionValues2.view;
int intValue = ((Integer) transitionValues.values.get(PROPNAME_SCROLL_X)).intValue();
int intValue2 = ((Integer) transitionValues2.values.get(PROPNAME_SCROLL_X)).intValue();
int intValue3 = ((Integer) transitionValues.values.get(PROPNAME_SCROLL_Y)).intValue();
int intValue4 = ((Integer) transitionValues2.values.get(PROPNAME_SCROLL_Y)).intValue();
if (intValue != intValue2) {
view.setScrollX(intValue);
objectAnimator = ObjectAnimator.ofInt(view, "scrollX", intValue, intValue2);
} else {
objectAnimator = null;
}
if (intValue3 != intValue4) {
view.setScrollY(intValue3);
objectAnimator2 = ObjectAnimator.ofInt(view, "scrollY", intValue3, intValue4);
}
return TransitionUtils.mergeAnimators(objectAnimator, objectAnimator2);
}
}

View File

@ -0,0 +1,441 @@
package androidx.transition;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.util.AttributeSet;
import android.util.Property;
import android.view.View;
import android.view.ViewGroup;
import androidx.core.content.res.TypedArrayUtils;
import androidx.core.view.ViewCompat;
import org.xmlpull.v1.XmlPullParser;
/* loaded from: classes.dex */
public class ChangeTransform extends Transition {
private static final String PROPNAME_INTERMEDIATE_MATRIX = "android:changeTransform:intermediateMatrix";
private static final String PROPNAME_INTERMEDIATE_PARENT_MATRIX = "android:changeTransform:intermediateParentMatrix";
private static final String PROPNAME_PARENT = "android:changeTransform:parent";
private boolean mReparent;
private Matrix mTempMatrix;
boolean mUseOverlay;
private static final String PROPNAME_MATRIX = "android:changeTransform:matrix";
private static final String PROPNAME_TRANSFORMS = "android:changeTransform:transforms";
private static final String PROPNAME_PARENT_MATRIX = "android:changeTransform:parentMatrix";
private static final String[] sTransitionProperties = {PROPNAME_MATRIX, PROPNAME_TRANSFORMS, PROPNAME_PARENT_MATRIX};
private static final Property<PathAnimatorMatrix, float[]> NON_TRANSLATIONS_PROPERTY = new Property<PathAnimatorMatrix, float[]>(float[].class, "nonTranslations") { // from class: androidx.transition.ChangeTransform.1
@Override // android.util.Property
public float[] get(PathAnimatorMatrix pathAnimatorMatrix) {
return null;
}
@Override // android.util.Property
public void set(PathAnimatorMatrix pathAnimatorMatrix, float[] fArr) {
pathAnimatorMatrix.setValues(fArr);
}
};
private static final Property<PathAnimatorMatrix, PointF> TRANSLATIONS_PROPERTY = new Property<PathAnimatorMatrix, PointF>(PointF.class, "translations") { // from class: androidx.transition.ChangeTransform.2
@Override // android.util.Property
public PointF get(PathAnimatorMatrix pathAnimatorMatrix) {
return null;
}
@Override // android.util.Property
public void set(PathAnimatorMatrix pathAnimatorMatrix, PointF pointF) {
pathAnimatorMatrix.setTranslation(pointF);
}
};
private static final boolean SUPPORTS_VIEW_REMOVAL_SUPPRESSION = true;
public boolean getReparent() {
return this.mReparent;
}
public boolean getReparentWithOverlay() {
return this.mUseOverlay;
}
@Override // androidx.transition.Transition
public String[] getTransitionProperties() {
return sTransitionProperties;
}
public void setReparent(boolean z) {
this.mReparent = z;
}
public void setReparentWithOverlay(boolean z) {
this.mUseOverlay = z;
}
public ChangeTransform() {
this.mUseOverlay = true;
this.mReparent = true;
this.mTempMatrix = new Matrix();
}
public ChangeTransform(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.mUseOverlay = true;
this.mReparent = true;
this.mTempMatrix = new Matrix();
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, Styleable.CHANGE_TRANSFORM);
XmlPullParser xmlPullParser = (XmlPullParser) attributeSet;
this.mUseOverlay = TypedArrayUtils.getNamedBoolean(obtainStyledAttributes, xmlPullParser, "reparentWithOverlay", 1, true);
this.mReparent = TypedArrayUtils.getNamedBoolean(obtainStyledAttributes, xmlPullParser, "reparent", 0, true);
obtainStyledAttributes.recycle();
}
private void captureValues(TransitionValues transitionValues) {
View view = transitionValues.view;
if (view.getVisibility() == 8) {
return;
}
transitionValues.values.put(PROPNAME_PARENT, view.getParent());
transitionValues.values.put(PROPNAME_TRANSFORMS, new Transforms(view));
Matrix matrix = view.getMatrix();
transitionValues.values.put(PROPNAME_MATRIX, (matrix == null || matrix.isIdentity()) ? null : new Matrix(matrix));
if (this.mReparent) {
Matrix matrix2 = new Matrix();
ViewUtils.transformMatrixToGlobal((ViewGroup) view.getParent(), matrix2);
matrix2.preTranslate(-r2.getScrollX(), -r2.getScrollY());
transitionValues.values.put(PROPNAME_PARENT_MATRIX, matrix2);
transitionValues.values.put(PROPNAME_INTERMEDIATE_MATRIX, view.getTag(R.id.transition_transform));
transitionValues.values.put(PROPNAME_INTERMEDIATE_PARENT_MATRIX, view.getTag(R.id.parent_matrix));
}
}
@Override // androidx.transition.Transition
public void captureStartValues(TransitionValues transitionValues) {
captureValues(transitionValues);
if (SUPPORTS_VIEW_REMOVAL_SUPPRESSION) {
return;
}
((ViewGroup) transitionValues.view.getParent()).startViewTransition(transitionValues.view);
}
@Override // androidx.transition.Transition
public void captureEndValues(TransitionValues transitionValues) {
captureValues(transitionValues);
}
@Override // androidx.transition.Transition
public Animator createAnimator(ViewGroup viewGroup, TransitionValues transitionValues, TransitionValues transitionValues2) {
if (transitionValues == null || transitionValues2 == null || !transitionValues.values.containsKey(PROPNAME_PARENT) || !transitionValues2.values.containsKey(PROPNAME_PARENT)) {
return null;
}
ViewGroup viewGroup2 = (ViewGroup) transitionValues.values.get(PROPNAME_PARENT);
boolean z = this.mReparent && !parentsMatch(viewGroup2, (ViewGroup) transitionValues2.values.get(PROPNAME_PARENT));
Matrix matrix = (Matrix) transitionValues.values.get(PROPNAME_INTERMEDIATE_MATRIX);
if (matrix != null) {
transitionValues.values.put(PROPNAME_MATRIX, matrix);
}
Matrix matrix2 = (Matrix) transitionValues.values.get(PROPNAME_INTERMEDIATE_PARENT_MATRIX);
if (matrix2 != null) {
transitionValues.values.put(PROPNAME_PARENT_MATRIX, matrix2);
}
if (z) {
setMatricesForParent(transitionValues, transitionValues2);
}
ObjectAnimator createTransformAnimator = createTransformAnimator(transitionValues, transitionValues2, z);
if (z && createTransformAnimator != null && this.mUseOverlay) {
createGhostView(viewGroup, transitionValues, transitionValues2);
} else if (!SUPPORTS_VIEW_REMOVAL_SUPPRESSION) {
viewGroup2.endViewTransition(transitionValues.view);
}
return createTransformAnimator;
}
private ObjectAnimator createTransformAnimator(TransitionValues transitionValues, TransitionValues transitionValues2, final boolean z) {
Matrix matrix = (Matrix) transitionValues.values.get(PROPNAME_MATRIX);
Matrix matrix2 = (Matrix) transitionValues2.values.get(PROPNAME_MATRIX);
if (matrix == null) {
matrix = MatrixUtils.IDENTITY_MATRIX;
}
if (matrix2 == null) {
matrix2 = MatrixUtils.IDENTITY_MATRIX;
}
final Matrix matrix3 = matrix2;
if (matrix.equals(matrix3)) {
return null;
}
final Transforms transforms = (Transforms) transitionValues2.values.get(PROPNAME_TRANSFORMS);
final View view = transitionValues2.view;
setIdentityTransforms(view);
float[] fArr = new float[9];
matrix.getValues(fArr);
float[] fArr2 = new float[9];
matrix3.getValues(fArr2);
final PathAnimatorMatrix pathAnimatorMatrix = new PathAnimatorMatrix(view, fArr);
ObjectAnimator ofPropertyValuesHolder = ObjectAnimator.ofPropertyValuesHolder(pathAnimatorMatrix, PropertyValuesHolder.ofObject(NON_TRANSLATIONS_PROPERTY, new FloatArrayEvaluator(new float[9]), fArr, fArr2), PropertyValuesHolderUtils.ofPointF(TRANSLATIONS_PROPERTY, getPathMotion().getPath(fArr[2], fArr[5], fArr2[2], fArr2[5])));
AnimatorListenerAdapter animatorListenerAdapter = new AnimatorListenerAdapter() { // from class: androidx.transition.ChangeTransform.3
private boolean mIsCanceled;
private Matrix mTempMatrix = new Matrix();
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationCancel(Animator animator) {
this.mIsCanceled = true;
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
if (!this.mIsCanceled) {
if (z && ChangeTransform.this.mUseOverlay) {
setCurrentMatrix(matrix3);
} else {
view.setTag(R.id.transition_transform, null);
view.setTag(R.id.parent_matrix, null);
}
}
ViewUtils.setAnimationMatrix(view, null);
transforms.restore(view);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorPauseListener
public void onAnimationPause(Animator animator) {
setCurrentMatrix(pathAnimatorMatrix.getMatrix());
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorPauseListener
public void onAnimationResume(Animator animator) {
ChangeTransform.setIdentityTransforms(view);
}
private void setCurrentMatrix(Matrix matrix4) {
this.mTempMatrix.set(matrix4);
view.setTag(R.id.transition_transform, this.mTempMatrix);
transforms.restore(view);
}
};
ofPropertyValuesHolder.addListener(animatorListenerAdapter);
AnimatorUtils.addPauseListener(ofPropertyValuesHolder, animatorListenerAdapter);
return ofPropertyValuesHolder;
}
/* JADX WARN: Code restructure failed: missing block: B:11:0x001f, code lost:
return r1;
*/
/* JADX WARN: Code restructure failed: missing block: B:14:0x001a, code lost:
if (r4 == r5) goto L15;
*/
/* JADX WARN: Code restructure failed: missing block: B:8:0x0017, code lost:
if (r5 == r4.view) goto L15;
*/
/* JADX WARN: Code restructure failed: missing block: B:9:0x001d, code lost:
r1 = false;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private boolean parentsMatch(android.view.ViewGroup r4, android.view.ViewGroup r5) {
/*
r3 = this;
boolean r0 = r3.isValidTarget(r4)
r1 = 1
r2 = 0
if (r0 == 0) goto L1a
boolean r0 = r3.isValidTarget(r5)
if (r0 != 0) goto Lf
goto L1a
Lf:
androidx.transition.TransitionValues r4 = r3.getMatchedTransitionValues(r4, r1)
if (r4 == 0) goto L1f
android.view.View r4 = r4.view
if (r5 != r4) goto L1d
goto L1e
L1a:
if (r4 != r5) goto L1d
goto L1e
L1d:
r1 = 0
L1e:
r2 = r1
L1f:
return r2
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.transition.ChangeTransform.parentsMatch(android.view.ViewGroup, android.view.ViewGroup):boolean");
}
private void createGhostView(ViewGroup viewGroup, TransitionValues transitionValues, TransitionValues transitionValues2) {
View view = transitionValues2.view;
Matrix matrix = new Matrix((Matrix) transitionValues2.values.get(PROPNAME_PARENT_MATRIX));
ViewUtils.transformMatrixToLocal(viewGroup, matrix);
GhostView addGhost = GhostViewUtils.addGhost(view, viewGroup, matrix);
if (addGhost == null) {
return;
}
addGhost.reserveEndViewTransition((ViewGroup) transitionValues.values.get(PROPNAME_PARENT), transitionValues.view);
Transition transition = this;
while (transition.mParent != null) {
transition = transition.mParent;
}
transition.addListener(new GhostListener(view, addGhost));
if (SUPPORTS_VIEW_REMOVAL_SUPPRESSION) {
if (transitionValues.view != transitionValues2.view) {
ViewUtils.setTransitionAlpha(transitionValues.view, 0.0f);
}
ViewUtils.setTransitionAlpha(view, 1.0f);
}
}
private void setMatricesForParent(TransitionValues transitionValues, TransitionValues transitionValues2) {
Matrix matrix = (Matrix) transitionValues2.values.get(PROPNAME_PARENT_MATRIX);
transitionValues2.view.setTag(R.id.parent_matrix, matrix);
Matrix matrix2 = this.mTempMatrix;
matrix2.reset();
matrix.invert(matrix2);
Matrix matrix3 = (Matrix) transitionValues.values.get(PROPNAME_MATRIX);
if (matrix3 == null) {
matrix3 = new Matrix();
transitionValues.values.put(PROPNAME_MATRIX, matrix3);
}
matrix3.postConcat((Matrix) transitionValues.values.get(PROPNAME_PARENT_MATRIX));
matrix3.postConcat(matrix2);
}
static void setIdentityTransforms(View view) {
setTransforms(view, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f);
}
static void setTransforms(View view, float f, float f2, float f3, float f4, float f5, float f6, float f7, float f8) {
view.setTranslationX(f);
view.setTranslationY(f2);
ViewCompat.setTranslationZ(view, f3);
view.setScaleX(f4);
view.setScaleY(f5);
view.setRotationX(f6);
view.setRotationY(f7);
view.setRotation(f8);
}
private static class Transforms {
final float mRotationX;
final float mRotationY;
final float mRotationZ;
final float mScaleX;
final float mScaleY;
final float mTranslationX;
final float mTranslationY;
final float mTranslationZ;
Transforms(View view) {
this.mTranslationX = view.getTranslationX();
this.mTranslationY = view.getTranslationY();
this.mTranslationZ = ViewCompat.getTranslationZ(view);
this.mScaleX = view.getScaleX();
this.mScaleY = view.getScaleY();
this.mRotationX = view.getRotationX();
this.mRotationY = view.getRotationY();
this.mRotationZ = view.getRotation();
}
public void restore(View view) {
ChangeTransform.setTransforms(view, this.mTranslationX, this.mTranslationY, this.mTranslationZ, this.mScaleX, this.mScaleY, this.mRotationX, this.mRotationY, this.mRotationZ);
}
public boolean equals(Object obj) {
if (!(obj instanceof Transforms)) {
return false;
}
Transforms transforms = (Transforms) obj;
return transforms.mTranslationX == this.mTranslationX && transforms.mTranslationY == this.mTranslationY && transforms.mTranslationZ == this.mTranslationZ && transforms.mScaleX == this.mScaleX && transforms.mScaleY == this.mScaleY && transforms.mRotationX == this.mRotationX && transforms.mRotationY == this.mRotationY && transforms.mRotationZ == this.mRotationZ;
}
public int hashCode() {
float f = this.mTranslationX;
int floatToIntBits = (f != 0.0f ? Float.floatToIntBits(f) : 0) * 31;
float f2 = this.mTranslationY;
int floatToIntBits2 = (floatToIntBits + (f2 != 0.0f ? Float.floatToIntBits(f2) : 0)) * 31;
float f3 = this.mTranslationZ;
int floatToIntBits3 = (floatToIntBits2 + (f3 != 0.0f ? Float.floatToIntBits(f3) : 0)) * 31;
float f4 = this.mScaleX;
int floatToIntBits4 = (floatToIntBits3 + (f4 != 0.0f ? Float.floatToIntBits(f4) : 0)) * 31;
float f5 = this.mScaleY;
int floatToIntBits5 = (floatToIntBits4 + (f5 != 0.0f ? Float.floatToIntBits(f5) : 0)) * 31;
float f6 = this.mRotationX;
int floatToIntBits6 = (floatToIntBits5 + (f6 != 0.0f ? Float.floatToIntBits(f6) : 0)) * 31;
float f7 = this.mRotationY;
int floatToIntBits7 = (floatToIntBits6 + (f7 != 0.0f ? Float.floatToIntBits(f7) : 0)) * 31;
float f8 = this.mRotationZ;
return floatToIntBits7 + (f8 != 0.0f ? Float.floatToIntBits(f8) : 0);
}
}
private static class GhostListener extends TransitionListenerAdapter {
private GhostView mGhostView;
private View mView;
GhostListener(View view, GhostView ghostView) {
this.mView = view;
this.mGhostView = ghostView;
}
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionEnd(Transition transition) {
transition.removeListener(this);
GhostViewUtils.removeGhost(this.mView);
this.mView.setTag(R.id.transition_transform, null);
this.mView.setTag(R.id.parent_matrix, null);
}
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionPause(Transition transition) {
this.mGhostView.setVisibility(4);
}
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionResume(Transition transition) {
this.mGhostView.setVisibility(0);
}
}
private static class PathAnimatorMatrix {
private final Matrix mMatrix = new Matrix();
private float mTranslationX;
private float mTranslationY;
private final float[] mValues;
private final View mView;
Matrix getMatrix() {
return this.mMatrix;
}
PathAnimatorMatrix(View view, float[] fArr) {
this.mView = view;
float[] fArr2 = (float[]) fArr.clone();
this.mValues = fArr2;
this.mTranslationX = fArr2[2];
this.mTranslationY = fArr2[5];
setAnimationMatrix();
}
void setValues(float[] fArr) {
System.arraycopy(fArr, 0, this.mValues, 0, fArr.length);
setAnimationMatrix();
}
void setTranslation(PointF pointF) {
this.mTranslationX = pointF.x;
this.mTranslationY = pointF.y;
setAnimationMatrix();
}
private void setAnimationMatrix() {
float[] fArr = this.mValues;
fArr[2] = this.mTranslationX;
fArr[5] = this.mTranslationY;
this.mMatrix.setValues(fArr);
ViewUtils.setAnimationMatrix(this.mView, this.mMatrix);
}
}
}

View File

@ -0,0 +1,56 @@
package androidx.transition;
import android.graphics.Rect;
import android.view.ViewGroup;
/* loaded from: classes.dex */
public class CircularPropagation extends VisibilityPropagation {
private float mPropagationSpeed = 3.0f;
public void setPropagationSpeed(float f) {
if (f == 0.0f) {
throw new IllegalArgumentException("propagationSpeed may not be 0");
}
this.mPropagationSpeed = f;
}
@Override // androidx.transition.TransitionPropagation
public long getStartDelay(ViewGroup viewGroup, Transition transition, TransitionValues transitionValues, TransitionValues transitionValues2) {
int i;
int round;
int i2;
if (transitionValues == null && transitionValues2 == null) {
return 0L;
}
if (transitionValues2 == null || getViewVisibility(transitionValues) == 0) {
i = -1;
} else {
transitionValues = transitionValues2;
i = 1;
}
int viewX = getViewX(transitionValues);
int viewY = getViewY(transitionValues);
Rect epicenter = transition.getEpicenter();
if (epicenter != null) {
i2 = epicenter.centerX();
round = epicenter.centerY();
} else {
viewGroup.getLocationOnScreen(new int[2]);
int round2 = Math.round(r5[0] + (viewGroup.getWidth() / 2) + viewGroup.getTranslationX());
round = Math.round(r5[1] + (viewGroup.getHeight() / 2) + viewGroup.getTranslationY());
i2 = round2;
}
float distance = distance(viewX, viewY, i2, round) / distance(0.0f, 0.0f, viewGroup.getWidth(), viewGroup.getHeight());
long duration = transition.getDuration();
if (duration < 0) {
duration = 300;
}
return Math.round(((duration * i) / this.mPropagationSpeed) * distance);
}
private static float distance(float f, float f2, float f3, float f4) {
float f5 = f3 - f;
float f6 = f4 - f2;
return (float) Math.sqrt((f5 * f5) + (f6 * f6));
}
}

View File

@ -0,0 +1,126 @@
package androidx.transition;
import android.animation.Animator;
import android.animation.TimeInterpolator;
import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
/* loaded from: classes.dex */
public class Explode extends Visibility {
private static final String PROPNAME_SCREEN_BOUNDS = "android:explode:screenBounds";
private int[] mTempLoc;
private static final TimeInterpolator sDecelerate = new DecelerateInterpolator();
private static final TimeInterpolator sAccelerate = new AccelerateInterpolator();
public Explode() {
this.mTempLoc = new int[2];
setPropagation(new CircularPropagation());
}
public Explode(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.mTempLoc = new int[2];
setPropagation(new CircularPropagation());
}
private void captureValues(TransitionValues transitionValues) {
View view = transitionValues.view;
view.getLocationOnScreen(this.mTempLoc);
int[] iArr = this.mTempLoc;
int i = iArr[0];
int i2 = iArr[1];
transitionValues.values.put(PROPNAME_SCREEN_BOUNDS, new Rect(i, i2, view.getWidth() + i, view.getHeight() + i2));
}
@Override // androidx.transition.Visibility, androidx.transition.Transition
public void captureStartValues(TransitionValues transitionValues) {
super.captureStartValues(transitionValues);
captureValues(transitionValues);
}
@Override // androidx.transition.Visibility, androidx.transition.Transition
public void captureEndValues(TransitionValues transitionValues) {
super.captureEndValues(transitionValues);
captureValues(transitionValues);
}
@Override // androidx.transition.Visibility
public Animator onAppear(ViewGroup viewGroup, View view, TransitionValues transitionValues, TransitionValues transitionValues2) {
if (transitionValues2 == null) {
return null;
}
Rect rect = (Rect) transitionValues2.values.get(PROPNAME_SCREEN_BOUNDS);
float translationX = view.getTranslationX();
float translationY = view.getTranslationY();
calculateOut(viewGroup, rect, this.mTempLoc);
int[] iArr = this.mTempLoc;
return TranslationAnimationCreator.createAnimation(view, transitionValues2, rect.left, rect.top, translationX + iArr[0], translationY + iArr[1], translationX, translationY, sDecelerate, this);
}
@Override // androidx.transition.Visibility
public Animator onDisappear(ViewGroup viewGroup, View view, TransitionValues transitionValues, TransitionValues transitionValues2) {
float f;
float f2;
if (transitionValues == null) {
return null;
}
Rect rect = (Rect) transitionValues.values.get(PROPNAME_SCREEN_BOUNDS);
int i = rect.left;
int i2 = rect.top;
float translationX = view.getTranslationX();
float translationY = view.getTranslationY();
int[] iArr = (int[]) transitionValues.view.getTag(R.id.transition_position);
if (iArr != null) {
f = (iArr[0] - rect.left) + translationX;
f2 = (iArr[1] - rect.top) + translationY;
rect.offsetTo(iArr[0], iArr[1]);
} else {
f = translationX;
f2 = translationY;
}
calculateOut(viewGroup, rect, this.mTempLoc);
int[] iArr2 = this.mTempLoc;
return TranslationAnimationCreator.createAnimation(view, transitionValues, i, i2, translationX, translationY, f + iArr2[0], f2 + iArr2[1], sAccelerate, this);
}
private void calculateOut(View view, Rect rect, int[] iArr) {
int centerY;
int i;
view.getLocationOnScreen(this.mTempLoc);
int[] iArr2 = this.mTempLoc;
int i2 = iArr2[0];
int i3 = iArr2[1];
Rect epicenter = getEpicenter();
if (epicenter == null) {
i = (view.getWidth() / 2) + i2 + Math.round(view.getTranslationX());
centerY = (view.getHeight() / 2) + i3 + Math.round(view.getTranslationY());
} else {
int centerX = epicenter.centerX();
centerY = epicenter.centerY();
i = centerX;
}
float centerX2 = rect.centerX() - i;
float centerY2 = rect.centerY() - centerY;
if (centerX2 == 0.0f && centerY2 == 0.0f) {
centerX2 = ((float) (Math.random() * 2.0d)) - 1.0f;
centerY2 = ((float) (Math.random() * 2.0d)) - 1.0f;
}
float calculateDistance = calculateDistance(centerX2, centerY2);
float calculateMaxDistance = calculateMaxDistance(view, i - i2, centerY - i3);
iArr[0] = Math.round((centerX2 / calculateDistance) * calculateMaxDistance);
iArr[1] = Math.round(calculateMaxDistance * (centerY2 / calculateDistance));
}
private static float calculateMaxDistance(View view, int i, int i2) {
return calculateDistance(Math.max(i, view.getWidth() - i), Math.max(i2, view.getHeight() - i2));
}
private static float calculateDistance(float f, float f2) {
return (float) Math.sqrt((f * f) + (f2 * f2));
}
}

View File

@ -0,0 +1,101 @@
package androidx.transition;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import androidx.core.content.res.TypedArrayUtils;
import androidx.core.view.ViewCompat;
/* loaded from: classes.dex */
public class Fade extends Visibility {
public static final int IN = 1;
private static final String LOG_TAG = "Fade";
public static final int OUT = 2;
private static final String PROPNAME_TRANSITION_ALPHA = "android:fade:transitionAlpha";
public Fade(int i) {
setMode(i);
}
public Fade() {
}
public Fade(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, Styleable.FADE);
setMode(TypedArrayUtils.getNamedInt(obtainStyledAttributes, (XmlResourceParser) attributeSet, "fadingMode", 0, getMode()));
obtainStyledAttributes.recycle();
}
@Override // androidx.transition.Visibility, androidx.transition.Transition
public void captureStartValues(TransitionValues transitionValues) {
super.captureStartValues(transitionValues);
transitionValues.values.put(PROPNAME_TRANSITION_ALPHA, Float.valueOf(ViewUtils.getTransitionAlpha(transitionValues.view)));
}
private Animator createAnimation(final View view, float f, float f2) {
if (f == f2) {
return null;
}
ViewUtils.setTransitionAlpha(view, f);
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(view, ViewUtils.TRANSITION_ALPHA, f2);
ofFloat.addListener(new FadeAnimatorListener(view));
addListener(new TransitionListenerAdapter() { // from class: androidx.transition.Fade.1
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionEnd(Transition transition) {
ViewUtils.setTransitionAlpha(view, 1.0f);
ViewUtils.clearNonTransitionAlpha(view);
transition.removeListener(this);
}
});
return ofFloat;
}
@Override // androidx.transition.Visibility
public Animator onAppear(ViewGroup viewGroup, View view, TransitionValues transitionValues, TransitionValues transitionValues2) {
float startAlpha = getStartAlpha(transitionValues, 0.0f);
return createAnimation(view, startAlpha != 1.0f ? startAlpha : 0.0f, 1.0f);
}
@Override // androidx.transition.Visibility
public Animator onDisappear(ViewGroup viewGroup, View view, TransitionValues transitionValues, TransitionValues transitionValues2) {
ViewUtils.saveNonTransitionAlpha(view);
return createAnimation(view, getStartAlpha(transitionValues, 1.0f), 0.0f);
}
private static float getStartAlpha(TransitionValues transitionValues, float f) {
Float f2;
return (transitionValues == null || (f2 = (Float) transitionValues.values.get(PROPNAME_TRANSITION_ALPHA)) == null) ? f : f2.floatValue();
}
private static class FadeAnimatorListener extends AnimatorListenerAdapter {
private boolean mLayerTypeChanged = false;
private final View mView;
FadeAnimatorListener(View view) {
this.mView = view;
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationStart(Animator animator) {
if (ViewCompat.hasOverlappingRendering(this.mView) && this.mView.getLayerType() == 0) {
this.mLayerTypeChanged = true;
this.mView.setLayerType(2, null);
}
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
ViewUtils.setTransitionAlpha(this.mView, 1.0f);
if (this.mLayerTypeChanged) {
this.mView.setLayerType(0, null);
}
}
}
}

View File

@ -0,0 +1,25 @@
package androidx.transition;
import android.animation.TypeEvaluator;
/* loaded from: classes.dex */
class FloatArrayEvaluator implements TypeEvaluator<float[]> {
private float[] mArray;
FloatArrayEvaluator(float[] fArr) {
this.mArray = fArr;
}
@Override // android.animation.TypeEvaluator
public float[] evaluate(float f, float[] fArr, float[] fArr2) {
float[] fArr3 = this.mArray;
if (fArr3 == null) {
fArr3 = new float[fArr.length];
}
for (int i = 0; i < fArr3.length; i++) {
float f2 = fArr[i];
fArr3[i] = f2 + ((fArr2[i] - f2) * f);
}
return fArr3;
}
}

View File

@ -0,0 +1,260 @@
package androidx.transition;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.FragmentTransitionImpl;
import androidx.transition.Transition;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes.dex */
public class FragmentTransitionSupport extends FragmentTransitionImpl {
@Override // androidx.fragment.app.FragmentTransitionImpl
public boolean canHandle(Object obj) {
return obj instanceof Transition;
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public Object cloneTransition(Object obj) {
if (obj != null) {
return ((Transition) obj).mo185clone();
}
return null;
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public Object wrapTransitionInSet(Object obj) {
if (obj == null) {
return null;
}
TransitionSet transitionSet = new TransitionSet();
transitionSet.addTransition((Transition) obj);
return transitionSet;
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public void setSharedElementTargets(Object obj, View view, ArrayList<View> arrayList) {
TransitionSet transitionSet = (TransitionSet) obj;
List<View> targets = transitionSet.getTargets();
targets.clear();
int size = arrayList.size();
for (int i = 0; i < size; i++) {
bfsAddViewChildren(targets, arrayList.get(i));
}
targets.add(view);
arrayList.add(view);
addTargets(transitionSet, arrayList);
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public void setEpicenter(Object obj, View view) {
if (view != null) {
final Rect rect = new Rect();
getBoundsOnScreen(view, rect);
((Transition) obj).setEpicenterCallback(new Transition.EpicenterCallback() { // from class: androidx.transition.FragmentTransitionSupport.1
@Override // androidx.transition.Transition.EpicenterCallback
public Rect onGetEpicenter(Transition transition) {
return rect;
}
});
}
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public void addTargets(Object obj, ArrayList<View> arrayList) {
Transition transition = (Transition) obj;
if (transition == null) {
return;
}
int i = 0;
if (transition instanceof TransitionSet) {
TransitionSet transitionSet = (TransitionSet) transition;
int transitionCount = transitionSet.getTransitionCount();
while (i < transitionCount) {
addTargets(transitionSet.getTransitionAt(i), arrayList);
i++;
}
return;
}
if (hasSimpleTarget(transition) || !isNullOrEmpty(transition.getTargets())) {
return;
}
int size = arrayList.size();
while (i < size) {
transition.addTarget(arrayList.get(i));
i++;
}
}
private static boolean hasSimpleTarget(Transition transition) {
return (isNullOrEmpty(transition.getTargetIds()) && isNullOrEmpty(transition.getTargetNames()) && isNullOrEmpty(transition.getTargetTypes())) ? false : true;
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public Object mergeTransitionsTogether(Object obj, Object obj2, Object obj3) {
TransitionSet transitionSet = new TransitionSet();
if (obj != null) {
transitionSet.addTransition((Transition) obj);
}
if (obj2 != null) {
transitionSet.addTransition((Transition) obj2);
}
if (obj3 != null) {
transitionSet.addTransition((Transition) obj3);
}
return transitionSet;
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public void scheduleHideFragmentView(Object obj, final View view, final ArrayList<View> arrayList) {
((Transition) obj).addListener(new Transition.TransitionListener() { // from class: androidx.transition.FragmentTransitionSupport.2
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionCancel(Transition transition) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionPause(Transition transition) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionResume(Transition transition) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionStart(Transition transition) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionEnd(Transition transition) {
transition.removeListener(this);
view.setVisibility(8);
int size = arrayList.size();
for (int i = 0; i < size; i++) {
((View) arrayList.get(i)).setVisibility(0);
}
}
});
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public Object mergeTransitionsInSequence(Object obj, Object obj2, Object obj3) {
Transition transition = (Transition) obj;
Transition transition2 = (Transition) obj2;
Transition transition3 = (Transition) obj3;
if (transition != null && transition2 != null) {
transition = new TransitionSet().addTransition(transition).addTransition(transition2).setOrdering(1);
} else if (transition == null) {
transition = transition2 != null ? transition2 : null;
}
if (transition3 == null) {
return transition;
}
TransitionSet transitionSet = new TransitionSet();
if (transition != null) {
transitionSet.addTransition(transition);
}
transitionSet.addTransition(transition3);
return transitionSet;
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public void beginDelayedTransition(ViewGroup viewGroup, Object obj) {
TransitionManager.beginDelayedTransition(viewGroup, (Transition) obj);
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public void scheduleRemoveTargets(Object obj, final Object obj2, final ArrayList<View> arrayList, final Object obj3, final ArrayList<View> arrayList2, final Object obj4, final ArrayList<View> arrayList3) {
((Transition) obj).addListener(new TransitionListenerAdapter() { // from class: androidx.transition.FragmentTransitionSupport.3
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionStart(Transition transition) {
Object obj5 = obj2;
if (obj5 != null) {
FragmentTransitionSupport.this.replaceTargets(obj5, arrayList, null);
}
Object obj6 = obj3;
if (obj6 != null) {
FragmentTransitionSupport.this.replaceTargets(obj6, arrayList2, null);
}
Object obj7 = obj4;
if (obj7 != null) {
FragmentTransitionSupport.this.replaceTargets(obj7, arrayList3, null);
}
}
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionEnd(Transition transition) {
transition.removeListener(this);
}
});
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public void swapSharedElementTargets(Object obj, ArrayList<View> arrayList, ArrayList<View> arrayList2) {
TransitionSet transitionSet = (TransitionSet) obj;
if (transitionSet != null) {
transitionSet.getTargets().clear();
transitionSet.getTargets().addAll(arrayList2);
replaceTargets(transitionSet, arrayList, arrayList2);
}
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public void replaceTargets(Object obj, ArrayList<View> arrayList, ArrayList<View> arrayList2) {
Transition transition = (Transition) obj;
int i = 0;
if (transition instanceof TransitionSet) {
TransitionSet transitionSet = (TransitionSet) transition;
int transitionCount = transitionSet.getTransitionCount();
while (i < transitionCount) {
replaceTargets(transitionSet.getTransitionAt(i), arrayList, arrayList2);
i++;
}
return;
}
if (hasSimpleTarget(transition)) {
return;
}
List<View> targets = transition.getTargets();
if (targets.size() == arrayList.size() && targets.containsAll(arrayList)) {
int size = arrayList2 == null ? 0 : arrayList2.size();
while (i < size) {
transition.addTarget(arrayList2.get(i));
i++;
}
for (int size2 = arrayList.size() - 1; size2 >= 0; size2--) {
transition.removeTarget(arrayList.get(size2));
}
}
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public void addTarget(Object obj, View view) {
if (obj != null) {
((Transition) obj).addTarget(view);
}
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public void removeTarget(Object obj, View view) {
if (obj != null) {
((Transition) obj).removeTarget(view);
}
}
@Override // androidx.fragment.app.FragmentTransitionImpl
public void setEpicenter(Object obj, final Rect rect) {
if (obj != null) {
((Transition) obj).setEpicenterCallback(new Transition.EpicenterCallback() { // from class: androidx.transition.FragmentTransitionSupport.4
@Override // androidx.transition.Transition.EpicenterCallback
public Rect onGetEpicenter(Transition transition) {
Rect rect2 = rect;
if (rect2 == null || rect2.isEmpty()) {
return null;
}
return rect;
}
});
}
}
}

View File

@ -0,0 +1,11 @@
package androidx.transition;
import android.view.View;
import android.view.ViewGroup;
/* loaded from: classes.dex */
interface GhostView {
void reserveEndViewTransition(ViewGroup viewGroup, View view);
void setVisibility(int i);
}

View File

@ -0,0 +1,120 @@
package androidx.transition;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import java.util.ArrayList;
/* loaded from: classes.dex */
class GhostViewHolder extends FrameLayout {
private boolean mAttached;
private ViewGroup mParent;
GhostViewHolder(ViewGroup viewGroup) {
super(viewGroup.getContext());
setClipChildren(false);
this.mParent = viewGroup;
viewGroup.setTag(R.id.ghost_view_holder, this);
ViewGroupUtils.getOverlay(this.mParent).add(this);
this.mAttached = true;
}
@Override // android.view.ViewGroup
public void onViewAdded(View view) {
if (!this.mAttached) {
throw new IllegalStateException("This GhostViewHolder is detached!");
}
super.onViewAdded(view);
}
@Override // android.view.ViewGroup
public void onViewRemoved(View view) {
super.onViewRemoved(view);
if ((getChildCount() == 1 && getChildAt(0) == view) || getChildCount() == 0) {
this.mParent.setTag(R.id.ghost_view_holder, null);
ViewGroupUtils.getOverlay(this.mParent).remove(this);
this.mAttached = false;
}
}
static GhostViewHolder getHolder(ViewGroup viewGroup) {
return (GhostViewHolder) viewGroup.getTag(R.id.ghost_view_holder);
}
void popToOverlayTop() {
if (!this.mAttached) {
throw new IllegalStateException("This GhostViewHolder is detached!");
}
ViewGroupUtils.getOverlay(this.mParent).remove(this);
ViewGroupUtils.getOverlay(this.mParent).add(this);
}
void addGhostView(GhostViewPort ghostViewPort) {
ArrayList<View> arrayList = new ArrayList<>();
getParents(ghostViewPort.mView, arrayList);
int insertIndex = getInsertIndex(arrayList);
if (insertIndex < 0 || insertIndex >= getChildCount()) {
addView(ghostViewPort);
} else {
addView(ghostViewPort, insertIndex);
}
}
private int getInsertIndex(ArrayList<View> arrayList) {
ArrayList arrayList2 = new ArrayList();
int childCount = getChildCount() - 1;
int i = 0;
while (i <= childCount) {
int i2 = (i + childCount) / 2;
getParents(((GhostViewPort) getChildAt(i2)).mView, arrayList2);
if (isOnTop(arrayList, (ArrayList<View>) arrayList2)) {
i = i2 + 1;
} else {
childCount = i2 - 1;
}
arrayList2.clear();
}
return i;
}
private static boolean isOnTop(ArrayList<View> arrayList, ArrayList<View> arrayList2) {
if (arrayList.isEmpty() || arrayList2.isEmpty() || arrayList.get(0) != arrayList2.get(0)) {
return true;
}
int min = Math.min(arrayList.size(), arrayList2.size());
for (int i = 1; i < min; i++) {
View view = arrayList.get(i);
View view2 = arrayList2.get(i);
if (view != view2) {
return isOnTop(view, view2);
}
}
return arrayList2.size() == min;
}
private static void getParents(View view, ArrayList<View> arrayList) {
Object parent = view.getParent();
if (parent instanceof ViewGroup) {
getParents((View) parent, arrayList);
}
arrayList.add(view);
}
private static boolean isOnTop(View view, View view2) {
ViewGroup viewGroup = (ViewGroup) view.getParent();
int childCount = viewGroup.getChildCount();
if (view.getZ() != view2.getZ()) {
return view.getZ() > view2.getZ();
}
for (int i = 0; i < childCount; i++) {
View childAt = viewGroup.getChildAt(ViewGroupUtils.getChildDrawingOrder(viewGroup, i));
if (childAt == view) {
return false;
}
if (childAt == view2) {
break;
}
}
return true;
}
}

View File

@ -0,0 +1,102 @@
package androidx.transition;
import android.graphics.Matrix;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
class GhostViewPlatform implements GhostView {
private static final String TAG = "GhostViewApi21";
private static Method sAddGhostMethod;
private static boolean sAddGhostMethodFetched;
private static Class<?> sGhostViewClass;
private static boolean sGhostViewClassFetched;
private static Method sRemoveGhostMethod;
private static boolean sRemoveGhostMethodFetched;
private final View mGhostView;
@Override // androidx.transition.GhostView
public void reserveEndViewTransition(ViewGroup viewGroup, View view) {
}
static GhostView addGhost(View view, ViewGroup viewGroup, Matrix matrix) {
fetchAddGhostMethod();
Method method = sAddGhostMethod;
if (method != null) {
try {
return new GhostViewPlatform((View) method.invoke(null, view, viewGroup, matrix));
} catch (IllegalAccessException unused) {
} catch (InvocationTargetException e) {
throw new RuntimeException(e.getCause());
}
}
return null;
}
static void removeGhost(View view) {
fetchRemoveGhostMethod();
Method method = sRemoveGhostMethod;
if (method != null) {
try {
method.invoke(null, view);
} catch (IllegalAccessException unused) {
} catch (InvocationTargetException e) {
throw new RuntimeException(e.getCause());
}
}
}
private GhostViewPlatform(View view) {
this.mGhostView = view;
}
@Override // androidx.transition.GhostView
public void setVisibility(int i) {
this.mGhostView.setVisibility(i);
}
private static void fetchGhostViewClass() {
if (sGhostViewClassFetched) {
return;
}
try {
sGhostViewClass = Class.forName("android.view.GhostView");
} catch (ClassNotFoundException e) {
Log.i(TAG, "Failed to retrieve GhostView class", e);
}
sGhostViewClassFetched = true;
}
private static void fetchAddGhostMethod() {
if (sAddGhostMethodFetched) {
return;
}
try {
fetchGhostViewClass();
Method declaredMethod = sGhostViewClass.getDeclaredMethod("addGhost", View.class, ViewGroup.class, Matrix.class);
sAddGhostMethod = declaredMethod;
declaredMethod.setAccessible(true);
} catch (NoSuchMethodException e) {
Log.i(TAG, "Failed to retrieve addGhost method", e);
}
sAddGhostMethodFetched = true;
}
private static void fetchRemoveGhostMethod() {
if (sRemoveGhostMethodFetched) {
return;
}
try {
fetchGhostViewClass();
Method declaredMethod = sGhostViewClass.getDeclaredMethod("removeGhost", View.class);
sRemoveGhostMethod = declaredMethod;
declaredMethod.setAccessible(true);
} catch (NoSuchMethodException e) {
Log.i(TAG, "Failed to retrieve removeGhost method", e);
}
sRemoveGhostMethodFetched = true;
}
}

View File

@ -0,0 +1,163 @@
package androidx.transition;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import androidx.core.view.ViewCompat;
/* loaded from: classes.dex */
class GhostViewPort extends ViewGroup implements GhostView {
private Matrix mMatrix;
private final ViewTreeObserver.OnPreDrawListener mOnPreDrawListener;
int mReferences;
ViewGroup mStartParent;
View mStartView;
final View mView;
@Override // android.view.ViewGroup, android.view.View
protected void onLayout(boolean z, int i, int i2, int i3, int i4) {
}
@Override // androidx.transition.GhostView
public void reserveEndViewTransition(ViewGroup viewGroup, View view) {
this.mStartParent = viewGroup;
this.mStartView = view;
}
void setMatrix(Matrix matrix) {
this.mMatrix = matrix;
}
GhostViewPort(View view) {
super(view.getContext());
this.mOnPreDrawListener = new ViewTreeObserver.OnPreDrawListener() { // from class: androidx.transition.GhostViewPort.1
@Override // android.view.ViewTreeObserver.OnPreDrawListener
public boolean onPreDraw() {
ViewCompat.postInvalidateOnAnimation(GhostViewPort.this);
if (GhostViewPort.this.mStartParent == null || GhostViewPort.this.mStartView == null) {
return true;
}
GhostViewPort.this.mStartParent.endViewTransition(GhostViewPort.this.mStartView);
ViewCompat.postInvalidateOnAnimation(GhostViewPort.this.mStartParent);
GhostViewPort.this.mStartParent = null;
GhostViewPort.this.mStartView = null;
return true;
}
};
this.mView = view;
setWillNotDraw(false);
setLayerType(2, null);
}
@Override // android.view.View, androidx.transition.GhostView
public void setVisibility(int i) {
super.setVisibility(i);
if (getGhostView(this.mView) == this) {
ViewUtils.setTransitionVisibility(this.mView, i == 0 ? 4 : 0);
}
}
@Override // android.view.ViewGroup, android.view.View
protected void onAttachedToWindow() {
super.onAttachedToWindow();
setGhostView(this.mView, this);
this.mView.getViewTreeObserver().addOnPreDrawListener(this.mOnPreDrawListener);
ViewUtils.setTransitionVisibility(this.mView, 4);
if (this.mView.getParent() != null) {
((View) this.mView.getParent()).invalidate();
}
}
@Override // android.view.ViewGroup, android.view.View
protected void onDetachedFromWindow() {
this.mView.getViewTreeObserver().removeOnPreDrawListener(this.mOnPreDrawListener);
ViewUtils.setTransitionVisibility(this.mView, 0);
setGhostView(this.mView, null);
if (this.mView.getParent() != null) {
((View) this.mView.getParent()).invalidate();
}
super.onDetachedFromWindow();
}
@Override // android.view.View
protected void onDraw(Canvas canvas) {
CanvasUtils.enableZ(canvas, true);
canvas.setMatrix(this.mMatrix);
ViewUtils.setTransitionVisibility(this.mView, 0);
this.mView.invalidate();
ViewUtils.setTransitionVisibility(this.mView, 4);
drawChild(canvas, this.mView, getDrawingTime());
CanvasUtils.enableZ(canvas, false);
}
static void copySize(View view, View view2) {
ViewUtils.setLeftTopRightBottom(view2, view2.getLeft(), view2.getTop(), view2.getLeft() + view.getWidth(), view2.getTop() + view.getHeight());
}
static GhostViewPort getGhostView(View view) {
return (GhostViewPort) view.getTag(R.id.ghost_view);
}
static void setGhostView(View view, GhostViewPort ghostViewPort) {
view.setTag(R.id.ghost_view, ghostViewPort);
}
static void calculateMatrix(View view, ViewGroup viewGroup, Matrix matrix) {
ViewGroup viewGroup2 = (ViewGroup) view.getParent();
matrix.reset();
ViewUtils.transformMatrixToGlobal(viewGroup2, matrix);
matrix.preTranslate(-viewGroup2.getScrollX(), -viewGroup2.getScrollY());
ViewUtils.transformMatrixToLocal(viewGroup, matrix);
}
static GhostViewPort addGhost(View view, ViewGroup viewGroup, Matrix matrix) {
int i;
GhostViewHolder ghostViewHolder;
if (!(view.getParent() instanceof ViewGroup)) {
throw new IllegalArgumentException("Ghosted views must be parented by a ViewGroup");
}
GhostViewHolder holder = GhostViewHolder.getHolder(viewGroup);
GhostViewPort ghostView = getGhostView(view);
if (ghostView == null || (ghostViewHolder = (GhostViewHolder) ghostView.getParent()) == holder) {
i = 0;
} else {
i = ghostView.mReferences;
ghostViewHolder.removeView(ghostView);
ghostView = null;
}
if (ghostView == null) {
if (matrix == null) {
matrix = new Matrix();
calculateMatrix(view, viewGroup, matrix);
}
ghostView = new GhostViewPort(view);
ghostView.setMatrix(matrix);
if (holder == null) {
holder = new GhostViewHolder(viewGroup);
} else {
holder.popToOverlayTop();
}
copySize(viewGroup, holder);
copySize(viewGroup, ghostView);
holder.addGhostView(ghostView);
ghostView.mReferences = i;
} else if (matrix != null) {
ghostView.setMatrix(matrix);
}
ghostView.mReferences++;
return ghostView;
}
static void removeGhost(View view) {
GhostViewPort ghostView = getGhostView(view);
if (ghostView != null) {
int i = ghostView.mReferences - 1;
ghostView.mReferences = i;
if (i <= 0) {
((GhostViewHolder) ghostView.getParent()).removeView(ghostView);
}
}
}
}

View File

@ -0,0 +1,27 @@
package androidx.transition;
import android.graphics.Matrix;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
/* loaded from: classes.dex */
class GhostViewUtils {
static GhostView addGhost(View view, ViewGroup viewGroup, Matrix matrix) {
if (Build.VERSION.SDK_INT == 28) {
return GhostViewPlatform.addGhost(view, viewGroup, matrix);
}
return GhostViewPort.addGhost(view, viewGroup, matrix);
}
static void removeGhost(View view) {
if (Build.VERSION.SDK_INT == 28) {
GhostViewPlatform.removeGhost(view);
} else {
GhostViewPort.removeGhost(view);
}
}
private GhostViewUtils() {
}
}

View File

@ -0,0 +1,57 @@
package androidx.transition;
import android.graphics.Matrix;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.widget.ImageView;
import java.lang.reflect.Field;
/* loaded from: classes.dex */
class ImageViewUtils {
private static Field sDrawMatrixField = null;
private static boolean sDrawMatrixFieldFetched = false;
private static boolean sTryHiddenAnimateTransform = true;
static void animateTransform(ImageView imageView, Matrix matrix) {
if (Build.VERSION.SDK_INT >= 29) {
imageView.animateTransform(matrix);
return;
}
if (matrix == null) {
Drawable drawable = imageView.getDrawable();
if (drawable != null) {
drawable.setBounds(0, 0, (imageView.getWidth() - imageView.getPaddingLeft()) - imageView.getPaddingRight(), (imageView.getHeight() - imageView.getPaddingTop()) - imageView.getPaddingBottom());
imageView.invalidate();
return;
}
return;
}
hiddenAnimateTransform(imageView, matrix);
}
private static void hiddenAnimateTransform(ImageView imageView, Matrix matrix) {
if (sTryHiddenAnimateTransform) {
try {
imageView.animateTransform(matrix);
} catch (NoSuchMethodError unused) {
sTryHiddenAnimateTransform = false;
}
}
}
private static void fetchDrawMatrixField() {
if (sDrawMatrixFieldFetched) {
return;
}
try {
Field declaredField = ImageView.class.getDeclaredField("mDrawMatrix");
sDrawMatrixField = declaredField;
declaredField.setAccessible(true);
} catch (NoSuchFieldException unused) {
}
sDrawMatrixFieldFetched = true;
}
private ImageViewUtils() {
}
}

View File

@ -0,0 +1,190 @@
package androidx.transition;
import android.graphics.Matrix;
import android.graphics.RectF;
/* loaded from: classes.dex */
class MatrixUtils {
static final Matrix IDENTITY_MATRIX = new Matrix() { // from class: androidx.transition.MatrixUtils.1
void oops() {
throw new IllegalStateException("Matrix can not be modified");
}
@Override // android.graphics.Matrix
public void set(Matrix matrix) {
oops();
}
@Override // android.graphics.Matrix
public void reset() {
oops();
}
@Override // android.graphics.Matrix
public void setTranslate(float f, float f2) {
oops();
}
@Override // android.graphics.Matrix
public void setScale(float f, float f2, float f3, float f4) {
oops();
}
@Override // android.graphics.Matrix
public void setScale(float f, float f2) {
oops();
}
@Override // android.graphics.Matrix
public void setRotate(float f, float f2, float f3) {
oops();
}
@Override // android.graphics.Matrix
public void setRotate(float f) {
oops();
}
@Override // android.graphics.Matrix
public void setSinCos(float f, float f2, float f3, float f4) {
oops();
}
@Override // android.graphics.Matrix
public void setSinCos(float f, float f2) {
oops();
}
@Override // android.graphics.Matrix
public void setSkew(float f, float f2, float f3, float f4) {
oops();
}
@Override // android.graphics.Matrix
public void setSkew(float f, float f2) {
oops();
}
@Override // android.graphics.Matrix
public boolean setConcat(Matrix matrix, Matrix matrix2) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean preTranslate(float f, float f2) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean preScale(float f, float f2, float f3, float f4) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean preScale(float f, float f2) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean preRotate(float f, float f2, float f3) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean preRotate(float f) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean preSkew(float f, float f2, float f3, float f4) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean preSkew(float f, float f2) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean preConcat(Matrix matrix) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean postTranslate(float f, float f2) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean postScale(float f, float f2, float f3, float f4) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean postScale(float f, float f2) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean postRotate(float f, float f2, float f3) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean postRotate(float f) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean postSkew(float f, float f2, float f3, float f4) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean postSkew(float f, float f2) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean postConcat(Matrix matrix) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean setRectToRect(RectF rectF, RectF rectF2, Matrix.ScaleToFit scaleToFit) {
oops();
return false;
}
@Override // android.graphics.Matrix
public boolean setPolyToPoly(float[] fArr, int i, float[] fArr2, int i2, int i3) {
oops();
return false;
}
@Override // android.graphics.Matrix
public void setValues(float[] fArr) {
oops();
}
};
private MatrixUtils() {
}
}

View File

@ -0,0 +1,17 @@
package androidx.transition;
import android.animation.ObjectAnimator;
import android.animation.TypeConverter;
import android.graphics.Path;
import android.graphics.PointF;
import android.util.Property;
/* loaded from: classes.dex */
class ObjectAnimatorUtils {
static <T> ObjectAnimator ofPointF(T t, Property<T, PointF> property, Path path) {
return ObjectAnimator.ofObject(t, property, (TypeConverter) null, path);
}
private ObjectAnimatorUtils() {
}
}

View File

@ -0,0 +1,16 @@
package androidx.transition;
import android.content.Context;
import android.graphics.Path;
import android.util.AttributeSet;
/* loaded from: classes.dex */
public abstract class PathMotion {
public abstract Path getPath(float f, float f2, float f3, float f4);
public PathMotion() {
}
public PathMotion(Context context, AttributeSet attributeSet) {
}
}

View File

@ -0,0 +1,53 @@
package androidx.transition;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.graphics.PointF;
import android.util.Property;
/* loaded from: classes.dex */
class PathProperty<T> extends Property<T, Float> {
private float mCurrentFraction;
private final float mPathLength;
private final PathMeasure mPathMeasure;
private final PointF mPointF;
private final float[] mPosition;
private final Property<T, PointF> mProperty;
/* JADX WARN: Multi-variable type inference failed */
@Override // android.util.Property
public /* bridge */ /* synthetic */ Float get(Object obj) {
return get((PathProperty<T>) obj);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // android.util.Property
public /* bridge */ /* synthetic */ void set(Object obj, Float f) {
set2((PathProperty<T>) obj, f);
}
PathProperty(Property<T, PointF> property, Path path) {
super(Float.class, property.getName());
this.mPosition = new float[2];
this.mPointF = new PointF();
this.mProperty = property;
PathMeasure pathMeasure = new PathMeasure(path, false);
this.mPathMeasure = pathMeasure;
this.mPathLength = pathMeasure.getLength();
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.util.Property
public Float get(T t) {
return Float.valueOf(this.mCurrentFraction);
}
/* renamed from: set, reason: avoid collision after fix types in other method */
public void set2(T t, Float f) {
this.mCurrentFraction = f.floatValue();
this.mPathMeasure.getPosTan(this.mPathLength * f.floatValue(), this.mPosition, null);
this.mPointF.x = this.mPosition[0];
this.mPointF.y = this.mPosition[1];
this.mProperty.set(t, this.mPointF);
}
}

View File

@ -0,0 +1,91 @@
package androidx.transition;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Matrix;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.util.AttributeSet;
import androidx.core.content.res.TypedArrayUtils;
import androidx.core.graphics.PathParser;
import org.xmlpull.v1.XmlPullParser;
/* loaded from: classes.dex */
public class PatternPathMotion extends PathMotion {
private Path mOriginalPatternPath;
private final Path mPatternPath;
private final Matrix mTempMatrix;
public Path getPatternPath() {
return this.mOriginalPatternPath;
}
public PatternPathMotion() {
Path path = new Path();
this.mPatternPath = path;
this.mTempMatrix = new Matrix();
path.lineTo(1.0f, 0.0f);
this.mOriginalPatternPath = path;
}
public PatternPathMotion(Context context, AttributeSet attributeSet) {
this.mPatternPath = new Path();
this.mTempMatrix = new Matrix();
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, Styleable.PATTERN_PATH_MOTION);
try {
String namedString = TypedArrayUtils.getNamedString(obtainStyledAttributes, (XmlPullParser) attributeSet, "patternPathData", 0);
if (namedString == null) {
throw new RuntimeException("pathData must be supplied for patternPathMotion");
}
setPatternPath(PathParser.createPathFromPathData(namedString));
} finally {
obtainStyledAttributes.recycle();
}
}
public PatternPathMotion(Path path) {
this.mPatternPath = new Path();
this.mTempMatrix = new Matrix();
setPatternPath(path);
}
public void setPatternPath(Path path) {
PathMeasure pathMeasure = new PathMeasure(path, false);
float[] fArr = new float[2];
pathMeasure.getPosTan(pathMeasure.getLength(), fArr, null);
float f = fArr[0];
float f2 = fArr[1];
pathMeasure.getPosTan(0.0f, fArr, null);
float f3 = fArr[0];
float f4 = fArr[1];
if (f3 == f && f4 == f2) {
throw new IllegalArgumentException("pattern must not end at the starting point");
}
this.mTempMatrix.setTranslate(-f3, -f4);
float f5 = f - f3;
float f6 = f2 - f4;
float distance = 1.0f / distance(f5, f6);
this.mTempMatrix.postScale(distance, distance);
this.mTempMatrix.postRotate((float) Math.toDegrees(-Math.atan2(f6, f5)));
path.transform(this.mTempMatrix, this.mPatternPath);
this.mOriginalPatternPath = path;
}
@Override // androidx.transition.PathMotion
public Path getPath(float f, float f2, float f3, float f4) {
float f5 = f3 - f;
float f6 = f4 - f2;
float distance = distance(f5, f6);
double atan2 = Math.atan2(f6, f5);
this.mTempMatrix.setScale(distance, distance);
this.mTempMatrix.postRotate((float) Math.toDegrees(atan2));
this.mTempMatrix.postTranslate(f, f2);
Path path = new Path();
this.mPatternPath.transform(this.mTempMatrix, path);
return path;
}
private static float distance(float f, float f2) {
return (float) Math.sqrt((f * f) + (f2 * f2));
}
}

View File

@ -0,0 +1,17 @@
package androidx.transition;
import android.animation.PropertyValuesHolder;
import android.animation.TypeConverter;
import android.graphics.Path;
import android.graphics.PointF;
import android.util.Property;
/* loaded from: classes.dex */
class PropertyValuesHolderUtils {
static PropertyValuesHolder ofPointF(Property<?, PointF> property, Path path) {
return PropertyValuesHolder.ofObject(property, (TypeConverter) null, path);
}
private PropertyValuesHolderUtils() {
}
}

View File

@ -0,0 +1,212 @@
package androidx.transition;
/* loaded from: classes.dex */
public final class R {
public static final class attr {
public static final int alpha = 0x7f03002e;
public static final int font = 0x7f0301fb;
public static final int fontProviderAuthority = 0x7f0301fd;
public static final int fontProviderCerts = 0x7f0301fe;
public static final int fontProviderFetchStrategy = 0x7f0301ff;
public static final int fontProviderFetchTimeout = 0x7f030200;
public static final int fontProviderPackage = 0x7f030201;
public static final int fontProviderQuery = 0x7f030202;
public static final int fontStyle = 0x7f030204;
public static final int fontVariationSettings = 0x7f030205;
public static final int fontWeight = 0x7f030206;
public static final int ttcIndex = 0x7f0304b6;
private attr() {
}
}
public static final class color {
public static final int notification_action_color_filter = 0x7f0502e9;
public static final int notification_icon_bg_color = 0x7f0502ea;
public static final int ripple_material_light = 0x7f0502f7;
public static final int secondary_text_default_material_light = 0x7f0502f9;
private color() {
}
}
public static final class dimen {
public static final int compat_button_inset_horizontal_material = 0x7f060058;
public static final int compat_button_inset_vertical_material = 0x7f060059;
public static final int compat_button_padding_horizontal_material = 0x7f06005a;
public static final int compat_button_padding_vertical_material = 0x7f06005b;
public static final int compat_control_corner_material = 0x7f06005c;
public static final int compat_notification_large_icon_max_height = 0x7f06005d;
public static final int compat_notification_large_icon_max_width = 0x7f06005e;
public static final int notification_action_icon_size = 0x7f060307;
public static final int notification_action_text_size = 0x7f060308;
public static final int notification_big_circle_margin = 0x7f060309;
public static final int notification_content_margin_start = 0x7f06030a;
public static final int notification_large_icon_height = 0x7f06030b;
public static final int notification_large_icon_width = 0x7f06030c;
public static final int notification_main_column_padding_top = 0x7f06030d;
public static final int notification_media_narrow_margin = 0x7f06030e;
public static final int notification_right_icon_size = 0x7f06030f;
public static final int notification_right_side_padding_top = 0x7f060310;
public static final int notification_small_icon_background_padding = 0x7f060311;
public static final int notification_small_icon_size_as_large = 0x7f060312;
public static final int notification_subtext_size = 0x7f060313;
public static final int notification_top_pad = 0x7f060314;
public static final int notification_top_pad_large_text = 0x7f060315;
private dimen() {
}
}
public static final class drawable {
public static final int notification_action_background = 0x7f0700d0;
public static final int notification_bg = 0x7f0700d1;
public static final int notification_bg_low = 0x7f0700d2;
public static final int notification_bg_low_normal = 0x7f0700d3;
public static final int notification_bg_low_pressed = 0x7f0700d4;
public static final int notification_bg_normal = 0x7f0700d5;
public static final int notification_bg_normal_pressed = 0x7f0700d6;
public static final int notification_icon_background = 0x7f0700d7;
public static final int notification_template_icon_bg = 0x7f0700d8;
public static final int notification_template_icon_low_bg = 0x7f0700d9;
public static final int notification_tile_bg = 0x7f0700da;
public static final int notify_panel_notification_icon_bg = 0x7f0700db;
private drawable() {
}
}
public static final class id {
public static final int action_container = 0x7f08003a;
public static final int action_divider = 0x7f08003c;
public static final int action_image = 0x7f08003d;
public static final int action_text = 0x7f080043;
public static final int actions = 0x7f080044;
public static final int async = 0x7f080052;
public static final int blocking = 0x7f08005c;
public static final int chronometer = 0x7f080071;
public static final int forever = 0x7f0800c2;
public static final int ghost_view = 0x7f0800c6;
public static final int ghost_view_holder = 0x7f0800c7;
public static final int icon = 0x7f0800d4;
public static final int icon_group = 0x7f0800d5;
public static final int info = 0x7f0800dd;
public static final int italic = 0x7f0800e0;
public static final int line1 = 0x7f0800e9;
public static final int line3 = 0x7f0800ea;
public static final int normal = 0x7f080139;
public static final int notification_background = 0x7f08013b;
public static final int notification_main_column = 0x7f08013c;
public static final int notification_main_column_container = 0x7f08013d;
public static final int parent_matrix = 0x7f080157;
public static final int right_icon = 0x7f08016b;
public static final int right_side = 0x7f08016c;
public static final int save_non_transition_alpha = 0x7f08016f;
public static final int save_overlay_view = 0x7f080170;
public static final int tag_transition_group = 0x7f0801b6;
public static final int tag_unhandled_key_event_manager = 0x7f0801b7;
public static final int tag_unhandled_key_listeners = 0x7f0801b8;
public static final int text = 0x7f0801ba;
public static final int text2 = 0x7f0801bb;
public static final int time = 0x7f0801ca;
public static final int title = 0x7f0801cb;
public static final int transition_current_scene = 0x7f0801d4;
public static final int transition_layout_save = 0x7f0801d5;
public static final int transition_position = 0x7f0801d6;
public static final int transition_scene_layoutid_cache = 0x7f0801d7;
public static final int transition_transform = 0x7f0801d8;
private id() {
}
}
public static final class integer {
public static final int status_bar_notification_info_maxnum = 0x7f090043;
private integer() {
}
}
public static final class layout {
public static final int notification_action = 0x7f0b0060;
public static final int notification_action_tombstone = 0x7f0b0061;
public static final int notification_template_custom_big = 0x7f0b0062;
public static final int notification_template_icon_group = 0x7f0b0063;
public static final int notification_template_part_chronometer = 0x7f0b0064;
public static final int notification_template_part_time = 0x7f0b0065;
private layout() {
}
}
public static final class string {
public static final int status_bar_notification_info_overflow = 0x7f0f00a8;
private string() {
}
}
public static final class style {
public static final int TextAppearance_Compat_Notification = 0x7f1001c3;
public static final int TextAppearance_Compat_Notification_Info = 0x7f1001c4;
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f1001c5;
public static final int TextAppearance_Compat_Notification_Time = 0x7f1001c6;
public static final int TextAppearance_Compat_Notification_Title = 0x7f1001c7;
public static final int Widget_Compat_NotificationActionContainer = 0x7f10032d;
public static final int Widget_Compat_NotificationActionText = 0x7f10032e;
private style() {
}
}
public static final class styleable {
public static final int ColorStateListItem_alpha = 0x00000003;
public static final int ColorStateListItem_android_alpha = 0x00000001;
public static final int ColorStateListItem_android_color = 0x00000000;
public static final int ColorStateListItem_android_lStar = 0x00000002;
public static final int ColorStateListItem_lStar = 0x00000004;
public static final int FontFamilyFont_android_font = 0x00000000;
public static final int FontFamilyFont_android_fontStyle = 0x00000002;
public static final int FontFamilyFont_android_fontVariationSettings = 0x00000004;
public static final int FontFamilyFont_android_fontWeight = 0x00000001;
public static final int FontFamilyFont_android_ttcIndex = 0x00000003;
public static final int FontFamilyFont_font = 0x00000005;
public static final int FontFamilyFont_fontStyle = 0x00000006;
public static final int FontFamilyFont_fontVariationSettings = 0x00000007;
public static final int FontFamilyFont_fontWeight = 0x00000008;
public static final int FontFamilyFont_ttcIndex = 0x00000009;
public static final int FontFamily_fontProviderAuthority = 0x00000000;
public static final int FontFamily_fontProviderCerts = 0x00000001;
public static final int FontFamily_fontProviderFetchStrategy = 0x00000002;
public static final int FontFamily_fontProviderFetchTimeout = 0x00000003;
public static final int FontFamily_fontProviderPackage = 0x00000004;
public static final int FontFamily_fontProviderQuery = 0x00000005;
public static final int FontFamily_fontProviderSystemFontFamily = 0x00000006;
public static final int GradientColorItem_android_color = 0x00000000;
public static final int GradientColorItem_android_offset = 0x00000001;
public static final int GradientColor_android_centerColor = 0x00000007;
public static final int GradientColor_android_centerX = 0x00000003;
public static final int GradientColor_android_centerY = 0x00000004;
public static final int GradientColor_android_endColor = 0x00000001;
public static final int GradientColor_android_endX = 0x0000000a;
public static final int GradientColor_android_endY = 0x0000000b;
public static final int GradientColor_android_gradientRadius = 0x00000005;
public static final int GradientColor_android_startColor = 0x00000000;
public static final int GradientColor_android_startX = 0x00000008;
public static final int GradientColor_android_startY = 0x00000009;
public static final int GradientColor_android_tileMode = 0x00000006;
public static final int GradientColor_android_type = 0x00000002;
public static final int[] ColorStateListItem = {android.R.attr.color, android.R.attr.alpha, android.R.attr.lStar, ch.mod_p.sre24.e5.R.attr.alpha, ch.mod_p.sre24.e5.R.attr.lStar};
public static final int[] FontFamily = {ch.mod_p.sre24.e5.R.attr.fontProviderAuthority, ch.mod_p.sre24.e5.R.attr.fontProviderCerts, ch.mod_p.sre24.e5.R.attr.fontProviderFetchStrategy, ch.mod_p.sre24.e5.R.attr.fontProviderFetchTimeout, ch.mod_p.sre24.e5.R.attr.fontProviderPackage, ch.mod_p.sre24.e5.R.attr.fontProviderQuery, ch.mod_p.sre24.e5.R.attr.fontProviderSystemFontFamily};
public static final int[] FontFamilyFont = {android.R.attr.font, android.R.attr.fontWeight, android.R.attr.fontStyle, android.R.attr.ttcIndex, android.R.attr.fontVariationSettings, ch.mod_p.sre24.e5.R.attr.font, ch.mod_p.sre24.e5.R.attr.fontStyle, ch.mod_p.sre24.e5.R.attr.fontVariationSettings, ch.mod_p.sre24.e5.R.attr.fontWeight, ch.mod_p.sre24.e5.R.attr.ttcIndex};
public static final int[] GradientColor = {android.R.attr.startColor, android.R.attr.endColor, android.R.attr.type, android.R.attr.centerX, android.R.attr.centerY, android.R.attr.gradientRadius, android.R.attr.tileMode, android.R.attr.centerColor, android.R.attr.startX, android.R.attr.startY, android.R.attr.endX, android.R.attr.endY};
public static final int[] GradientColorItem = {android.R.attr.color, android.R.attr.offset};
private styleable() {
}
}
private R() {
}
}

View File

@ -0,0 +1,30 @@
package androidx.transition;
import android.animation.TypeEvaluator;
import android.graphics.Rect;
/* loaded from: classes.dex */
class RectEvaluator implements TypeEvaluator<Rect> {
private Rect mRect;
RectEvaluator() {
}
RectEvaluator(Rect rect) {
this.mRect = rect;
}
@Override // android.animation.TypeEvaluator
public Rect evaluate(float f, Rect rect, Rect rect2) {
int i = rect.left + ((int) ((rect2.left - rect.left) * f));
int i2 = rect.top + ((int) ((rect2.top - rect.top) * f));
int i3 = rect.right + ((int) ((rect2.right - rect.right) * f));
int i4 = rect.bottom + ((int) ((rect2.bottom - rect.bottom) * f));
Rect rect3 = this.mRect;
if (rect3 == null) {
return new Rect(i, i2, i3, i4);
}
rect3.set(i, i2, i3, i4);
return this.mRect;
}
}

View File

@ -0,0 +1,97 @@
package androidx.transition;
import android.content.Context;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/* loaded from: classes.dex */
public class Scene {
private Context mContext;
private Runnable mEnterAction;
private Runnable mExitAction;
private View mLayout;
private int mLayoutId;
private ViewGroup mSceneRoot;
public ViewGroup getSceneRoot() {
return this.mSceneRoot;
}
boolean isCreatedFromLayoutResource() {
return this.mLayoutId > 0;
}
public void setEnterAction(Runnable runnable) {
this.mEnterAction = runnable;
}
public void setExitAction(Runnable runnable) {
this.mExitAction = runnable;
}
public static Scene getSceneForLayout(ViewGroup viewGroup, int i, Context context) {
SparseArray sparseArray = (SparseArray) viewGroup.getTag(R.id.transition_scene_layoutid_cache);
if (sparseArray == null) {
sparseArray = new SparseArray();
viewGroup.setTag(R.id.transition_scene_layoutid_cache, sparseArray);
}
Scene scene = (Scene) sparseArray.get(i);
if (scene != null) {
return scene;
}
Scene scene2 = new Scene(viewGroup, i, context);
sparseArray.put(i, scene2);
return scene2;
}
public Scene(ViewGroup viewGroup) {
this.mLayoutId = -1;
this.mSceneRoot = viewGroup;
}
private Scene(ViewGroup viewGroup, int i, Context context) {
this.mContext = context;
this.mSceneRoot = viewGroup;
this.mLayoutId = i;
}
public Scene(ViewGroup viewGroup, View view) {
this.mLayoutId = -1;
this.mSceneRoot = viewGroup;
this.mLayout = view;
}
public void exit() {
Runnable runnable;
if (getCurrentScene(this.mSceneRoot) != this || (runnable = this.mExitAction) == null) {
return;
}
runnable.run();
}
public void enter() {
if (this.mLayoutId > 0 || this.mLayout != null) {
getSceneRoot().removeAllViews();
if (this.mLayoutId > 0) {
LayoutInflater.from(this.mContext).inflate(this.mLayoutId, this.mSceneRoot);
} else {
this.mSceneRoot.addView(this.mLayout);
}
}
Runnable runnable = this.mEnterAction;
if (runnable != null) {
runnable.run();
}
setCurrentScene(this.mSceneRoot, this);
}
static void setCurrentScene(ViewGroup viewGroup, Scene scene) {
viewGroup.setTag(R.id.transition_current_scene, scene);
}
public static Scene getCurrentScene(ViewGroup viewGroup) {
return (Scene) viewGroup.getTag(R.id.transition_current_scene);
}
}

View File

@ -0,0 +1,149 @@
package androidx.transition;
import android.graphics.Rect;
import android.view.ViewGroup;
/* loaded from: classes.dex */
public class SidePropagation extends VisibilityPropagation {
private float mPropagationSpeed = 3.0f;
private int mSide = 80;
public void setSide(int i) {
this.mSide = i;
}
public void setPropagationSpeed(float f) {
if (f == 0.0f) {
throw new IllegalArgumentException("propagationSpeed may not be 0");
}
this.mPropagationSpeed = f;
}
@Override // androidx.transition.TransitionPropagation
public long getStartDelay(ViewGroup viewGroup, Transition transition, TransitionValues transitionValues, TransitionValues transitionValues2) {
int i;
int i2;
int i3;
TransitionValues transitionValues3 = transitionValues;
if (transitionValues3 == null && transitionValues2 == null) {
return 0L;
}
Rect epicenter = transition.getEpicenter();
if (transitionValues2 == null || getViewVisibility(transitionValues3) == 0) {
i = -1;
} else {
transitionValues3 = transitionValues2;
i = 1;
}
int viewX = getViewX(transitionValues3);
int viewY = getViewY(transitionValues3);
int[] iArr = new int[2];
viewGroup.getLocationOnScreen(iArr);
int round = iArr[0] + Math.round(viewGroup.getTranslationX());
int round2 = iArr[1] + Math.round(viewGroup.getTranslationY());
int width = round + viewGroup.getWidth();
int height = round2 + viewGroup.getHeight();
if (epicenter != null) {
i2 = epicenter.centerX();
i3 = epicenter.centerY();
} else {
i2 = (round + width) / 2;
i3 = (round2 + height) / 2;
}
float distance = distance(viewGroup, viewX, viewY, i2, i3, round, round2, width, height) / getMaxDistance(viewGroup);
long duration = transition.getDuration();
if (duration < 0) {
duration = 300;
}
return Math.round(((duration * i) / this.mPropagationSpeed) * distance);
}
/* JADX WARN: Code restructure failed: missing block: B:22:0x0012, code lost:
r0 = 3;
*/
/* JADX WARN: Code restructure failed: missing block: B:26:0x001d, code lost:
if (androidx.core.view.ViewCompat.getLayoutDirection(r6) == 1) goto L7;
*/
/* JADX WARN: Code restructure failed: missing block: B:4:0x000e, code lost:
if (androidx.core.view.ViewCompat.getLayoutDirection(r6) == 1) goto L6;
*/
/* JADX WARN: Code restructure failed: missing block: B:5:0x0010, code lost:
r0 = 5;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private int distance(android.view.View r6, int r7, int r8, int r9, int r10, int r11, int r12, int r13, int r14) {
/*
r5 = this;
int r0 = r5.mSide
r1 = 8388611(0x800003, float:1.1754948E-38)
r2 = 1
r3 = 5
r4 = 3
if (r0 != r1) goto L14
int r6 = androidx.core.view.ViewCompat.getLayoutDirection(r6)
if (r6 != r2) goto L12
L10:
r0 = 5
goto L20
L12:
r0 = 3
goto L20
L14:
r1 = 8388613(0x800005, float:1.175495E-38)
if (r0 != r1) goto L20
int r6 = androidx.core.view.ViewCompat.getLayoutDirection(r6)
if (r6 != r2) goto L10
goto L12
L20:
if (r0 == r4) goto L46
if (r0 == r3) goto L3e
r6 = 48
if (r0 == r6) goto L36
r6 = 80
if (r0 == r6) goto L2e
r6 = 0
goto L4d
L2e:
int r8 = r8 - r12
int r9 = r9 - r7
int r6 = java.lang.Math.abs(r9)
int r6 = r6 + r8
goto L4d
L36:
int r14 = r14 - r8
int r9 = r9 - r7
int r6 = java.lang.Math.abs(r9)
int r6 = r6 + r14
goto L4d
L3e:
int r7 = r7 - r11
int r10 = r10 - r8
int r6 = java.lang.Math.abs(r10)
int r6 = r6 + r7
goto L4d
L46:
int r13 = r13 - r7
int r10 = r10 - r8
int r6 = java.lang.Math.abs(r10)
int r6 = r6 + r13
L4d:
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.transition.SidePropagation.distance(android.view.View, int, int, int, int, int, int, int, int):int");
}
private int getMaxDistance(ViewGroup viewGroup) {
int i = this.mSide;
if (i == 3 || i == 5 || i == 8388611 || i == 8388613) {
return viewGroup.getWidth();
}
return viewGroup.getHeight();
}
}

View File

@ -0,0 +1,184 @@
package androidx.transition;
import android.animation.Animator;
import android.animation.TimeInterpolator;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import androidx.core.content.res.TypedArrayUtils;
import androidx.core.view.ViewCompat;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import org.xmlpull.v1.XmlPullParser;
/* loaded from: classes.dex */
public class Slide extends Visibility {
private static final String PROPNAME_SCREEN_POSITION = "android:slide:screenPosition";
private CalculateSlide mSlideCalculator;
private int mSlideEdge;
private static final TimeInterpolator sDecelerate = new DecelerateInterpolator();
private static final TimeInterpolator sAccelerate = new AccelerateInterpolator();
private static final CalculateSlide sCalculateLeft = new CalculateSlideHorizontal() { // from class: androidx.transition.Slide.1
@Override // androidx.transition.Slide.CalculateSlide
public float getGoneX(ViewGroup viewGroup, View view) {
return view.getTranslationX() - viewGroup.getWidth();
}
};
private static final CalculateSlide sCalculateStart = new CalculateSlideHorizontal() { // from class: androidx.transition.Slide.2
@Override // androidx.transition.Slide.CalculateSlide
public float getGoneX(ViewGroup viewGroup, View view) {
if (ViewCompat.getLayoutDirection(viewGroup) == 1) {
return view.getTranslationX() + viewGroup.getWidth();
}
return view.getTranslationX() - viewGroup.getWidth();
}
};
private static final CalculateSlide sCalculateTop = new CalculateSlideVertical() { // from class: androidx.transition.Slide.3
@Override // androidx.transition.Slide.CalculateSlide
public float getGoneY(ViewGroup viewGroup, View view) {
return view.getTranslationY() - viewGroup.getHeight();
}
};
private static final CalculateSlide sCalculateRight = new CalculateSlideHorizontal() { // from class: androidx.transition.Slide.4
@Override // androidx.transition.Slide.CalculateSlide
public float getGoneX(ViewGroup viewGroup, View view) {
return view.getTranslationX() + viewGroup.getWidth();
}
};
private static final CalculateSlide sCalculateEnd = new CalculateSlideHorizontal() { // from class: androidx.transition.Slide.5
@Override // androidx.transition.Slide.CalculateSlide
public float getGoneX(ViewGroup viewGroup, View view) {
if (ViewCompat.getLayoutDirection(viewGroup) == 1) {
return view.getTranslationX() - viewGroup.getWidth();
}
return view.getTranslationX() + viewGroup.getWidth();
}
};
private static final CalculateSlide sCalculateBottom = new CalculateSlideVertical() { // from class: androidx.transition.Slide.6
@Override // androidx.transition.Slide.CalculateSlide
public float getGoneY(ViewGroup viewGroup, View view) {
return view.getTranslationY() + viewGroup.getHeight();
}
};
private interface CalculateSlide {
float getGoneX(ViewGroup viewGroup, View view);
float getGoneY(ViewGroup viewGroup, View view);
}
@Retention(RetentionPolicy.SOURCE)
public @interface GravityFlag {
}
public int getSlideEdge() {
return this.mSlideEdge;
}
private static abstract class CalculateSlideHorizontal implements CalculateSlide {
private CalculateSlideHorizontal() {
}
@Override // androidx.transition.Slide.CalculateSlide
public float getGoneY(ViewGroup viewGroup, View view) {
return view.getTranslationY();
}
}
private static abstract class CalculateSlideVertical implements CalculateSlide {
private CalculateSlideVertical() {
}
@Override // androidx.transition.Slide.CalculateSlide
public float getGoneX(ViewGroup viewGroup, View view) {
return view.getTranslationX();
}
}
public Slide() {
this.mSlideCalculator = sCalculateBottom;
this.mSlideEdge = 80;
setSlideEdge(80);
}
public Slide(int i) {
this.mSlideCalculator = sCalculateBottom;
this.mSlideEdge = 80;
setSlideEdge(i);
}
public Slide(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.mSlideCalculator = sCalculateBottom;
this.mSlideEdge = 80;
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, Styleable.SLIDE);
int namedInt = TypedArrayUtils.getNamedInt(obtainStyledAttributes, (XmlPullParser) attributeSet, "slideEdge", 0, 80);
obtainStyledAttributes.recycle();
setSlideEdge(namedInt);
}
private void captureValues(TransitionValues transitionValues) {
int[] iArr = new int[2];
transitionValues.view.getLocationOnScreen(iArr);
transitionValues.values.put(PROPNAME_SCREEN_POSITION, iArr);
}
@Override // androidx.transition.Visibility, androidx.transition.Transition
public void captureStartValues(TransitionValues transitionValues) {
super.captureStartValues(transitionValues);
captureValues(transitionValues);
}
@Override // androidx.transition.Visibility, androidx.transition.Transition
public void captureEndValues(TransitionValues transitionValues) {
super.captureEndValues(transitionValues);
captureValues(transitionValues);
}
public void setSlideEdge(int i) {
if (i == 3) {
this.mSlideCalculator = sCalculateLeft;
} else if (i == 5) {
this.mSlideCalculator = sCalculateRight;
} else if (i == 48) {
this.mSlideCalculator = sCalculateTop;
} else if (i == 80) {
this.mSlideCalculator = sCalculateBottom;
} else if (i == 8388611) {
this.mSlideCalculator = sCalculateStart;
} else {
if (i != 8388613) {
throw new IllegalArgumentException("Invalid slide direction");
}
this.mSlideCalculator = sCalculateEnd;
}
this.mSlideEdge = i;
SidePropagation sidePropagation = new SidePropagation();
sidePropagation.setSide(i);
setPropagation(sidePropagation);
}
@Override // androidx.transition.Visibility
public Animator onAppear(ViewGroup viewGroup, View view, TransitionValues transitionValues, TransitionValues transitionValues2) {
if (transitionValues2 == null) {
return null;
}
int[] iArr = (int[]) transitionValues2.values.get(PROPNAME_SCREEN_POSITION);
float translationX = view.getTranslationX();
float translationY = view.getTranslationY();
return TranslationAnimationCreator.createAnimation(view, transitionValues2, iArr[0], iArr[1], this.mSlideCalculator.getGoneX(viewGroup, view), this.mSlideCalculator.getGoneY(viewGroup, view), translationX, translationY, sDecelerate, this);
}
@Override // androidx.transition.Visibility
public Animator onDisappear(ViewGroup viewGroup, View view, TransitionValues transitionValues, TransitionValues transitionValues2) {
if (transitionValues == null) {
return null;
}
int[] iArr = (int[]) transitionValues.values.get(PROPNAME_SCREEN_POSITION);
return TranslationAnimationCreator.createAnimation(view, transitionValues, iArr[0], iArr[1], view.getTranslationX(), view.getTranslationY(), this.mSlideCalculator.getGoneX(viewGroup, view), this.mSlideCalculator.getGoneY(viewGroup, view), sAccelerate, this);
}
}

View File

@ -0,0 +1,76 @@
package androidx.transition;
/* loaded from: classes.dex */
class Styleable {
static final int[] TRANSITION_TARGET = {android.R.attr.targetClass, android.R.attr.targetId, android.R.attr.excludeId, android.R.attr.excludeClass, android.R.attr.targetName, android.R.attr.excludeName};
static final int[] TRANSITION_MANAGER = {android.R.attr.fromScene, android.R.attr.toScene, android.R.attr.transition};
static final int[] TRANSITION = {android.R.attr.interpolator, android.R.attr.duration, android.R.attr.startDelay, android.R.attr.matchOrder};
static final int[] CHANGE_BOUNDS = {android.R.attr.resizeClip};
static final int[] VISIBILITY_TRANSITION = {android.R.attr.transitionVisibilityMode};
static final int[] FADE = {android.R.attr.fadingMode};
static final int[] CHANGE_TRANSFORM = {android.R.attr.reparent, android.R.attr.reparentWithOverlay};
static final int[] SLIDE = {android.R.attr.slideEdge};
static final int[] TRANSITION_SET = {android.R.attr.transitionOrdering};
static final int[] ARC_MOTION = {android.R.attr.minimumHorizontalAngle, android.R.attr.minimumVerticalAngle, android.R.attr.maximumAngle};
static final int[] PATTERN_PATH_MOTION = {android.R.attr.patternPathData};
interface ArcMotion {
public static final int MAXIMUM_ANGLE = 2;
public static final int MINIMUM_HORIZONTAL_ANGLE = 0;
public static final int MINIMUM_VERTICAL_ANGLE = 1;
}
interface ChangeBounds {
public static final int RESIZE_CLIP = 0;
}
interface ChangeTransform {
public static final int REPARENT = 0;
public static final int REPARENT_WITH_OVERLAY = 1;
}
interface Fade {
public static final int FADING_MODE = 0;
}
interface PatternPathMotion {
public static final int PATTERN_PATH_DATA = 0;
}
interface Slide {
public static final int SLIDE_EDGE = 0;
}
interface Transition {
public static final int DURATION = 1;
public static final int INTERPOLATOR = 0;
public static final int MATCH_ORDER = 3;
public static final int START_DELAY = 2;
}
interface TransitionManager {
public static final int FROM_SCENE = 0;
public static final int TO_SCENE = 1;
public static final int TRANSITION = 2;
}
interface TransitionSet {
public static final int TRANSITION_ORDERING = 0;
}
interface TransitionTarget {
public static final int EXCLUDE_CLASS = 3;
public static final int EXCLUDE_ID = 2;
public static final int EXCLUDE_NAME = 5;
public static final int TARGET_CLASS = 0;
public static final int TARGET_ID = 1;
public static final int TARGET_NAME = 4;
}
interface VisibilityTransition {
public static final int TRANSITION_VISIBILITY_MODE = 0;
}
private Styleable() {
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,235 @@
package androidx.transition;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.util.AttributeSet;
import android.util.Xml;
import android.view.InflateException;
import android.view.ViewGroup;
import androidx.collection.ArrayMap;
import androidx.constraintlayout.core.motion.utils.TypedValues;
import androidx.core.content.res.TypedArrayUtils;
import java.io.IOException;
import java.lang.reflect.Constructor;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/* loaded from: classes.dex */
public class TransitionInflater {
private final Context mContext;
private static final Class<?>[] CONSTRUCTOR_SIGNATURE = {Context.class, AttributeSet.class};
private static final ArrayMap<String, Constructor<?>> CONSTRUCTORS = new ArrayMap<>();
private TransitionInflater(Context context) {
this.mContext = context;
}
public static TransitionInflater from(Context context) {
return new TransitionInflater(context);
}
public Transition inflateTransition(int i) {
XmlResourceParser xml = this.mContext.getResources().getXml(i);
try {
try {
return createTransitionFromXml(xml, Xml.asAttributeSet(xml), null);
} catch (IOException e) {
throw new InflateException(xml.getPositionDescription() + ": " + e.getMessage(), e);
} catch (XmlPullParserException e2) {
throw new InflateException(e2.getMessage(), e2);
}
} finally {
xml.close();
}
}
public TransitionManager inflateTransitionManager(int i, ViewGroup viewGroup) {
XmlResourceParser xml = this.mContext.getResources().getXml(i);
try {
try {
return createTransitionManagerFromXml(xml, Xml.asAttributeSet(xml), viewGroup);
} catch (IOException e) {
InflateException inflateException = new InflateException(xml.getPositionDescription() + ": " + e.getMessage());
inflateException.initCause(e);
throw inflateException;
} catch (XmlPullParserException e2) {
InflateException inflateException2 = new InflateException(e2.getMessage());
inflateException2.initCause(e2);
throw inflateException2;
}
} finally {
xml.close();
}
}
/* JADX WARN: Code restructure failed: missing block: B:11:0x017a, code lost:
return r3;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private androidx.transition.Transition createTransitionFromXml(org.xmlpull.v1.XmlPullParser r8, android.util.AttributeSet r9, androidx.transition.Transition r10) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
/*
Method dump skipped, instructions count: 379
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.transition.TransitionInflater.createTransitionFromXml(org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, androidx.transition.Transition):androidx.transition.Transition");
}
private Object createCustom(AttributeSet attributeSet, Class<?> cls, String str) {
Object newInstance;
Class<? extends U> asSubclass;
String attributeValue = attributeSet.getAttributeValue(null, "class");
if (attributeValue == null) {
throw new InflateException(str + " tag must have a 'class' attribute");
}
try {
ArrayMap<String, Constructor<?>> arrayMap = CONSTRUCTORS;
synchronized (arrayMap) {
Constructor<?> constructor = arrayMap.get(attributeValue);
if (constructor == null && (asSubclass = Class.forName(attributeValue, false, this.mContext.getClassLoader()).asSubclass(cls)) != 0) {
constructor = asSubclass.getConstructor(CONSTRUCTOR_SIGNATURE);
constructor.setAccessible(true);
arrayMap.put(attributeValue, constructor);
}
newInstance = constructor.newInstance(this.mContext, attributeSet);
}
return newInstance;
} catch (Exception e) {
throw new InflateException("Could not instantiate " + cls + " class " + attributeValue, e);
}
}
private void getTargetIds(XmlPullParser xmlPullParser, AttributeSet attributeSet, Transition transition) throws XmlPullParserException, IOException {
int depth = xmlPullParser.getDepth();
while (true) {
int next = xmlPullParser.next();
if ((next == 3 && xmlPullParser.getDepth() <= depth) || next == 1) {
return;
}
if (next == 2) {
if (xmlPullParser.getName().equals(TypedValues.AttributesType.S_TARGET)) {
TypedArray obtainStyledAttributes = this.mContext.obtainStyledAttributes(attributeSet, Styleable.TRANSITION_TARGET);
int namedResourceId = TypedArrayUtils.getNamedResourceId(obtainStyledAttributes, xmlPullParser, "targetId", 1, 0);
if (namedResourceId != 0) {
transition.addTarget(namedResourceId);
} else {
int namedResourceId2 = TypedArrayUtils.getNamedResourceId(obtainStyledAttributes, xmlPullParser, "excludeId", 2, 0);
if (namedResourceId2 != 0) {
transition.excludeTarget(namedResourceId2, true);
} else {
String namedString = TypedArrayUtils.getNamedString(obtainStyledAttributes, xmlPullParser, "targetName", 4);
if (namedString != null) {
transition.addTarget(namedString);
} else {
String namedString2 = TypedArrayUtils.getNamedString(obtainStyledAttributes, xmlPullParser, "excludeName", 5);
if (namedString2 != null) {
transition.excludeTarget(namedString2, true);
} else {
String namedString3 = TypedArrayUtils.getNamedString(obtainStyledAttributes, xmlPullParser, "excludeClass", 3);
if (namedString3 != null) {
try {
transition.excludeTarget(Class.forName(namedString3), true);
} catch (ClassNotFoundException e) {
obtainStyledAttributes.recycle();
throw new RuntimeException("Could not create " + namedString3, e);
}
} else {
String namedString4 = TypedArrayUtils.getNamedString(obtainStyledAttributes, xmlPullParser, "targetClass", 0);
if (namedString4 != null) {
transition.addTarget(Class.forName(namedString4));
}
}
}
}
}
}
obtainStyledAttributes.recycle();
} else {
throw new RuntimeException("Unknown scene name: " + xmlPullParser.getName());
}
}
}
}
/* JADX WARN: Code restructure failed: missing block: B:7:0x0051, code lost:
return r1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private androidx.transition.TransitionManager createTransitionManagerFromXml(org.xmlpull.v1.XmlPullParser r5, android.util.AttributeSet r6, android.view.ViewGroup r7) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException {
/*
r4 = this;
int r0 = r5.getDepth()
r1 = 0
L5:
int r2 = r5.next()
r3 = 3
if (r2 != r3) goto L12
int r3 = r5.getDepth()
if (r3 <= r0) goto L51
L12:
r3 = 1
if (r2 == r3) goto L51
r3 = 2
if (r2 == r3) goto L19
goto L5
L19:
java.lang.String r2 = r5.getName()
java.lang.String r3 = "transitionManager"
boolean r3 = r2.equals(r3)
if (r3 == 0) goto L2b
androidx.transition.TransitionManager r1 = new androidx.transition.TransitionManager
r1.<init>()
goto L5
L2b:
java.lang.String r3 = "transition"
boolean r2 = r2.equals(r3)
if (r2 == 0) goto L39
if (r1 == 0) goto L39
r4.loadTransition(r6, r5, r7, r1)
goto L5
L39:
java.lang.RuntimeException r6 = new java.lang.RuntimeException
java.lang.StringBuilder r7 = new java.lang.StringBuilder
java.lang.String r0 = "Unknown scene name: "
r7.<init>(r0)
java.lang.String r5 = r5.getName()
r7.append(r5)
java.lang.String r5 = r7.toString()
r6.<init>(r5)
throw r6
L51:
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.transition.TransitionInflater.createTransitionManagerFromXml(org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.view.ViewGroup):androidx.transition.TransitionManager");
}
private void loadTransition(AttributeSet attributeSet, XmlPullParser xmlPullParser, ViewGroup viewGroup, TransitionManager transitionManager) throws Resources.NotFoundException {
Transition inflateTransition;
TypedArray obtainStyledAttributes = this.mContext.obtainStyledAttributes(attributeSet, Styleable.TRANSITION_MANAGER);
int namedResourceId = TypedArrayUtils.getNamedResourceId(obtainStyledAttributes, xmlPullParser, "transition", 2, -1);
int namedResourceId2 = TypedArrayUtils.getNamedResourceId(obtainStyledAttributes, xmlPullParser, "fromScene", 0, -1);
Scene sceneForLayout = namedResourceId2 < 0 ? null : Scene.getSceneForLayout(viewGroup, namedResourceId2, this.mContext);
int namedResourceId3 = TypedArrayUtils.getNamedResourceId(obtainStyledAttributes, xmlPullParser, "toScene", 1, -1);
Scene sceneForLayout2 = namedResourceId3 >= 0 ? Scene.getSceneForLayout(viewGroup, namedResourceId3, this.mContext) : null;
if (namedResourceId >= 0 && (inflateTransition = inflateTransition(namedResourceId)) != null) {
if (sceneForLayout2 == null) {
throw new RuntimeException("No toScene for transition ID " + namedResourceId);
}
if (sceneForLayout == null) {
transitionManager.setTransition(sceneForLayout2, inflateTransition);
} else {
transitionManager.setTransition(sceneForLayout, sceneForLayout2, inflateTransition);
}
}
obtainStyledAttributes.recycle();
}
}

View File

@ -0,0 +1,26 @@
package androidx.transition;
import androidx.transition.Transition;
/* loaded from: classes.dex */
public class TransitionListenerAdapter implements Transition.TransitionListener {
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionCancel(Transition transition) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionEnd(Transition transition) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionPause(Transition transition) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionResume(Transition transition) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionStart(Transition transition) {
}
}

View File

@ -0,0 +1,216 @@
package androidx.transition;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import androidx.collection.ArrayMap;
import androidx.core.view.ViewCompat;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Iterator;
/* loaded from: classes.dex */
public class TransitionManager {
private static final String LOG_TAG = "TransitionManager";
private static Transition sDefaultTransition = new AutoTransition();
private static ThreadLocal<WeakReference<ArrayMap<ViewGroup, ArrayList<Transition>>>> sRunningTransitions = new ThreadLocal<>();
static ArrayList<ViewGroup> sPendingTransitions = new ArrayList<>();
private ArrayMap<Scene, Transition> mSceneTransitions = new ArrayMap<>();
private ArrayMap<Scene, ArrayMap<Scene, Transition>> mScenePairTransitions = new ArrayMap<>();
public void setTransition(Scene scene, Transition transition) {
this.mSceneTransitions.put(scene, transition);
}
public void setTransition(Scene scene, Scene scene2, Transition transition) {
ArrayMap<Scene, Transition> arrayMap = this.mScenePairTransitions.get(scene2);
if (arrayMap == null) {
arrayMap = new ArrayMap<>();
this.mScenePairTransitions.put(scene2, arrayMap);
}
arrayMap.put(scene, transition);
}
private Transition getTransition(Scene scene) {
Scene currentScene;
ArrayMap<Scene, Transition> arrayMap;
Transition transition;
ViewGroup sceneRoot = scene.getSceneRoot();
if (sceneRoot != null && (currentScene = Scene.getCurrentScene(sceneRoot)) != null && (arrayMap = this.mScenePairTransitions.get(scene)) != null && (transition = arrayMap.get(currentScene)) != null) {
return transition;
}
Transition transition2 = this.mSceneTransitions.get(scene);
return transition2 != null ? transition2 : sDefaultTransition;
}
private static void changeScene(Scene scene, Transition transition) {
ViewGroup sceneRoot = scene.getSceneRoot();
if (sPendingTransitions.contains(sceneRoot)) {
return;
}
Scene currentScene = Scene.getCurrentScene(sceneRoot);
if (transition == null) {
if (currentScene != null) {
currentScene.exit();
}
scene.enter();
return;
}
sPendingTransitions.add(sceneRoot);
Transition mo185clone = transition.mo185clone();
mo185clone.setSceneRoot(sceneRoot);
if (currentScene != null && currentScene.isCreatedFromLayoutResource()) {
mo185clone.setCanRemoveViews(true);
}
sceneChangeSetup(sceneRoot, mo185clone);
scene.enter();
sceneChangeRunTransition(sceneRoot, mo185clone);
}
static ArrayMap<ViewGroup, ArrayList<Transition>> getRunningTransitions() {
ArrayMap<ViewGroup, ArrayList<Transition>> arrayMap;
WeakReference<ArrayMap<ViewGroup, ArrayList<Transition>>> weakReference = sRunningTransitions.get();
if (weakReference != null && (arrayMap = weakReference.get()) != null) {
return arrayMap;
}
ArrayMap<ViewGroup, ArrayList<Transition>> arrayMap2 = new ArrayMap<>();
sRunningTransitions.set(new WeakReference<>(arrayMap2));
return arrayMap2;
}
private static void sceneChangeRunTransition(ViewGroup viewGroup, Transition transition) {
if (transition == null || viewGroup == null) {
return;
}
MultiListener multiListener = new MultiListener(transition, viewGroup);
viewGroup.addOnAttachStateChangeListener(multiListener);
viewGroup.getViewTreeObserver().addOnPreDrawListener(multiListener);
}
private static class MultiListener implements ViewTreeObserver.OnPreDrawListener, View.OnAttachStateChangeListener {
ViewGroup mSceneRoot;
Transition mTransition;
@Override // android.view.View.OnAttachStateChangeListener
public void onViewAttachedToWindow(View view) {
}
MultiListener(Transition transition, ViewGroup viewGroup) {
this.mTransition = transition;
this.mSceneRoot = viewGroup;
}
private void removeListeners() {
this.mSceneRoot.getViewTreeObserver().removeOnPreDrawListener(this);
this.mSceneRoot.removeOnAttachStateChangeListener(this);
}
@Override // android.view.View.OnAttachStateChangeListener
public void onViewDetachedFromWindow(View view) {
removeListeners();
TransitionManager.sPendingTransitions.remove(this.mSceneRoot);
ArrayList<Transition> arrayList = TransitionManager.getRunningTransitions().get(this.mSceneRoot);
if (arrayList != null && arrayList.size() > 0) {
Iterator<Transition> it = arrayList.iterator();
while (it.hasNext()) {
it.next().resume(this.mSceneRoot);
}
}
this.mTransition.clearValues(true);
}
@Override // android.view.ViewTreeObserver.OnPreDrawListener
public boolean onPreDraw() {
removeListeners();
if (!TransitionManager.sPendingTransitions.remove(this.mSceneRoot)) {
return true;
}
final ArrayMap<ViewGroup, ArrayList<Transition>> runningTransitions = TransitionManager.getRunningTransitions();
ArrayList<Transition> arrayList = runningTransitions.get(this.mSceneRoot);
ArrayList arrayList2 = null;
if (arrayList == null) {
arrayList = new ArrayList<>();
runningTransitions.put(this.mSceneRoot, arrayList);
} else if (arrayList.size() > 0) {
arrayList2 = new ArrayList(arrayList);
}
arrayList.add(this.mTransition);
this.mTransition.addListener(new TransitionListenerAdapter() { // from class: androidx.transition.TransitionManager.MultiListener.1
/* JADX WARN: Multi-variable type inference failed */
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionEnd(Transition transition) {
((ArrayList) runningTransitions.get(MultiListener.this.mSceneRoot)).remove(transition);
transition.removeListener(this);
}
});
this.mTransition.captureValues(this.mSceneRoot, false);
if (arrayList2 != null) {
Iterator it = arrayList2.iterator();
while (it.hasNext()) {
((Transition) it.next()).resume(this.mSceneRoot);
}
}
this.mTransition.playTransition(this.mSceneRoot);
return true;
}
}
private static void sceneChangeSetup(ViewGroup viewGroup, Transition transition) {
ArrayList<Transition> arrayList = getRunningTransitions().get(viewGroup);
if (arrayList != null && arrayList.size() > 0) {
Iterator<Transition> it = arrayList.iterator();
while (it.hasNext()) {
it.next().pause(viewGroup);
}
}
if (transition != null) {
transition.captureValues(viewGroup, true);
}
Scene currentScene = Scene.getCurrentScene(viewGroup);
if (currentScene != null) {
currentScene.exit();
}
}
public void transitionTo(Scene scene) {
changeScene(scene, getTransition(scene));
}
public static void go(Scene scene) {
changeScene(scene, sDefaultTransition);
}
public static void go(Scene scene, Transition transition) {
changeScene(scene, transition);
}
public static void beginDelayedTransition(ViewGroup viewGroup) {
beginDelayedTransition(viewGroup, null);
}
public static void beginDelayedTransition(ViewGroup viewGroup, Transition transition) {
if (sPendingTransitions.contains(viewGroup) || !ViewCompat.isLaidOut(viewGroup)) {
return;
}
sPendingTransitions.add(viewGroup);
if (transition == null) {
transition = sDefaultTransition;
}
Transition mo185clone = transition.mo185clone();
sceneChangeSetup(viewGroup, mo185clone);
Scene.setCurrentScene(viewGroup, null);
sceneChangeRunTransition(viewGroup, mo185clone);
}
public static void endTransitions(ViewGroup viewGroup) {
sPendingTransitions.remove(viewGroup);
ArrayList<Transition> arrayList = getRunningTransitions().get(viewGroup);
if (arrayList == null || arrayList.isEmpty()) {
return;
}
ArrayList arrayList2 = new ArrayList(arrayList);
for (int size = arrayList2.size() - 1; size >= 0; size--) {
((Transition) arrayList2.get(size)).forceToEnd(viewGroup);
}
}
}

View File

@ -0,0 +1,12 @@
package androidx.transition;
import android.view.ViewGroup;
/* loaded from: classes.dex */
public abstract class TransitionPropagation {
public abstract void captureValues(TransitionValues transitionValues);
public abstract String[] getPropagationProperties();
public abstract long getStartDelay(ViewGroup viewGroup, Transition transition, TransitionValues transitionValues, TransitionValues transitionValues2);
}

View File

@ -0,0 +1,489 @@
package androidx.transition;
import android.animation.TimeInterpolator;
import android.content.Context;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.util.AndroidRuntimeException;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import androidx.core.content.res.TypedArrayUtils;
import androidx.transition.Transition;
import java.util.ArrayList;
import java.util.Iterator;
/* loaded from: classes.dex */
public class TransitionSet extends Transition {
private static final int FLAG_CHANGE_EPICENTER = 8;
private static final int FLAG_CHANGE_INTERPOLATOR = 1;
private static final int FLAG_CHANGE_PATH_MOTION = 4;
private static final int FLAG_CHANGE_PROPAGATION = 2;
public static final int ORDERING_SEQUENTIAL = 1;
public static final int ORDERING_TOGETHER = 0;
private int mChangeFlags;
int mCurrentListeners;
private boolean mPlayTogether;
boolean mStarted;
private ArrayList<Transition> mTransitions;
public int getOrdering() {
return !this.mPlayTogether ? 1 : 0;
}
@Override // androidx.transition.Transition
public /* bridge */ /* synthetic */ Transition addTarget(Class cls) {
return addTarget((Class<?>) cls);
}
@Override // androidx.transition.Transition
public /* bridge */ /* synthetic */ Transition removeTarget(Class cls) {
return removeTarget((Class<?>) cls);
}
public TransitionSet() {
this.mTransitions = new ArrayList<>();
this.mPlayTogether = true;
this.mStarted = false;
this.mChangeFlags = 0;
}
public TransitionSet(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.mTransitions = new ArrayList<>();
this.mPlayTogether = true;
this.mStarted = false;
this.mChangeFlags = 0;
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, Styleable.TRANSITION_SET);
setOrdering(TypedArrayUtils.getNamedInt(obtainStyledAttributes, (XmlResourceParser) attributeSet, "transitionOrdering", 0, 0));
obtainStyledAttributes.recycle();
}
public TransitionSet setOrdering(int i) {
if (i == 0) {
this.mPlayTogether = true;
} else {
if (i != 1) {
throw new AndroidRuntimeException("Invalid parameter for TransitionSet ordering: " + i);
}
this.mPlayTogether = false;
}
return this;
}
public TransitionSet addTransition(Transition transition) {
addTransitionInternal(transition);
if (this.mDuration >= 0) {
transition.setDuration(this.mDuration);
}
if ((this.mChangeFlags & 1) != 0) {
transition.setInterpolator(getInterpolator());
}
if ((this.mChangeFlags & 2) != 0) {
transition.setPropagation(getPropagation());
}
if ((this.mChangeFlags & 4) != 0) {
transition.setPathMotion(getPathMotion());
}
if ((this.mChangeFlags & 8) != 0) {
transition.setEpicenterCallback(getEpicenterCallback());
}
return this;
}
private void addTransitionInternal(Transition transition) {
this.mTransitions.add(transition);
transition.mParent = this;
}
public int getTransitionCount() {
return this.mTransitions.size();
}
public Transition getTransitionAt(int i) {
if (i < 0 || i >= this.mTransitions.size()) {
return null;
}
return this.mTransitions.get(i);
}
@Override // androidx.transition.Transition
public TransitionSet setDuration(long j) {
ArrayList<Transition> arrayList;
super.setDuration(j);
if (this.mDuration >= 0 && (arrayList = this.mTransitions) != null) {
int size = arrayList.size();
for (int i = 0; i < size; i++) {
this.mTransitions.get(i).setDuration(j);
}
}
return this;
}
@Override // androidx.transition.Transition
public TransitionSet setStartDelay(long j) {
return (TransitionSet) super.setStartDelay(j);
}
@Override // androidx.transition.Transition
public TransitionSet setInterpolator(TimeInterpolator timeInterpolator) {
this.mChangeFlags |= 1;
ArrayList<Transition> arrayList = this.mTransitions;
if (arrayList != null) {
int size = arrayList.size();
for (int i = 0; i < size; i++) {
this.mTransitions.get(i).setInterpolator(timeInterpolator);
}
}
return (TransitionSet) super.setInterpolator(timeInterpolator);
}
@Override // androidx.transition.Transition
public TransitionSet addTarget(View view) {
for (int i = 0; i < this.mTransitions.size(); i++) {
this.mTransitions.get(i).addTarget(view);
}
return (TransitionSet) super.addTarget(view);
}
@Override // androidx.transition.Transition
public TransitionSet addTarget(int i) {
for (int i2 = 0; i2 < this.mTransitions.size(); i2++) {
this.mTransitions.get(i2).addTarget(i);
}
return (TransitionSet) super.addTarget(i);
}
@Override // androidx.transition.Transition
public TransitionSet addTarget(String str) {
for (int i = 0; i < this.mTransitions.size(); i++) {
this.mTransitions.get(i).addTarget(str);
}
return (TransitionSet) super.addTarget(str);
}
@Override // androidx.transition.Transition
public TransitionSet addTarget(Class<?> cls) {
for (int i = 0; i < this.mTransitions.size(); i++) {
this.mTransitions.get(i).addTarget(cls);
}
return (TransitionSet) super.addTarget(cls);
}
@Override // androidx.transition.Transition
public TransitionSet addListener(Transition.TransitionListener transitionListener) {
return (TransitionSet) super.addListener(transitionListener);
}
@Override // androidx.transition.Transition
public TransitionSet removeTarget(int i) {
for (int i2 = 0; i2 < this.mTransitions.size(); i2++) {
this.mTransitions.get(i2).removeTarget(i);
}
return (TransitionSet) super.removeTarget(i);
}
@Override // androidx.transition.Transition
public TransitionSet removeTarget(View view) {
for (int i = 0; i < this.mTransitions.size(); i++) {
this.mTransitions.get(i).removeTarget(view);
}
return (TransitionSet) super.removeTarget(view);
}
@Override // androidx.transition.Transition
public TransitionSet removeTarget(Class<?> cls) {
for (int i = 0; i < this.mTransitions.size(); i++) {
this.mTransitions.get(i).removeTarget(cls);
}
return (TransitionSet) super.removeTarget(cls);
}
@Override // androidx.transition.Transition
public TransitionSet removeTarget(String str) {
for (int i = 0; i < this.mTransitions.size(); i++) {
this.mTransitions.get(i).removeTarget(str);
}
return (TransitionSet) super.removeTarget(str);
}
@Override // androidx.transition.Transition
public Transition excludeTarget(View view, boolean z) {
for (int i = 0; i < this.mTransitions.size(); i++) {
this.mTransitions.get(i).excludeTarget(view, z);
}
return super.excludeTarget(view, z);
}
@Override // androidx.transition.Transition
public Transition excludeTarget(String str, boolean z) {
for (int i = 0; i < this.mTransitions.size(); i++) {
this.mTransitions.get(i).excludeTarget(str, z);
}
return super.excludeTarget(str, z);
}
@Override // androidx.transition.Transition
public Transition excludeTarget(int i, boolean z) {
for (int i2 = 0; i2 < this.mTransitions.size(); i2++) {
this.mTransitions.get(i2).excludeTarget(i, z);
}
return super.excludeTarget(i, z);
}
@Override // androidx.transition.Transition
public Transition excludeTarget(Class<?> cls, boolean z) {
for (int i = 0; i < this.mTransitions.size(); i++) {
this.mTransitions.get(i).excludeTarget(cls, z);
}
return super.excludeTarget(cls, z);
}
@Override // androidx.transition.Transition
public TransitionSet removeListener(Transition.TransitionListener transitionListener) {
return (TransitionSet) super.removeListener(transitionListener);
}
@Override // androidx.transition.Transition
public void setPathMotion(PathMotion pathMotion) {
super.setPathMotion(pathMotion);
this.mChangeFlags |= 4;
if (this.mTransitions != null) {
for (int i = 0; i < this.mTransitions.size(); i++) {
this.mTransitions.get(i).setPathMotion(pathMotion);
}
}
}
public TransitionSet removeTransition(Transition transition) {
this.mTransitions.remove(transition);
transition.mParent = null;
return this;
}
private void setupStartEndListeners() {
TransitionSetListener transitionSetListener = new TransitionSetListener(this);
Iterator<Transition> it = this.mTransitions.iterator();
while (it.hasNext()) {
it.next().addListener(transitionSetListener);
}
this.mCurrentListeners = this.mTransitions.size();
}
static class TransitionSetListener extends TransitionListenerAdapter {
TransitionSet mTransitionSet;
TransitionSetListener(TransitionSet transitionSet) {
this.mTransitionSet = transitionSet;
}
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionStart(Transition transition) {
if (this.mTransitionSet.mStarted) {
return;
}
this.mTransitionSet.start();
this.mTransitionSet.mStarted = true;
}
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionEnd(Transition transition) {
TransitionSet transitionSet = this.mTransitionSet;
transitionSet.mCurrentListeners--;
if (this.mTransitionSet.mCurrentListeners == 0) {
this.mTransitionSet.mStarted = false;
this.mTransitionSet.end();
}
transition.removeListener(this);
}
}
@Override // androidx.transition.Transition
protected void createAnimators(ViewGroup viewGroup, TransitionValuesMaps transitionValuesMaps, TransitionValuesMaps transitionValuesMaps2, ArrayList<TransitionValues> arrayList, ArrayList<TransitionValues> arrayList2) {
long startDelay = getStartDelay();
int size = this.mTransitions.size();
for (int i = 0; i < size; i++) {
Transition transition = this.mTransitions.get(i);
if (startDelay > 0 && (this.mPlayTogether || i == 0)) {
long startDelay2 = transition.getStartDelay();
if (startDelay2 > 0) {
transition.setStartDelay(startDelay2 + startDelay);
} else {
transition.setStartDelay(startDelay);
}
}
transition.createAnimators(viewGroup, transitionValuesMaps, transitionValuesMaps2, arrayList, arrayList2);
}
}
@Override // androidx.transition.Transition
protected void runAnimators() {
if (this.mTransitions.isEmpty()) {
start();
end();
return;
}
setupStartEndListeners();
if (!this.mPlayTogether) {
for (int i = 1; i < this.mTransitions.size(); i++) {
Transition transition = this.mTransitions.get(i - 1);
final Transition transition2 = this.mTransitions.get(i);
transition.addListener(new TransitionListenerAdapter() { // from class: androidx.transition.TransitionSet.1
@Override // androidx.transition.TransitionListenerAdapter, androidx.transition.Transition.TransitionListener
public void onTransitionEnd(Transition transition3) {
transition2.runAnimators();
transition3.removeListener(this);
}
});
}
Transition transition3 = this.mTransitions.get(0);
if (transition3 != null) {
transition3.runAnimators();
return;
}
return;
}
Iterator<Transition> it = this.mTransitions.iterator();
while (it.hasNext()) {
it.next().runAnimators();
}
}
@Override // androidx.transition.Transition
public void captureStartValues(TransitionValues transitionValues) {
if (isValidTarget(transitionValues.view)) {
Iterator<Transition> it = this.mTransitions.iterator();
while (it.hasNext()) {
Transition next = it.next();
if (next.isValidTarget(transitionValues.view)) {
next.captureStartValues(transitionValues);
transitionValues.mTargetedTransitions.add(next);
}
}
}
}
@Override // androidx.transition.Transition
public void captureEndValues(TransitionValues transitionValues) {
if (isValidTarget(transitionValues.view)) {
Iterator<Transition> it = this.mTransitions.iterator();
while (it.hasNext()) {
Transition next = it.next();
if (next.isValidTarget(transitionValues.view)) {
next.captureEndValues(transitionValues);
transitionValues.mTargetedTransitions.add(next);
}
}
}
}
@Override // androidx.transition.Transition
void capturePropagationValues(TransitionValues transitionValues) {
super.capturePropagationValues(transitionValues);
int size = this.mTransitions.size();
for (int i = 0; i < size; i++) {
this.mTransitions.get(i).capturePropagationValues(transitionValues);
}
}
@Override // androidx.transition.Transition
public void pause(View view) {
super.pause(view);
int size = this.mTransitions.size();
for (int i = 0; i < size; i++) {
this.mTransitions.get(i).pause(view);
}
}
@Override // androidx.transition.Transition
public void resume(View view) {
super.resume(view);
int size = this.mTransitions.size();
for (int i = 0; i < size; i++) {
this.mTransitions.get(i).resume(view);
}
}
@Override // androidx.transition.Transition
protected void cancel() {
super.cancel();
int size = this.mTransitions.size();
for (int i = 0; i < size; i++) {
this.mTransitions.get(i).cancel();
}
}
@Override // androidx.transition.Transition
void forceToEnd(ViewGroup viewGroup) {
super.forceToEnd(viewGroup);
int size = this.mTransitions.size();
for (int i = 0; i < size; i++) {
this.mTransitions.get(i).forceToEnd(viewGroup);
}
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // androidx.transition.Transition
public TransitionSet setSceneRoot(ViewGroup viewGroup) {
super.setSceneRoot(viewGroup);
int size = this.mTransitions.size();
for (int i = 0; i < size; i++) {
this.mTransitions.get(i).setSceneRoot(viewGroup);
}
return this;
}
@Override // androidx.transition.Transition
void setCanRemoveViews(boolean z) {
super.setCanRemoveViews(z);
int size = this.mTransitions.size();
for (int i = 0; i < size; i++) {
this.mTransitions.get(i).setCanRemoveViews(z);
}
}
@Override // androidx.transition.Transition
public void setPropagation(TransitionPropagation transitionPropagation) {
super.setPropagation(transitionPropagation);
this.mChangeFlags |= 2;
int size = this.mTransitions.size();
for (int i = 0; i < size; i++) {
this.mTransitions.get(i).setPropagation(transitionPropagation);
}
}
@Override // androidx.transition.Transition
public void setEpicenterCallback(Transition.EpicenterCallback epicenterCallback) {
super.setEpicenterCallback(epicenterCallback);
this.mChangeFlags |= 8;
int size = this.mTransitions.size();
for (int i = 0; i < size; i++) {
this.mTransitions.get(i).setEpicenterCallback(epicenterCallback);
}
}
@Override // androidx.transition.Transition
String toString(String str) {
String transition = super.toString(str);
for (int i = 0; i < this.mTransitions.size(); i++) {
StringBuilder sb = new StringBuilder();
sb.append(transition);
sb.append("\n");
sb.append(this.mTransitions.get(i).toString(str + " "));
transition = sb.toString();
}
return transition;
}
@Override // androidx.transition.Transition
/* renamed from: clone */
public Transition mo185clone() {
TransitionSet transitionSet = (TransitionSet) super.mo185clone();
transitionSet.mTransitions = new ArrayList<>();
int size = this.mTransitions.size();
for (int i = 0; i < size; i++) {
transitionSet.addTransitionInternal(this.mTransitions.get(i).mo185clone());
}
return transitionSet;
}
}

View File

@ -0,0 +1,178 @@
package androidx.transition;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.TypeEvaluator;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.graphics.RectF;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.constraintlayout.core.widgets.analyzer.BasicMeasure;
/* loaded from: classes.dex */
class TransitionUtils {
private static final boolean HAS_IS_ATTACHED_TO_WINDOW = true;
private static final boolean HAS_OVERLAY = true;
private static final boolean HAS_PICTURE_BITMAP;
private static final int MAX_IMAGE_SIZE = 1048576;
static {
HAS_PICTURE_BITMAP = Build.VERSION.SDK_INT >= 28;
}
static View copyViewImage(ViewGroup viewGroup, View view, View view2) {
Matrix matrix = new Matrix();
matrix.setTranslate(-view2.getScrollX(), -view2.getScrollY());
ViewUtils.transformMatrixToGlobal(view, matrix);
ViewUtils.transformMatrixToLocal(viewGroup, matrix);
RectF rectF = new RectF(0.0f, 0.0f, view.getWidth(), view.getHeight());
matrix.mapRect(rectF);
int round = Math.round(rectF.left);
int round2 = Math.round(rectF.top);
int round3 = Math.round(rectF.right);
int round4 = Math.round(rectF.bottom);
ImageView imageView = new ImageView(view.getContext());
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
Bitmap createViewBitmap = createViewBitmap(view, matrix, rectF, viewGroup);
if (createViewBitmap != null) {
imageView.setImageBitmap(createViewBitmap);
}
imageView.measure(View.MeasureSpec.makeMeasureSpec(round3 - round, BasicMeasure.EXACTLY), View.MeasureSpec.makeMeasureSpec(round4 - round2, BasicMeasure.EXACTLY));
imageView.layout(round, round2, round3, round4);
return imageView;
}
/* JADX WARN: Removed duplicated region for block: B:18:0x0071 */
/* JADX WARN: Removed duplicated region for block: B:19:0x0088 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static android.graphics.Bitmap createViewBitmap(android.view.View r8, android.graphics.Matrix r9, android.graphics.RectF r10, android.view.ViewGroup r11) {
/*
boolean r0 = androidx.transition.TransitionUtils.HAS_IS_ATTACHED_TO_WINDOW
r1 = 0
if (r0 == 0) goto L13
boolean r0 = r8.isAttachedToWindow()
r0 = r0 ^ 1
if (r11 != 0) goto Le
goto L14
Le:
boolean r2 = r11.isAttachedToWindow()
goto L15
L13:
r0 = 0
L14:
r2 = 0
L15:
boolean r3 = androidx.transition.TransitionUtils.HAS_OVERLAY
r4 = 0
if (r3 == 0) goto L31
if (r0 == 0) goto L31
if (r2 != 0) goto L1f
return r4
L1f:
android.view.ViewParent r1 = r8.getParent()
android.view.ViewGroup r1 = (android.view.ViewGroup) r1
int r2 = r1.indexOfChild(r8)
android.view.ViewGroupOverlay r5 = r11.getOverlay()
r5.add(r8)
goto L33
L31:
r1 = r4
r2 = 0
L33:
float r5 = r10.width()
int r5 = java.lang.Math.round(r5)
float r6 = r10.height()
int r6 = java.lang.Math.round(r6)
if (r5 <= 0) goto L99
if (r6 <= 0) goto L99
int r4 = r5 * r6
float r4 = (float) r4
r7 = 1233125376(0x49800000, float:1048576.0)
float r7 = r7 / r4
r4 = 1065353216(0x3f800000, float:1.0)
float r4 = java.lang.Math.min(r4, r7)
float r5 = (float) r5
float r5 = r5 * r4
int r5 = java.lang.Math.round(r5)
float r6 = (float) r6
float r6 = r6 * r4
int r6 = java.lang.Math.round(r6)
float r7 = r10.left
float r7 = -r7
float r10 = r10.top
float r10 = -r10
r9.postTranslate(r7, r10)
r9.postScale(r4, r4)
boolean r10 = androidx.transition.TransitionUtils.HAS_PICTURE_BITMAP
if (r10 == 0) goto L88
android.graphics.Picture r10 = new android.graphics.Picture
r10.<init>()
android.graphics.Canvas r4 = r10.beginRecording(r5, r6)
r4.concat(r9)
r8.draw(r4)
r10.endRecording()
android.graphics.Bitmap r4 = androidx.tracing.Trace$$ExternalSyntheticApiModelOutline0.m(r10)
goto L99
L88:
android.graphics.Bitmap$Config r10 = android.graphics.Bitmap.Config.ARGB_8888
android.graphics.Bitmap r4 = android.graphics.Bitmap.createBitmap(r5, r6, r10)
android.graphics.Canvas r10 = new android.graphics.Canvas
r10.<init>(r4)
r10.concat(r9)
r8.draw(r10)
L99:
if (r3 == 0) goto La7
if (r0 == 0) goto La7
android.view.ViewGroupOverlay r9 = r11.getOverlay()
r9.remove(r8)
r1.addView(r8, r2)
La7:
return r4
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.transition.TransitionUtils.createViewBitmap(android.view.View, android.graphics.Matrix, android.graphics.RectF, android.view.ViewGroup):android.graphics.Bitmap");
}
static Animator mergeAnimators(Animator animator, Animator animator2) {
if (animator == null) {
return animator2;
}
if (animator2 == null) {
return animator;
}
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(animator, animator2);
return animatorSet;
}
static class MatrixEvaluator implements TypeEvaluator<Matrix> {
final float[] mTempStartValues = new float[9];
final float[] mTempEndValues = new float[9];
final Matrix mTempMatrix = new Matrix();
MatrixEvaluator() {
}
@Override // android.animation.TypeEvaluator
public Matrix evaluate(float f, Matrix matrix, Matrix matrix2) {
matrix.getValues(this.mTempStartValues);
matrix2.getValues(this.mTempEndValues);
for (int i = 0; i < 9; i++) {
float[] fArr = this.mTempEndValues;
float f2 = fArr[i];
float f3 = this.mTempStartValues[i];
fArr[i] = f3 + ((f2 - f3) * f);
}
this.mTempMatrix.setValues(this.mTempEndValues);
return this.mTempMatrix;
}
}
private TransitionUtils() {
}
}

View File

@ -0,0 +1,41 @@
package androidx.transition;
import android.view.View;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes.dex */
public class TransitionValues {
public View view;
public final Map<String, Object> values = new HashMap();
final ArrayList<Transition> mTargetedTransitions = new ArrayList<>();
@Deprecated
public TransitionValues() {
}
public TransitionValues(View view) {
this.view = view;
}
public boolean equals(Object obj) {
if (!(obj instanceof TransitionValues)) {
return false;
}
TransitionValues transitionValues = (TransitionValues) obj;
return this.view == transitionValues.view && this.values.equals(transitionValues.values);
}
public int hashCode() {
return (this.view.hashCode() * 31) + this.values.hashCode();
}
public String toString() {
String str = (("TransitionValues@" + Integer.toHexString(hashCode()) + ":\n") + " view = " + this.view + "\n") + " values:";
for (String str2 : this.values.keySet()) {
str = str + " " + str2 + ": " + this.values.get(str2) + "\n";
}
return str;
}
}

View File

@ -0,0 +1,17 @@
package androidx.transition;
import android.util.SparseArray;
import android.view.View;
import androidx.collection.ArrayMap;
import androidx.collection.LongSparseArray;
/* loaded from: classes.dex */
class TransitionValuesMaps {
final ArrayMap<View, TransitionValues> mViewValues = new ArrayMap<>();
final SparseArray<View> mIdValues = new SparseArray<>();
final LongSparseArray<View> mItemIdValues = new LongSparseArray<>();
final ArrayMap<String, View> mNameValues = new ArrayMap<>();
TransitionValuesMaps() {
}
}

View File

@ -0,0 +1,117 @@
package androidx.transition;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.TimeInterpolator;
import android.util.Property;
import android.view.View;
import androidx.transition.Transition;
/* loaded from: classes.dex */
class TranslationAnimationCreator {
static Animator createAnimation(View view, TransitionValues transitionValues, int i, int i2, float f, float f2, float f3, float f4, TimeInterpolator timeInterpolator, Transition transition) {
float f5;
float f6;
float translationX = view.getTranslationX();
float translationY = view.getTranslationY();
if (((int[]) transitionValues.view.getTag(R.id.transition_position)) != null) {
f5 = (r4[0] - i) + translationX;
f6 = (r4[1] - i2) + translationY;
} else {
f5 = f;
f6 = f2;
}
int round = i + Math.round(f5 - translationX);
int round2 = i2 + Math.round(f6 - translationY);
view.setTranslationX(f5);
view.setTranslationY(f6);
if (f5 == f3 && f6 == f4) {
return null;
}
ObjectAnimator ofPropertyValuesHolder = ObjectAnimator.ofPropertyValuesHolder(view, PropertyValuesHolder.ofFloat((Property<?, Float>) View.TRANSLATION_X, f5, f3), PropertyValuesHolder.ofFloat((Property<?, Float>) View.TRANSLATION_Y, f6, f4));
TransitionPositionListener transitionPositionListener = new TransitionPositionListener(view, transitionValues.view, round, round2, translationX, translationY);
transition.addListener(transitionPositionListener);
ofPropertyValuesHolder.addListener(transitionPositionListener);
AnimatorUtils.addPauseListener(ofPropertyValuesHolder, transitionPositionListener);
ofPropertyValuesHolder.setInterpolator(timeInterpolator);
return ofPropertyValuesHolder;
}
private static class TransitionPositionListener extends AnimatorListenerAdapter implements Transition.TransitionListener {
private final View mMovingView;
private float mPausedX;
private float mPausedY;
private final int mStartX;
private final int mStartY;
private final float mTerminalX;
private final float mTerminalY;
private int[] mTransitionPosition;
private final View mViewInHierarchy;
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionCancel(Transition transition) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionPause(Transition transition) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionResume(Transition transition) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionStart(Transition transition) {
}
TransitionPositionListener(View view, View view2, int i, int i2, float f, float f2) {
this.mMovingView = view;
this.mViewInHierarchy = view2;
this.mStartX = i - Math.round(view.getTranslationX());
this.mStartY = i2 - Math.round(view.getTranslationY());
this.mTerminalX = f;
this.mTerminalY = f2;
int[] iArr = (int[]) view2.getTag(R.id.transition_position);
this.mTransitionPosition = iArr;
if (iArr != null) {
view2.setTag(R.id.transition_position, null);
}
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationCancel(Animator animator) {
if (this.mTransitionPosition == null) {
this.mTransitionPosition = new int[2];
}
this.mTransitionPosition[0] = Math.round(this.mStartX + this.mMovingView.getTranslationX());
this.mTransitionPosition[1] = Math.round(this.mStartY + this.mMovingView.getTranslationY());
this.mViewInHierarchy.setTag(R.id.transition_position, this.mTransitionPosition);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorPauseListener
public void onAnimationPause(Animator animator) {
this.mPausedX = this.mMovingView.getTranslationX();
this.mPausedY = this.mMovingView.getTranslationY();
this.mMovingView.setTranslationX(this.mTerminalX);
this.mMovingView.setTranslationY(this.mTerminalY);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorPauseListener
public void onAnimationResume(Animator animator) {
this.mMovingView.setTranslationX(this.mPausedX);
this.mMovingView.setTranslationY(this.mPausedY);
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionEnd(Transition transition) {
this.mMovingView.setTranslationX(this.mTerminalX);
this.mMovingView.setTranslationY(this.mTerminalY);
transition.removeListener(this);
}
}
private TranslationAnimationCreator() {
}
}

View File

@ -0,0 +1,26 @@
package androidx.transition;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
/* loaded from: classes.dex */
class ViewGroupOverlayApi14 extends ViewOverlayApi14 implements ViewGroupOverlayImpl {
ViewGroupOverlayApi14(Context context, ViewGroup viewGroup, View view) {
super(context, viewGroup, view);
}
static ViewGroupOverlayApi14 createFrom(ViewGroup viewGroup) {
return (ViewGroupOverlayApi14) ViewOverlayApi14.createFrom(viewGroup);
}
@Override // androidx.transition.ViewGroupOverlayImpl
public void add(View view) {
this.mOverlayViewGroup.add(view);
}
@Override // androidx.transition.ViewGroupOverlayImpl
public void remove(View view) {
this.mOverlayViewGroup.remove(view);
}
}

View File

@ -0,0 +1,35 @@
package androidx.transition;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroupOverlay;
/* loaded from: classes.dex */
class ViewGroupOverlayApi18 implements ViewGroupOverlayImpl {
private final ViewGroupOverlay mViewGroupOverlay;
ViewGroupOverlayApi18(ViewGroup viewGroup) {
this.mViewGroupOverlay = viewGroup.getOverlay();
}
@Override // androidx.transition.ViewOverlayImpl
public void add(Drawable drawable) {
this.mViewGroupOverlay.add(drawable);
}
@Override // androidx.transition.ViewOverlayImpl
public void remove(Drawable drawable) {
this.mViewGroupOverlay.remove(drawable);
}
@Override // androidx.transition.ViewGroupOverlayImpl
public void add(View view) {
this.mViewGroupOverlay.add(view);
}
@Override // androidx.transition.ViewGroupOverlayImpl
public void remove(View view) {
this.mViewGroupOverlay.remove(view);
}
}

View File

@ -0,0 +1,10 @@
package androidx.transition;
import android.view.View;
/* loaded from: classes.dex */
interface ViewGroupOverlayImpl extends ViewOverlayImpl {
void add(View view);
void remove(View view);
}

View File

@ -0,0 +1,63 @@
package androidx.transition;
import android.os.Build;
import android.view.ViewGroup;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
class ViewGroupUtils {
private static Method sGetChildDrawingOrderMethod = null;
private static boolean sGetChildDrawingOrderMethodFetched = false;
private static boolean sTryHiddenSuppressLayout = true;
static ViewGroupOverlayImpl getOverlay(ViewGroup viewGroup) {
return new ViewGroupOverlayApi18(viewGroup);
}
static void suppressLayout(ViewGroup viewGroup, boolean z) {
if (Build.VERSION.SDK_INT >= 29) {
viewGroup.suppressLayout(z);
} else {
hiddenSuppressLayout(viewGroup, z);
}
}
private static void hiddenSuppressLayout(ViewGroup viewGroup, boolean z) {
if (sTryHiddenSuppressLayout) {
try {
viewGroup.suppressLayout(z);
} catch (NoSuchMethodError unused) {
sTryHiddenSuppressLayout = false;
}
}
}
static int getChildDrawingOrder(ViewGroup viewGroup, int i) {
int childDrawingOrder;
if (Build.VERSION.SDK_INT >= 29) {
childDrawingOrder = viewGroup.getChildDrawingOrder(i);
return childDrawingOrder;
}
if (!sGetChildDrawingOrderMethodFetched) {
try {
Method declaredMethod = ViewGroup.class.getDeclaredMethod("getChildDrawingOrder", Integer.TYPE, Integer.TYPE);
sGetChildDrawingOrderMethod = declaredMethod;
declaredMethod.setAccessible(true);
} catch (NoSuchMethodException unused) {
}
sGetChildDrawingOrderMethodFetched = true;
}
Method method = sGetChildDrawingOrderMethod;
if (method != null) {
try {
return ((Integer) method.invoke(viewGroup, Integer.valueOf(viewGroup.getChildCount()), Integer.valueOf(i))).intValue();
} catch (IllegalAccessException | InvocationTargetException unused2) {
}
}
return i;
}
private ViewGroupUtils() {
}
}

View File

@ -0,0 +1,136 @@
package androidx.transition;
import android.animation.LayoutTransition;
import android.util.Log;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
class ViewGroupUtilsApi14 {
private static final int LAYOUT_TRANSITION_CHANGING = 4;
private static final String TAG = "ViewGroupUtilsApi14";
private static Method sCancelMethod;
private static boolean sCancelMethodFetched;
private static LayoutTransition sEmptyLayoutTransition;
private static Field sLayoutSuppressedField;
private static boolean sLayoutSuppressedFieldFetched;
/* JADX WARN: Removed duplicated region for block: B:22:0x008c */
/* JADX WARN: Removed duplicated region for block: B:24:? A[RETURN, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:29:0x007f */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
static void suppressLayout(android.view.ViewGroup r5, boolean r6) {
/*
android.animation.LayoutTransition r0 = androidx.transition.ViewGroupUtilsApi14.sEmptyLayoutTransition
r1 = 1
r2 = 0
r3 = 0
if (r0 != 0) goto L28
androidx.transition.ViewGroupUtilsApi14$1 r0 = new androidx.transition.ViewGroupUtilsApi14$1
r0.<init>()
androidx.transition.ViewGroupUtilsApi14.sEmptyLayoutTransition = r0
r4 = 2
r0.setAnimator(r4, r3)
android.animation.LayoutTransition r0 = androidx.transition.ViewGroupUtilsApi14.sEmptyLayoutTransition
r0.setAnimator(r2, r3)
android.animation.LayoutTransition r0 = androidx.transition.ViewGroupUtilsApi14.sEmptyLayoutTransition
r0.setAnimator(r1, r3)
android.animation.LayoutTransition r0 = androidx.transition.ViewGroupUtilsApi14.sEmptyLayoutTransition
r4 = 3
r0.setAnimator(r4, r3)
android.animation.LayoutTransition r0 = androidx.transition.ViewGroupUtilsApi14.sEmptyLayoutTransition
r4 = 4
r0.setAnimator(r4, r3)
L28:
if (r6 == 0) goto L48
android.animation.LayoutTransition r6 = r5.getLayoutTransition()
if (r6 == 0) goto L42
boolean r0 = r6.isRunning()
if (r0 == 0) goto L39
cancelLayoutTransition(r6)
L39:
android.animation.LayoutTransition r0 = androidx.transition.ViewGroupUtilsApi14.sEmptyLayoutTransition
if (r6 == r0) goto L42
int r0 = androidx.transition.R.id.transition_layout_save
r5.setTag(r0, r6)
L42:
android.animation.LayoutTransition r6 = androidx.transition.ViewGroupUtilsApi14.sEmptyLayoutTransition
r5.setLayoutTransition(r6)
goto L94
L48:
r5.setLayoutTransition(r3)
boolean r6 = androidx.transition.ViewGroupUtilsApi14.sLayoutSuppressedFieldFetched
java.lang.String r0 = "ViewGroupUtilsApi14"
if (r6 != 0) goto L66
java.lang.Class<android.view.ViewGroup> r6 = android.view.ViewGroup.class
java.lang.String r4 = "mLayoutSuppressed"
java.lang.reflect.Field r6 = r6.getDeclaredField(r4) // Catch: java.lang.NoSuchFieldException -> L5f
androidx.transition.ViewGroupUtilsApi14.sLayoutSuppressedField = r6 // Catch: java.lang.NoSuchFieldException -> L5f
r6.setAccessible(r1) // Catch: java.lang.NoSuchFieldException -> L5f
goto L64
L5f:
java.lang.String r6 = "Failed to access mLayoutSuppressed field by reflection"
android.util.Log.i(r0, r6)
L64:
androidx.transition.ViewGroupUtilsApi14.sLayoutSuppressedFieldFetched = r1
L66:
java.lang.reflect.Field r6 = androidx.transition.ViewGroupUtilsApi14.sLayoutSuppressedField
if (r6 == 0) goto L82
boolean r6 = r6.getBoolean(r5) // Catch: java.lang.IllegalAccessException -> L77
if (r6 == 0) goto L7d
java.lang.reflect.Field r1 = androidx.transition.ViewGroupUtilsApi14.sLayoutSuppressedField // Catch: java.lang.IllegalAccessException -> L76
r1.setBoolean(r5, r2) // Catch: java.lang.IllegalAccessException -> L76
goto L7d
L76:
r2 = r6
L77:
java.lang.String r6 = "Failed to get mLayoutSuppressed field by reflection"
android.util.Log.i(r0, r6)
r6 = r2
L7d:
if (r6 == 0) goto L82
r5.requestLayout()
L82:
int r6 = androidx.transition.R.id.transition_layout_save
java.lang.Object r6 = r5.getTag(r6)
android.animation.LayoutTransition r6 = (android.animation.LayoutTransition) r6
if (r6 == 0) goto L94
int r0 = androidx.transition.R.id.transition_layout_save
r5.setTag(r0, r3)
r5.setLayoutTransition(r6)
L94:
return
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.transition.ViewGroupUtilsApi14.suppressLayout(android.view.ViewGroup, boolean):void");
}
private static void cancelLayoutTransition(LayoutTransition layoutTransition) {
if (!sCancelMethodFetched) {
try {
Method declaredMethod = LayoutTransition.class.getDeclaredMethod("cancel", new Class[0]);
sCancelMethod = declaredMethod;
declaredMethod.setAccessible(true);
} catch (NoSuchMethodException unused) {
Log.i(TAG, "Failed to access cancel method by reflection");
}
sCancelMethodFetched = true;
}
Method method = sCancelMethod;
if (method != null) {
try {
method.invoke(layoutTransition, new Object[0]);
} catch (IllegalAccessException unused2) {
Log.i(TAG, "Failed to access cancel method by reflection");
} catch (InvocationTargetException unused3) {
Log.i(TAG, "Failed to invoke cancel method by reflection");
}
}
}
private ViewGroupUtilsApi14() {
}
}

View File

@ -0,0 +1,229 @@
package androidx.transition;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import androidx.core.view.ViewCompat;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
/* loaded from: classes.dex */
class ViewOverlayApi14 implements ViewOverlayImpl {
protected OverlayViewGroup mOverlayViewGroup;
ViewOverlayApi14(Context context, ViewGroup viewGroup, View view) {
this.mOverlayViewGroup = new OverlayViewGroup(context, viewGroup, view, this);
}
static ViewGroup getContentView(View view) {
while (view != null) {
if (view.getId() == 16908290 && (view instanceof ViewGroup)) {
return (ViewGroup) view;
}
if (view.getParent() instanceof ViewGroup) {
view = (ViewGroup) view.getParent();
}
}
return null;
}
static ViewOverlayApi14 createFrom(View view) {
ViewGroup contentView = getContentView(view);
if (contentView == null) {
return null;
}
int childCount = contentView.getChildCount();
for (int i = 0; i < childCount; i++) {
View childAt = contentView.getChildAt(i);
if (childAt instanceof OverlayViewGroup) {
return ((OverlayViewGroup) childAt).mViewOverlay;
}
}
return new ViewGroupOverlayApi14(contentView.getContext(), contentView, view);
}
@Override // androidx.transition.ViewOverlayImpl
public void add(Drawable drawable) {
this.mOverlayViewGroup.add(drawable);
}
@Override // androidx.transition.ViewOverlayImpl
public void remove(Drawable drawable) {
this.mOverlayViewGroup.remove(drawable);
}
static class OverlayViewGroup extends ViewGroup {
static Method sInvalidateChildInParentFastMethod;
private boolean mDisposed;
ArrayList<Drawable> mDrawables;
ViewGroup mHostView;
View mRequestingView;
ViewOverlayApi14 mViewOverlay;
@Override // android.view.ViewGroup, android.view.View
public boolean dispatchTouchEvent(MotionEvent motionEvent) {
return false;
}
@Override // android.view.ViewGroup, android.view.View
protected void onLayout(boolean z, int i, int i2, int i3, int i4) {
}
static {
try {
sInvalidateChildInParentFastMethod = ViewGroup.class.getDeclaredMethod("invalidateChildInParentFast", Integer.TYPE, Integer.TYPE, Rect.class);
} catch (NoSuchMethodException unused) {
}
}
OverlayViewGroup(Context context, ViewGroup viewGroup, View view, ViewOverlayApi14 viewOverlayApi14) {
super(context);
this.mDrawables = null;
this.mHostView = viewGroup;
this.mRequestingView = view;
setRight(viewGroup.getWidth());
setBottom(viewGroup.getHeight());
viewGroup.addView(this);
this.mViewOverlay = viewOverlayApi14;
}
public void add(Drawable drawable) {
assertNotDisposed();
if (this.mDrawables == null) {
this.mDrawables = new ArrayList<>();
}
if (this.mDrawables.contains(drawable)) {
return;
}
this.mDrawables.add(drawable);
invalidate(drawable.getBounds());
drawable.setCallback(this);
}
public void remove(Drawable drawable) {
ArrayList<Drawable> arrayList = this.mDrawables;
if (arrayList != null) {
arrayList.remove(drawable);
invalidate(drawable.getBounds());
drawable.setCallback(null);
disposeIfEmpty();
}
}
@Override // android.view.View
protected boolean verifyDrawable(Drawable drawable) {
ArrayList<Drawable> arrayList;
return super.verifyDrawable(drawable) || ((arrayList = this.mDrawables) != null && arrayList.contains(drawable));
}
public void add(View view) {
assertNotDisposed();
if (view.getParent() instanceof ViewGroup) {
ViewGroup viewGroup = (ViewGroup) view.getParent();
if (viewGroup != this.mHostView && viewGroup.getParent() != null && ViewCompat.isAttachedToWindow(viewGroup)) {
int[] iArr = new int[2];
int[] iArr2 = new int[2];
viewGroup.getLocationOnScreen(iArr);
this.mHostView.getLocationOnScreen(iArr2);
ViewCompat.offsetLeftAndRight(view, iArr[0] - iArr2[0]);
ViewCompat.offsetTopAndBottom(view, iArr[1] - iArr2[1]);
}
viewGroup.removeView(view);
if (view.getParent() != null) {
viewGroup.removeView(view);
}
}
super.addView(view);
}
public void remove(View view) {
super.removeView(view);
disposeIfEmpty();
}
private void assertNotDisposed() {
if (this.mDisposed) {
throw new IllegalStateException("This overlay was disposed already. Please use a new one via ViewGroupUtils.getOverlay()");
}
}
private void disposeIfEmpty() {
if (getChildCount() == 0) {
ArrayList<Drawable> arrayList = this.mDrawables;
if (arrayList == null || arrayList.size() == 0) {
this.mDisposed = true;
this.mHostView.removeView(this);
}
}
}
@Override // android.view.View, android.graphics.drawable.Drawable.Callback
public void invalidateDrawable(Drawable drawable) {
invalidate(drawable.getBounds());
}
@Override // android.view.ViewGroup, android.view.View
protected void dispatchDraw(Canvas canvas) {
this.mHostView.getLocationOnScreen(new int[2]);
this.mRequestingView.getLocationOnScreen(new int[2]);
canvas.translate(r0[0] - r1[0], r0[1] - r1[1]);
canvas.clipRect(new Rect(0, 0, this.mRequestingView.getWidth(), this.mRequestingView.getHeight()));
super.dispatchDraw(canvas);
ArrayList<Drawable> arrayList = this.mDrawables;
int size = arrayList == null ? 0 : arrayList.size();
for (int i = 0; i < size; i++) {
this.mDrawables.get(i).draw(canvas);
}
}
private void getOffset(int[] iArr) {
int[] iArr2 = new int[2];
int[] iArr3 = new int[2];
this.mHostView.getLocationOnScreen(iArr2);
this.mRequestingView.getLocationOnScreen(iArr3);
iArr[0] = iArr3[0] - iArr2[0];
iArr[1] = iArr3[1] - iArr2[1];
}
protected ViewParent invalidateChildInParentFast(int i, int i2, Rect rect) {
if (!(this.mHostView instanceof ViewGroup) || sInvalidateChildInParentFastMethod == null) {
return null;
}
try {
getOffset(new int[2]);
sInvalidateChildInParentFastMethod.invoke(this.mHostView, Integer.valueOf(i), Integer.valueOf(i2), rect);
return null;
} catch (IllegalAccessException e) {
e.printStackTrace();
return null;
} catch (InvocationTargetException e2) {
e2.printStackTrace();
return null;
}
}
@Override // android.view.ViewGroup, android.view.ViewParent
public ViewParent invalidateChildInParent(int[] iArr, Rect rect) {
if (this.mHostView == null) {
return null;
}
rect.offset(iArr[0], iArr[1]);
if (this.mHostView instanceof ViewGroup) {
iArr[0] = 0;
iArr[1] = 0;
int[] iArr2 = new int[2];
getOffset(iArr2);
rect.offset(iArr2[0], iArr2[1]);
return super.invalidateChildInParent(iArr, rect);
}
invalidate(rect);
return null;
}
}
}

View File

@ -0,0 +1,24 @@
package androidx.transition;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.ViewOverlay;
/* loaded from: classes.dex */
class ViewOverlayApi18 implements ViewOverlayImpl {
private final ViewOverlay mViewOverlay;
ViewOverlayApi18(View view) {
this.mViewOverlay = view.getOverlay();
}
@Override // androidx.transition.ViewOverlayImpl
public void add(Drawable drawable) {
this.mViewOverlay.add(drawable);
}
@Override // androidx.transition.ViewOverlayImpl
public void remove(Drawable drawable) {
this.mViewOverlay.remove(drawable);
}
}

View File

@ -0,0 +1,10 @@
package androidx.transition;
import android.graphics.drawable.Drawable;
/* loaded from: classes.dex */
interface ViewOverlayImpl {
void add(Drawable drawable);
void remove(Drawable drawable);
}

View File

@ -0,0 +1,97 @@
package androidx.transition;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.os.Build;
import android.util.Property;
import android.view.View;
import androidx.core.view.ViewCompat;
/* loaded from: classes.dex */
class ViewUtils {
static final Property<View, Rect> CLIP_BOUNDS;
private static final ViewUtilsBase IMPL;
private static final String TAG = "ViewUtils";
static final Property<View, Float> TRANSITION_ALPHA;
static {
if (Build.VERSION.SDK_INT >= 29) {
IMPL = new ViewUtilsApi29();
} else if (Build.VERSION.SDK_INT >= 23) {
IMPL = new ViewUtilsApi23();
} else if (Build.VERSION.SDK_INT >= 22) {
IMPL = new ViewUtilsApi22();
} else {
IMPL = new ViewUtilsApi21();
}
TRANSITION_ALPHA = new Property<View, Float>(Float.class, "translationAlpha") { // from class: androidx.transition.ViewUtils.1
@Override // android.util.Property
public Float get(View view) {
return Float.valueOf(ViewUtils.getTransitionAlpha(view));
}
@Override // android.util.Property
public void set(View view, Float f) {
ViewUtils.setTransitionAlpha(view, f.floatValue());
}
};
CLIP_BOUNDS = new Property<View, Rect>(Rect.class, "clipBounds") { // from class: androidx.transition.ViewUtils.2
@Override // android.util.Property
public Rect get(View view) {
return ViewCompat.getClipBounds(view);
}
@Override // android.util.Property
public void set(View view, Rect rect) {
ViewCompat.setClipBounds(view, rect);
}
};
}
static ViewOverlayImpl getOverlay(View view) {
return new ViewOverlayApi18(view);
}
static WindowIdImpl getWindowId(View view) {
return new WindowIdApi18(view);
}
static void setTransitionAlpha(View view, float f) {
IMPL.setTransitionAlpha(view, f);
}
static float getTransitionAlpha(View view) {
return IMPL.getTransitionAlpha(view);
}
static void saveNonTransitionAlpha(View view) {
IMPL.saveNonTransitionAlpha(view);
}
static void clearNonTransitionAlpha(View view) {
IMPL.clearNonTransitionAlpha(view);
}
static void setTransitionVisibility(View view, int i) {
IMPL.setTransitionVisibility(view, i);
}
static void transformMatrixToGlobal(View view, Matrix matrix) {
IMPL.transformMatrixToGlobal(view, matrix);
}
static void transformMatrixToLocal(View view, Matrix matrix) {
IMPL.transformMatrixToLocal(view, matrix);
}
static void setAnimationMatrix(View view, Matrix matrix) {
IMPL.setAnimationMatrix(view, matrix);
}
static void setLeftTopRightBottom(View view, int i, int i2, int i3, int i4) {
IMPL.setLeftTopRightBottom(view, i, i2, i3, i4);
}
private ViewUtils() {
}
}

View File

@ -0,0 +1,46 @@
package androidx.transition;
import android.view.View;
/* loaded from: classes.dex */
class ViewUtilsApi19 extends ViewUtilsBase {
private static boolean sTryHiddenTransitionAlpha = true;
@Override // androidx.transition.ViewUtilsBase
public void clearNonTransitionAlpha(View view) {
}
@Override // androidx.transition.ViewUtilsBase
public void saveNonTransitionAlpha(View view) {
}
ViewUtilsApi19() {
}
@Override // androidx.transition.ViewUtilsBase
public void setTransitionAlpha(View view, float f) {
if (sTryHiddenTransitionAlpha) {
try {
view.setTransitionAlpha(f);
return;
} catch (NoSuchMethodError unused) {
sTryHiddenTransitionAlpha = false;
}
}
view.setAlpha(f);
}
@Override // androidx.transition.ViewUtilsBase
public float getTransitionAlpha(View view) {
float transitionAlpha;
if (sTryHiddenTransitionAlpha) {
try {
transitionAlpha = view.getTransitionAlpha();
return transitionAlpha;
} catch (NoSuchMethodError unused) {
sTryHiddenTransitionAlpha = false;
}
}
return view.getAlpha();
}
}

View File

@ -0,0 +1,47 @@
package androidx.transition;
import android.graphics.Matrix;
import android.view.View;
/* loaded from: classes.dex */
class ViewUtilsApi21 extends ViewUtilsApi19 {
private static boolean sTryHiddenSetAnimationMatrix = true;
private static boolean sTryHiddenTransformMatrixToGlobal = true;
private static boolean sTryHiddenTransformMatrixToLocal = true;
ViewUtilsApi21() {
}
@Override // androidx.transition.ViewUtilsBase
public void transformMatrixToGlobal(View view, Matrix matrix) {
if (sTryHiddenTransformMatrixToGlobal) {
try {
view.transformMatrixToGlobal(matrix);
} catch (NoSuchMethodError unused) {
sTryHiddenTransformMatrixToGlobal = false;
}
}
}
@Override // androidx.transition.ViewUtilsBase
public void transformMatrixToLocal(View view, Matrix matrix) {
if (sTryHiddenTransformMatrixToLocal) {
try {
view.transformMatrixToLocal(matrix);
} catch (NoSuchMethodError unused) {
sTryHiddenTransformMatrixToLocal = false;
}
}
}
@Override // androidx.transition.ViewUtilsBase
public void setAnimationMatrix(View view, Matrix matrix) {
if (sTryHiddenSetAnimationMatrix) {
try {
view.setAnimationMatrix(matrix);
} catch (NoSuchMethodError unused) {
sTryHiddenSetAnimationMatrix = false;
}
}
}
}

View File

@ -0,0 +1,22 @@
package androidx.transition;
import android.view.View;
/* loaded from: classes.dex */
class ViewUtilsApi22 extends ViewUtilsApi21 {
private static boolean sTryHiddenSetLeftTopRightBottom = true;
ViewUtilsApi22() {
}
@Override // androidx.transition.ViewUtilsBase
public void setLeftTopRightBottom(View view, int i, int i2, int i3, int i4) {
if (sTryHiddenSetLeftTopRightBottom) {
try {
view.setLeftTopRightBottom(i, i2, i3, i4);
} catch (NoSuchMethodError unused) {
sTryHiddenSetLeftTopRightBottom = false;
}
}
}
}

View File

@ -0,0 +1,25 @@
package androidx.transition;
import android.os.Build;
import android.view.View;
/* loaded from: classes.dex */
class ViewUtilsApi23 extends ViewUtilsApi22 {
private static boolean sTryHiddenSetTransitionVisibility = true;
ViewUtilsApi23() {
}
@Override // androidx.transition.ViewUtilsBase
public void setTransitionVisibility(View view, int i) {
if (Build.VERSION.SDK_INT == 28) {
super.setTransitionVisibility(view, i);
} else if (sTryHiddenSetTransitionVisibility) {
try {
view.setTransitionVisibility(i);
} catch (NoSuchMethodError unused) {
sTryHiddenSetTransitionVisibility = false;
}
}
}
}

View File

@ -0,0 +1,47 @@
package androidx.transition;
import android.graphics.Matrix;
import android.view.View;
/* loaded from: classes.dex */
class ViewUtilsApi29 extends ViewUtilsApi23 {
ViewUtilsApi29() {
}
@Override // androidx.transition.ViewUtilsApi19, androidx.transition.ViewUtilsBase
public void setTransitionAlpha(View view, float f) {
view.setTransitionAlpha(f);
}
@Override // androidx.transition.ViewUtilsApi19, androidx.transition.ViewUtilsBase
public float getTransitionAlpha(View view) {
float transitionAlpha;
transitionAlpha = view.getTransitionAlpha();
return transitionAlpha;
}
@Override // androidx.transition.ViewUtilsApi23, androidx.transition.ViewUtilsBase
public void setTransitionVisibility(View view, int i) {
view.setTransitionVisibility(i);
}
@Override // androidx.transition.ViewUtilsApi22, androidx.transition.ViewUtilsBase
public void setLeftTopRightBottom(View view, int i, int i2, int i3, int i4) {
view.setLeftTopRightBottom(i, i2, i3, i4);
}
@Override // androidx.transition.ViewUtilsApi21, androidx.transition.ViewUtilsBase
public void transformMatrixToGlobal(View view, Matrix matrix) {
view.transformMatrixToGlobal(matrix);
}
@Override // androidx.transition.ViewUtilsApi21, androidx.transition.ViewUtilsBase
public void transformMatrixToLocal(View view, Matrix matrix) {
view.transformMatrixToLocal(matrix);
}
@Override // androidx.transition.ViewUtilsApi21, androidx.transition.ViewUtilsBase
public void setAnimationMatrix(View view, Matrix matrix) {
view.setAnimationMatrix(matrix);
}
}

View File

@ -0,0 +1,162 @@
package androidx.transition;
import android.graphics.Matrix;
import android.util.Log;
import android.view.View;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
class ViewUtilsBase {
private static final String TAG = "ViewUtilsBase";
private static final int VISIBILITY_MASK = 12;
private static boolean sSetFrameFetched;
private static Method sSetFrameMethod;
private static Field sViewFlagsField;
private static boolean sViewFlagsFieldFetched;
private float[] mMatrixValues;
ViewUtilsBase() {
}
public void setTransitionAlpha(View view, float f) {
Float f2 = (Float) view.getTag(R.id.save_non_transition_alpha);
if (f2 != null) {
view.setAlpha(f2.floatValue() * f);
} else {
view.setAlpha(f);
}
}
public float getTransitionAlpha(View view) {
Float f = (Float) view.getTag(R.id.save_non_transition_alpha);
if (f != null) {
return view.getAlpha() / f.floatValue();
}
return view.getAlpha();
}
public void saveNonTransitionAlpha(View view) {
if (view.getTag(R.id.save_non_transition_alpha) == null) {
view.setTag(R.id.save_non_transition_alpha, Float.valueOf(view.getAlpha()));
}
}
public void clearNonTransitionAlpha(View view) {
if (view.getVisibility() == 0) {
view.setTag(R.id.save_non_transition_alpha, null);
}
}
public void transformMatrixToGlobal(View view, Matrix matrix) {
Object parent = view.getParent();
if (parent instanceof View) {
transformMatrixToGlobal((View) parent, matrix);
matrix.preTranslate(-r0.getScrollX(), -r0.getScrollY());
}
matrix.preTranslate(view.getLeft(), view.getTop());
Matrix matrix2 = view.getMatrix();
if (matrix2.isIdentity()) {
return;
}
matrix.preConcat(matrix2);
}
public void transformMatrixToLocal(View view, Matrix matrix) {
Object parent = view.getParent();
if (parent instanceof View) {
transformMatrixToLocal((View) parent, matrix);
matrix.postTranslate(r0.getScrollX(), r0.getScrollY());
}
matrix.postTranslate(-view.getLeft(), -view.getTop());
Matrix matrix2 = view.getMatrix();
if (matrix2.isIdentity()) {
return;
}
Matrix matrix3 = new Matrix();
if (matrix2.invert(matrix3)) {
matrix.postConcat(matrix3);
}
}
public void setAnimationMatrix(View view, Matrix matrix) {
if (matrix == null || matrix.isIdentity()) {
view.setPivotX(view.getWidth() / 2);
view.setPivotY(view.getHeight() / 2);
view.setTranslationX(0.0f);
view.setTranslationY(0.0f);
view.setScaleX(1.0f);
view.setScaleY(1.0f);
view.setRotation(0.0f);
return;
}
float[] fArr = this.mMatrixValues;
if (fArr == null) {
fArr = new float[9];
this.mMatrixValues = fArr;
}
matrix.getValues(fArr);
float f = fArr[3];
float sqrt = ((float) Math.sqrt(1.0f - (f * f))) * (fArr[0] < 0.0f ? -1 : 1);
float degrees = (float) Math.toDegrees(Math.atan2(f, sqrt));
float f2 = fArr[0] / sqrt;
float f3 = fArr[4] / sqrt;
float f4 = fArr[2];
float f5 = fArr[5];
view.setPivotX(0.0f);
view.setPivotY(0.0f);
view.setTranslationX(f4);
view.setTranslationY(f5);
view.setRotation(degrees);
view.setScaleX(f2);
view.setScaleY(f3);
}
public void setLeftTopRightBottom(View view, int i, int i2, int i3, int i4) {
fetchSetFrame();
Method method = sSetFrameMethod;
if (method != null) {
try {
method.invoke(view, Integer.valueOf(i), Integer.valueOf(i2), Integer.valueOf(i3), Integer.valueOf(i4));
} catch (IllegalAccessException unused) {
} catch (InvocationTargetException e) {
throw new RuntimeException(e.getCause());
}
}
}
public void setTransitionVisibility(View view, int i) {
if (!sViewFlagsFieldFetched) {
try {
Field declaredField = View.class.getDeclaredField("mViewFlags");
sViewFlagsField = declaredField;
declaredField.setAccessible(true);
} catch (NoSuchFieldException unused) {
Log.i(TAG, "fetchViewFlagsField: ");
}
sViewFlagsFieldFetched = true;
}
Field field = sViewFlagsField;
if (field != null) {
try {
sViewFlagsField.setInt(view, i | (field.getInt(view) & (-13)));
} catch (IllegalAccessException unused2) {
}
}
}
private void fetchSetFrame() {
if (sSetFrameFetched) {
return;
}
try {
Method declaredMethod = View.class.getDeclaredMethod("setFrame", Integer.TYPE, Integer.TYPE, Integer.TYPE, Integer.TYPE);
sSetFrameMethod = declaredMethod;
declaredMethod.setAccessible(true);
} catch (NoSuchMethodException e) {
Log.i(TAG, "Failed to retrieve setFrame method", e);
}
sSetFrameFetched = true;
}
}

View File

@ -0,0 +1,308 @@
package androidx.transition;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import androidx.core.content.res.TypedArrayUtils;
import androidx.transition.AnimatorUtils;
import androidx.transition.Transition;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/* loaded from: classes.dex */
public abstract class Visibility extends Transition {
public static final int MODE_IN = 1;
public static final int MODE_OUT = 2;
private static final String PROPNAME_SCREEN_LOCATION = "android:visibility:screenLocation";
private int mMode;
static final String PROPNAME_VISIBILITY = "android:visibility:visibility";
private static final String PROPNAME_PARENT = "android:visibility:parent";
private static final String[] sTransitionProperties = {PROPNAME_VISIBILITY, PROPNAME_PARENT};
@Retention(RetentionPolicy.SOURCE)
public @interface Mode {
}
public int getMode() {
return this.mMode;
}
@Override // androidx.transition.Transition
public String[] getTransitionProperties() {
return sTransitionProperties;
}
public Animator onAppear(ViewGroup viewGroup, View view, TransitionValues transitionValues, TransitionValues transitionValues2) {
return null;
}
public Animator onDisappear(ViewGroup viewGroup, View view, TransitionValues transitionValues, TransitionValues transitionValues2) {
return null;
}
private static class VisibilityInfo {
ViewGroup mEndParent;
int mEndVisibility;
boolean mFadeIn;
ViewGroup mStartParent;
int mStartVisibility;
boolean mVisibilityChange;
VisibilityInfo() {
}
}
public Visibility() {
this.mMode = 3;
}
public Visibility(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.mMode = 3;
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, Styleable.VISIBILITY_TRANSITION);
int namedInt = TypedArrayUtils.getNamedInt(obtainStyledAttributes, (XmlResourceParser) attributeSet, "transitionVisibilityMode", 0, 0);
obtainStyledAttributes.recycle();
if (namedInt != 0) {
setMode(namedInt);
}
}
public void setMode(int i) {
if ((i & (-4)) != 0) {
throw new IllegalArgumentException("Only MODE_IN and MODE_OUT flags are allowed");
}
this.mMode = i;
}
private void captureValues(TransitionValues transitionValues) {
transitionValues.values.put(PROPNAME_VISIBILITY, Integer.valueOf(transitionValues.view.getVisibility()));
transitionValues.values.put(PROPNAME_PARENT, transitionValues.view.getParent());
int[] iArr = new int[2];
transitionValues.view.getLocationOnScreen(iArr);
transitionValues.values.put(PROPNAME_SCREEN_LOCATION, iArr);
}
@Override // androidx.transition.Transition
public void captureStartValues(TransitionValues transitionValues) {
captureValues(transitionValues);
}
@Override // androidx.transition.Transition
public void captureEndValues(TransitionValues transitionValues) {
captureValues(transitionValues);
}
public boolean isVisible(TransitionValues transitionValues) {
if (transitionValues == null) {
return false;
}
return ((Integer) transitionValues.values.get(PROPNAME_VISIBILITY)).intValue() == 0 && ((View) transitionValues.values.get(PROPNAME_PARENT)) != null;
}
private VisibilityInfo getVisibilityChangeInfo(TransitionValues transitionValues, TransitionValues transitionValues2) {
VisibilityInfo visibilityInfo = new VisibilityInfo();
visibilityInfo.mVisibilityChange = false;
visibilityInfo.mFadeIn = false;
if (transitionValues != null && transitionValues.values.containsKey(PROPNAME_VISIBILITY)) {
visibilityInfo.mStartVisibility = ((Integer) transitionValues.values.get(PROPNAME_VISIBILITY)).intValue();
visibilityInfo.mStartParent = (ViewGroup) transitionValues.values.get(PROPNAME_PARENT);
} else {
visibilityInfo.mStartVisibility = -1;
visibilityInfo.mStartParent = null;
}
if (transitionValues2 != null && transitionValues2.values.containsKey(PROPNAME_VISIBILITY)) {
visibilityInfo.mEndVisibility = ((Integer) transitionValues2.values.get(PROPNAME_VISIBILITY)).intValue();
visibilityInfo.mEndParent = (ViewGroup) transitionValues2.values.get(PROPNAME_PARENT);
} else {
visibilityInfo.mEndVisibility = -1;
visibilityInfo.mEndParent = null;
}
if (transitionValues != null && transitionValues2 != null) {
if (visibilityInfo.mStartVisibility == visibilityInfo.mEndVisibility && visibilityInfo.mStartParent == visibilityInfo.mEndParent) {
return visibilityInfo;
}
if (visibilityInfo.mStartVisibility != visibilityInfo.mEndVisibility) {
if (visibilityInfo.mStartVisibility == 0) {
visibilityInfo.mFadeIn = false;
visibilityInfo.mVisibilityChange = true;
} else if (visibilityInfo.mEndVisibility == 0) {
visibilityInfo.mFadeIn = true;
visibilityInfo.mVisibilityChange = true;
}
} else if (visibilityInfo.mEndParent == null) {
visibilityInfo.mFadeIn = false;
visibilityInfo.mVisibilityChange = true;
} else if (visibilityInfo.mStartParent == null) {
visibilityInfo.mFadeIn = true;
visibilityInfo.mVisibilityChange = true;
}
} else if (transitionValues == null && visibilityInfo.mEndVisibility == 0) {
visibilityInfo.mFadeIn = true;
visibilityInfo.mVisibilityChange = true;
} else if (transitionValues2 == null && visibilityInfo.mStartVisibility == 0) {
visibilityInfo.mFadeIn = false;
visibilityInfo.mVisibilityChange = true;
}
return visibilityInfo;
}
@Override // androidx.transition.Transition
public Animator createAnimator(ViewGroup viewGroup, TransitionValues transitionValues, TransitionValues transitionValues2) {
VisibilityInfo visibilityChangeInfo = getVisibilityChangeInfo(transitionValues, transitionValues2);
if (!visibilityChangeInfo.mVisibilityChange) {
return null;
}
if (visibilityChangeInfo.mStartParent == null && visibilityChangeInfo.mEndParent == null) {
return null;
}
if (visibilityChangeInfo.mFadeIn) {
return onAppear(viewGroup, transitionValues, visibilityChangeInfo.mStartVisibility, transitionValues2, visibilityChangeInfo.mEndVisibility);
}
return onDisappear(viewGroup, transitionValues, visibilityChangeInfo.mStartVisibility, transitionValues2, visibilityChangeInfo.mEndVisibility);
}
public Animator onAppear(ViewGroup viewGroup, TransitionValues transitionValues, int i, TransitionValues transitionValues2, int i2) {
if ((this.mMode & 1) != 1 || transitionValues2 == null) {
return null;
}
if (transitionValues == null) {
View view = (View) transitionValues2.view.getParent();
if (getVisibilityChangeInfo(getMatchedTransitionValues(view, false), getTransitionValues(view, false)).mVisibilityChange) {
return null;
}
}
return onAppear(viewGroup, transitionValues2.view, transitionValues, transitionValues2);
}
/* JADX WARN: Code restructure failed: missing block: B:51:0x007f, code lost:
if (r10.mCanRemoveViews != false) goto L43;
*/
/* JADX WARN: Removed duplicated region for block: B:37:0x0040 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public android.animation.Animator onDisappear(final android.view.ViewGroup r11, androidx.transition.TransitionValues r12, int r13, androidx.transition.TransitionValues r14, int r15) {
/*
Method dump skipped, instructions count: 256
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.transition.Visibility.onDisappear(android.view.ViewGroup, androidx.transition.TransitionValues, int, androidx.transition.TransitionValues, int):android.animation.Animator");
}
@Override // androidx.transition.Transition
public boolean isTransitionRequired(TransitionValues transitionValues, TransitionValues transitionValues2) {
if (transitionValues == null && transitionValues2 == null) {
return false;
}
if (transitionValues != null && transitionValues2 != null && transitionValues2.values.containsKey(PROPNAME_VISIBILITY) != transitionValues.values.containsKey(PROPNAME_VISIBILITY)) {
return false;
}
VisibilityInfo visibilityChangeInfo = getVisibilityChangeInfo(transitionValues, transitionValues2);
if (visibilityChangeInfo.mVisibilityChange) {
return visibilityChangeInfo.mStartVisibility == 0 || visibilityChangeInfo.mEndVisibility == 0;
}
return false;
}
private static class DisappearListener extends AnimatorListenerAdapter implements Transition.TransitionListener, AnimatorUtils.AnimatorPauseListenerCompat {
boolean mCanceled = false;
private final int mFinalVisibility;
private boolean mLayoutSuppressed;
private final ViewGroup mParent;
private final boolean mSuppressLayout;
private final View mView;
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationCancel(Animator animator) {
this.mCanceled = true;
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationRepeat(Animator animator) {
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationStart(Animator animator) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionCancel(Transition transition) {
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionStart(Transition transition) {
}
DisappearListener(View view, int i, boolean z) {
this.mView = view;
this.mFinalVisibility = i;
this.mParent = (ViewGroup) view.getParent();
this.mSuppressLayout = z;
suppressLayout(true);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorPauseListener, androidx.transition.AnimatorUtils.AnimatorPauseListenerCompat
public void onAnimationPause(Animator animator) {
if (this.mCanceled) {
return;
}
ViewUtils.setTransitionVisibility(this.mView, this.mFinalVisibility);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorPauseListener, androidx.transition.AnimatorUtils.AnimatorPauseListenerCompat
public void onAnimationResume(Animator animator) {
if (this.mCanceled) {
return;
}
ViewUtils.setTransitionVisibility(this.mView, 0);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
hideViewWhenNotCanceled();
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionEnd(Transition transition) {
hideViewWhenNotCanceled();
transition.removeListener(this);
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionPause(Transition transition) {
suppressLayout(false);
}
@Override // androidx.transition.Transition.TransitionListener
public void onTransitionResume(Transition transition) {
suppressLayout(true);
}
private void hideViewWhenNotCanceled() {
if (!this.mCanceled) {
ViewUtils.setTransitionVisibility(this.mView, this.mFinalVisibility);
ViewGroup viewGroup = this.mParent;
if (viewGroup != null) {
viewGroup.invalidate();
}
}
suppressLayout(false);
}
private void suppressLayout(boolean z) {
ViewGroup viewGroup;
if (!this.mSuppressLayout || this.mLayoutSuppressed == z || (viewGroup = this.mParent) == null) {
return;
}
this.mLayoutSuppressed = z;
ViewGroupUtils.suppressLayout(viewGroup, z);
}
}
}

View File

@ -0,0 +1,57 @@
package androidx.transition;
import android.view.View;
/* loaded from: classes.dex */
public abstract class VisibilityPropagation extends TransitionPropagation {
private static final String PROPNAME_VISIBILITY = "android:visibilityPropagation:visibility";
private static final String PROPNAME_VIEW_CENTER = "android:visibilityPropagation:center";
private static final String[] VISIBILITY_PROPAGATION_VALUES = {PROPNAME_VISIBILITY, PROPNAME_VIEW_CENTER};
@Override // androidx.transition.TransitionPropagation
public String[] getPropagationProperties() {
return VISIBILITY_PROPAGATION_VALUES;
}
@Override // androidx.transition.TransitionPropagation
public void captureValues(TransitionValues transitionValues) {
View view = transitionValues.view;
Integer num = (Integer) transitionValues.values.get("android:visibility:visibility");
if (num == null) {
num = Integer.valueOf(view.getVisibility());
}
transitionValues.values.put(PROPNAME_VISIBILITY, num);
int[] iArr = {r4, 0};
view.getLocationOnScreen(iArr);
int round = iArr[0] + Math.round(view.getTranslationX());
iArr[0] = round + (view.getWidth() / 2);
int round2 = iArr[1] + Math.round(view.getTranslationY());
iArr[1] = round2;
iArr[1] = round2 + (view.getHeight() / 2);
transitionValues.values.put(PROPNAME_VIEW_CENTER, iArr);
}
public int getViewVisibility(TransitionValues transitionValues) {
Integer num;
if (transitionValues == null || (num = (Integer) transitionValues.values.get(PROPNAME_VISIBILITY)) == null) {
return 8;
}
return num.intValue();
}
public int getViewX(TransitionValues transitionValues) {
return getViewCoordinate(transitionValues, 0);
}
public int getViewY(TransitionValues transitionValues) {
return getViewCoordinate(transitionValues, 1);
}
private static int getViewCoordinate(TransitionValues transitionValues, int i) {
int[] iArr;
if (transitionValues == null || (iArr = (int[]) transitionValues.values.get(PROPNAME_VIEW_CENTER)) == null) {
return -1;
}
return iArr[i];
}
}

View File

@ -0,0 +1,20 @@
package androidx.transition;
import android.os.IBinder;
/* loaded from: classes.dex */
class WindowIdApi14 implements WindowIdImpl {
private final IBinder mToken;
WindowIdApi14(IBinder iBinder) {
this.mToken = iBinder;
}
public boolean equals(Object obj) {
return (obj instanceof WindowIdApi14) && ((WindowIdApi14) obj).mToken.equals(this.mToken);
}
public int hashCode() {
return this.mToken.hashCode();
}
}

View File

@ -0,0 +1,21 @@
package androidx.transition;
import android.view.View;
import android.view.WindowId;
/* loaded from: classes.dex */
class WindowIdApi18 implements WindowIdImpl {
private final WindowId mWindowId;
WindowIdApi18(View view) {
this.mWindowId = view.getWindowId();
}
public boolean equals(Object obj) {
return (obj instanceof WindowIdApi18) && ((WindowIdApi18) obj).mWindowId.equals(this.mWindowId);
}
public int hashCode() {
return this.mWindowId.hashCode();
}
}

View File

@ -0,0 +1,5 @@
package androidx.transition;
/* loaded from: classes.dex */
interface WindowIdImpl {
}