73 lines
2.0 KiB
Java
73 lines
2.0 KiB
Java
package androidx.transition;
|
|
|
|
import android.graphics.Matrix;
|
|
import android.util.Log;
|
|
import android.view.View;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.lang.reflect.Method;
|
|
|
|
/* loaded from: classes.dex */
|
|
class ViewUtilsApi21 extends ViewUtilsApi19 {
|
|
private static Method e;
|
|
private static boolean f;
|
|
private static Method g;
|
|
private static boolean h;
|
|
|
|
ViewUtilsApi21() {
|
|
}
|
|
|
|
@Override // androidx.transition.ViewUtilsBase
|
|
public void a(View view, Matrix matrix) {
|
|
a();
|
|
Method method = e;
|
|
if (method != null) {
|
|
try {
|
|
method.invoke(view, matrix);
|
|
} catch (IllegalAccessException unused) {
|
|
} catch (InvocationTargetException e2) {
|
|
throw new RuntimeException(e2.getCause());
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // androidx.transition.ViewUtilsBase
|
|
public void b(View view, Matrix matrix) {
|
|
b();
|
|
Method method = g;
|
|
if (method != null) {
|
|
try {
|
|
method.invoke(view, matrix);
|
|
} catch (IllegalAccessException unused) {
|
|
} catch (InvocationTargetException e2) {
|
|
throw new RuntimeException(e2.getCause());
|
|
}
|
|
}
|
|
}
|
|
|
|
private void a() {
|
|
if (f) {
|
|
return;
|
|
}
|
|
try {
|
|
e = View.class.getDeclaredMethod("transformMatrixToGlobal", Matrix.class);
|
|
e.setAccessible(true);
|
|
} catch (NoSuchMethodException e2) {
|
|
Log.i("ViewUtilsApi21", "Failed to retrieve transformMatrixToGlobal method", e2);
|
|
}
|
|
f = true;
|
|
}
|
|
|
|
private void b() {
|
|
if (h) {
|
|
return;
|
|
}
|
|
try {
|
|
g = View.class.getDeclaredMethod("transformMatrixToLocal", Matrix.class);
|
|
g.setAccessible(true);
|
|
} catch (NoSuchMethodException e2) {
|
|
Log.i("ViewUtilsApi21", "Failed to retrieve transformMatrixToLocal method", e2);
|
|
}
|
|
h = true;
|
|
}
|
|
}
|