356 lines
12 KiB
Java
356 lines
12 KiB
Java
package o;
|
|
|
|
import android.graphics.Rect;
|
|
import android.transition.Transition;
|
|
import android.transition.TransitionManager;
|
|
import android.transition.TransitionSet;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import androidx.fragment.app.Fragment;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes.dex */
|
|
class Amf extends AbstractC12179etN {
|
|
@Override // o.AbstractC12179etN
|
|
public boolean d(Object obj) {
|
|
return obj instanceof Transition;
|
|
}
|
|
|
|
@Override // o.AbstractC12179etN
|
|
public Object a(Object obj) {
|
|
if (obj != null) {
|
|
return ((Transition) obj).clone();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // o.AbstractC12179etN
|
|
public Object e(Object obj) {
|
|
if (obj == null) {
|
|
return null;
|
|
}
|
|
TransitionSet transitionSet = new TransitionSet();
|
|
transitionSet.addTransition((Transition) obj);
|
|
return transitionSet;
|
|
}
|
|
|
|
@Override // o.AbstractC12179etN
|
|
public void a(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++) {
|
|
a(targets, arrayList.get(i));
|
|
}
|
|
targets.add(view);
|
|
arrayList.add(view);
|
|
e(transitionSet, arrayList);
|
|
}
|
|
|
|
@Override // o.AbstractC12179etN
|
|
public void e(Object obj, View view) {
|
|
if (view != null) {
|
|
Rect rect = new Rect();
|
|
ze_(view, rect);
|
|
((Transition) obj).setEpicenterCallback(new Transition.EpicenterCallback(this, rect) { // from class: o.Amf.4
|
|
final Rect a;
|
|
final Amf b;
|
|
|
|
{
|
|
this.b = this;
|
|
this.a = rect;
|
|
}
|
|
|
|
@Override // android.transition.Transition.EpicenterCallback
|
|
public Rect onGetEpicenter(Transition transition) {
|
|
return this.a;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
@Override // o.AbstractC12179etN
|
|
public void e(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) {
|
|
e(transitionSet.getTransitionAt(i), arrayList);
|
|
i++;
|
|
}
|
|
return;
|
|
}
|
|
if (yY_(transition) || !a((List) transition.getTargets())) {
|
|
return;
|
|
}
|
|
int size = arrayList.size();
|
|
while (i < size) {
|
|
transition.addTarget(arrayList.get(i));
|
|
i++;
|
|
}
|
|
}
|
|
|
|
private static boolean yY_(Transition transition) {
|
|
return (a((List) transition.getTargetIds()) && a((List) transition.getTargetNames()) && a((List) transition.getTargetTypes())) ? false : true;
|
|
}
|
|
|
|
@Override // o.AbstractC12179etN
|
|
public Object d(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 // o.AbstractC12179etN
|
|
public void b(Object obj, View view, ArrayList<View> arrayList) {
|
|
((Transition) obj).addListener(new Transition.TransitionListener(this, view, arrayList) { // from class: o.Amf.1
|
|
final Amf a;
|
|
final View b;
|
|
final ArrayList d;
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionCancel(Transition transition) {
|
|
}
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionPause(Transition transition) {
|
|
}
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionResume(Transition transition) {
|
|
}
|
|
|
|
{
|
|
this.a = this;
|
|
this.b = view;
|
|
this.d = arrayList;
|
|
}
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionStart(Transition transition) {
|
|
RVV.zc_(transition, this);
|
|
RVV.zb_(transition, this);
|
|
}
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionEnd(Transition transition) {
|
|
RVV.zc_(transition, this);
|
|
this.b.setVisibility(8);
|
|
int size = this.d.size();
|
|
for (int i = 0; i < size; i++) {
|
|
((View) this.d.get(i)).setVisibility(0);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // o.AbstractC12179etN
|
|
public Object c(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 ? null : transition2;
|
|
}
|
|
if (transition3 == null) {
|
|
return transition;
|
|
}
|
|
TransitionSet transitionSet = new TransitionSet();
|
|
if (transition != null) {
|
|
transitionSet.addTransition(transition);
|
|
}
|
|
transitionSet.addTransition(transition3);
|
|
return transitionSet;
|
|
}
|
|
|
|
@Override // o.AbstractC12179etN
|
|
public void AX_(ViewGroup viewGroup, Object obj) {
|
|
TransitionManager.beginDelayedTransition(viewGroup, (Transition) obj);
|
|
}
|
|
|
|
@Override // o.AbstractC12179etN
|
|
public void d(Object obj, Object obj2, ArrayList<View> arrayList, Object obj3, ArrayList<View> arrayList2, Object obj4, ArrayList<View> arrayList3) {
|
|
((Transition) obj).addListener(new Transition.TransitionListener(this, obj2, arrayList, obj3, arrayList2, obj4, arrayList3) { // from class: o.Amf.2
|
|
final Object a;
|
|
final ArrayList b;
|
|
final Object c;
|
|
final Amf d;
|
|
final ArrayList e;
|
|
final Object g;
|
|
final ArrayList j;
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionCancel(Transition transition) {
|
|
}
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionPause(Transition transition) {
|
|
}
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionResume(Transition transition) {
|
|
}
|
|
|
|
{
|
|
this.d = this;
|
|
this.a = obj2;
|
|
this.b = arrayList;
|
|
this.c = obj3;
|
|
this.e = arrayList2;
|
|
this.g = obj4;
|
|
this.j = arrayList3;
|
|
}
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionStart(Transition transition) {
|
|
Object obj5 = this.a;
|
|
if (obj5 != null) {
|
|
this.d.e(obj5, this.b, (ArrayList<View>) null);
|
|
}
|
|
Object obj6 = this.c;
|
|
if (obj6 != null) {
|
|
this.d.e(obj6, this.e, (ArrayList<View>) null);
|
|
}
|
|
Object obj7 = this.g;
|
|
if (obj7 != null) {
|
|
this.d.e(obj7, this.j, (ArrayList<View>) null);
|
|
}
|
|
}
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionEnd(Transition transition) {
|
|
RVV.zc_(transition, this);
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // o.AbstractC12179etN
|
|
public void a(Fragment fragment, Object obj, vNC vnc, Runnable runnable) {
|
|
((Transition) obj).addListener(new Transition.TransitionListener(this, runnable) { // from class: o.Amf.5
|
|
final Runnable d;
|
|
final Amf e;
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionCancel(Transition transition) {
|
|
}
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionPause(Transition transition) {
|
|
}
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionResume(Transition transition) {
|
|
}
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionStart(Transition transition) {
|
|
}
|
|
|
|
{
|
|
this.e = this;
|
|
this.d = runnable;
|
|
}
|
|
|
|
@Override // android.transition.Transition.TransitionListener
|
|
public void onTransitionEnd(Transition transition) {
|
|
this.d.run();
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // o.AbstractC12179etN
|
|
public void c(Object obj, ArrayList<View> arrayList, ArrayList<View> arrayList2) {
|
|
TransitionSet transitionSet = (TransitionSet) obj;
|
|
if (transitionSet != null) {
|
|
transitionSet.getTargets().clear();
|
|
transitionSet.getTargets().addAll(arrayList2);
|
|
e(transitionSet, arrayList, arrayList2);
|
|
}
|
|
}
|
|
|
|
public void e(Object obj, ArrayList<View> arrayList, ArrayList<View> arrayList2) {
|
|
List<View> targets;
|
|
Transition transition = (Transition) obj;
|
|
int i = 0;
|
|
if (transition instanceof TransitionSet) {
|
|
TransitionSet transitionSet = (TransitionSet) transition;
|
|
int transitionCount = transitionSet.getTransitionCount();
|
|
while (i < transitionCount) {
|
|
e(transitionSet.getTransitionAt(i), arrayList, arrayList2);
|
|
i++;
|
|
}
|
|
return;
|
|
}
|
|
if (yY_(transition) || (targets = transition.getTargets()) == null || targets.size() != arrayList.size() || !targets.containsAll(arrayList)) {
|
|
return;
|
|
}
|
|
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 // o.AbstractC12179etN
|
|
public void b(Object obj, View view) {
|
|
if (obj != null) {
|
|
((Transition) obj).addTarget(view);
|
|
}
|
|
}
|
|
|
|
@Override // o.AbstractC12179etN
|
|
public void AY_(Object obj, Rect rect) {
|
|
if (obj != null) {
|
|
((Transition) obj).setEpicenterCallback(new Transition.EpicenterCallback(this, rect) { // from class: o.Amf.3
|
|
final Rect a;
|
|
final Amf e;
|
|
|
|
{
|
|
this.e = this;
|
|
this.a = rect;
|
|
}
|
|
|
|
@Override // android.transition.Transition.EpicenterCallback
|
|
public Rect onGetEpicenter(Transition transition) {
|
|
Rect rect2 = this.a;
|
|
if (rect2 == null || rect2.isEmpty()) {
|
|
return null;
|
|
}
|
|
return this.a;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes.dex */
|
|
static class RVV {
|
|
static void zb_(Transition transition, Transition.TransitionListener transitionListener) {
|
|
transition.addListener(transitionListener);
|
|
}
|
|
|
|
static void zc_(Transition transition, Transition.TransitionListener transitionListener) {
|
|
transition.removeListener(transitionListener);
|
|
}
|
|
}
|
|
}
|