- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
155 lines
5.7 KiB
Java
155 lines
5.7 KiB
Java
package com.mbridge.msdk.activity;
|
|
|
|
import android.app.Activity;
|
|
import android.os.Build;
|
|
import android.os.Bundle;
|
|
import android.view.Display;
|
|
import android.view.OrientationEventListener;
|
|
import android.view.WindowManager;
|
|
import androidx.core.view.InputDeviceCompat;
|
|
import androidx.core.view.accessibility.AccessibilityEventCompat;
|
|
import com.mbridge.msdk.foundation.d.b;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public abstract class MBBaseActivity extends Activity {
|
|
private Display a;
|
|
private OrientationEventListener b;
|
|
private int c = -1;
|
|
|
|
public abstract void setTopControllerPadding(int i, int i2, int i3, int i4, int i5);
|
|
|
|
public void getNotchParams() {
|
|
getWindow().getDecorView().postDelayed(new Runnable() { // from class: com.mbridge.msdk.activity.MBBaseActivity.1
|
|
/* JADX WARN: Code restructure failed: missing block: B:7:0x001a, code lost:
|
|
|
|
r1 = r2.getDisplayCutout();
|
|
*/
|
|
@Override // java.lang.Runnable
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final void run() {
|
|
/*
|
|
Method dump skipped, instructions count: 232
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.activity.MBBaseActivity.AnonymousClass1.run():void");
|
|
}
|
|
}, 500L);
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
public void onCreate(Bundle bundle) {
|
|
super.onCreate(bundle);
|
|
try {
|
|
requestWindowFeature(1);
|
|
getWindow().setFlags(1024, 1024);
|
|
getWindow().addFlags(512);
|
|
a();
|
|
b();
|
|
if (Build.VERSION.SDK_INT >= 28) {
|
|
WindowManager.LayoutParams attributes = getWindow().getAttributes();
|
|
attributes.layoutInDisplayCutoutMode = 1;
|
|
getWindow().setAttributes(attributes);
|
|
}
|
|
} catch (Exception e) {
|
|
af.b("MBBaseActivity", e.getMessage());
|
|
}
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
public void onResume() {
|
|
super.onResume();
|
|
if (b.c) {
|
|
return;
|
|
}
|
|
getNotchParams();
|
|
a();
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
public void onDestroy() {
|
|
super.onDestroy();
|
|
OrientationEventListener orientationEventListener = this.b;
|
|
if (orientationEventListener != null) {
|
|
orientationEventListener.disable();
|
|
this.b = null;
|
|
}
|
|
}
|
|
|
|
@Override // android.app.Activity, android.view.Window.Callback
|
|
public void onWindowFocusChanged(boolean z) {
|
|
super.onWindowFocusChanged(z);
|
|
a();
|
|
}
|
|
|
|
private void a() {
|
|
try {
|
|
getWindow().addFlags(AccessibilityEventCompat.TYPE_VIEW_TARGETED_BY_SCROLL);
|
|
getWindow().getDecorView().setSystemUiVisibility(InputDeviceCompat.SOURCE_TOUCHSCREEN);
|
|
} catch (Throwable th) {
|
|
af.b("MBBaseActivity", th.getMessage());
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public int b() {
|
|
Display display;
|
|
if (this.a == null) {
|
|
if (Build.VERSION.SDK_INT >= 30) {
|
|
display = getDisplay();
|
|
this.a = display;
|
|
} else {
|
|
this.a = ((WindowManager) getSystemService("window")).getDefaultDisplay();
|
|
}
|
|
}
|
|
Display display2 = this.a;
|
|
if (display2 != null) {
|
|
return display2.getRotation();
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
public static /* synthetic */ void e(MBBaseActivity mBBaseActivity) {
|
|
OrientationEventListener orientationEventListener = new OrientationEventListener(mBBaseActivity, 1) { // from class: com.mbridge.msdk.activity.MBBaseActivity.2
|
|
@Override // android.view.OrientationEventListener
|
|
public final void onOrientationChanged(int i) {
|
|
int rotation = MBBaseActivity.this.a != null ? MBBaseActivity.this.a.getRotation() : 0;
|
|
if (rotation != 1 || MBBaseActivity.this.c == 1) {
|
|
if (rotation != 3 || MBBaseActivity.this.c == 2) {
|
|
if (rotation != 0 || MBBaseActivity.this.c == 3) {
|
|
if (rotation != 2 || MBBaseActivity.this.c == 4) {
|
|
return;
|
|
}
|
|
MBBaseActivity.this.c = 4;
|
|
MBBaseActivity.this.getNotchParams();
|
|
af.b("MBBaseActivity", "Orientation Bottom");
|
|
return;
|
|
}
|
|
MBBaseActivity.this.c = 3;
|
|
MBBaseActivity.this.getNotchParams();
|
|
af.b("MBBaseActivity", "Orientation Top");
|
|
return;
|
|
}
|
|
MBBaseActivity.this.c = 2;
|
|
MBBaseActivity.this.getNotchParams();
|
|
af.b("MBBaseActivity", "Orientation Right");
|
|
return;
|
|
}
|
|
MBBaseActivity.this.c = 1;
|
|
MBBaseActivity.this.getNotchParams();
|
|
af.b("MBBaseActivity", "Orientation Left");
|
|
}
|
|
};
|
|
mBBaseActivity.b = orientationEventListener;
|
|
if (orientationEventListener.canDetectOrientation()) {
|
|
mBBaseActivity.b.enable();
|
|
} else {
|
|
mBBaseActivity.b.disable();
|
|
mBBaseActivity.b = null;
|
|
}
|
|
}
|
|
}
|