what-the-bank/sources/o/VTt.java

49 lines
1.6 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.Context;
import android.view.OrientationEventListener;
import android.view.WindowManager;
/* loaded from: classes3.dex */
public final class VTt {
public WindowManager a;
public Yqe c;
int d;
public OrientationEventListener e;
public final void a(Context context, Yqe yqe) {
OrientationEventListener orientationEventListener = this.e;
if (orientationEventListener != null) {
orientationEventListener.disable();
}
this.e = null;
this.a = null;
this.c = null;
Context applicationContext = context.getApplicationContext();
this.c = yqe;
this.a = (WindowManager) applicationContext.getSystemService("window");
OrientationEventListener orientationEventListener2 = new OrientationEventListener(this, applicationContext) { // from class: o.VTt.5
private VTt a;
{
this.a = this;
}
@Override // android.view.OrientationEventListener
public final void onOrientationChanged(int i) {
int rotation;
WindowManager windowManager = this.a.a;
Yqe yqe2 = this.a.c;
if (this.a.a == null || yqe2 == null || (rotation = windowManager.getDefaultDisplay().getRotation()) == this.a.d) {
return;
}
this.a.d = rotation;
yqe2.a();
}
};
this.e = orientationEventListener2;
orientationEventListener2.enable();
this.d = this.a.getDefaultDisplay().getRotation();
}
}