- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
93 lines
2.9 KiB
Java
93 lines
2.9 KiB
Java
package com.applovin.impl;
|
|
|
|
import android.app.Activity;
|
|
import android.content.Context;
|
|
import android.content.ContextWrapper;
|
|
import android.content.Intent;
|
|
import android.os.Bundle;
|
|
import android.view.View;
|
|
import android.view.WindowInsets;
|
|
import android.view.WindowInsetsController;
|
|
import com.google.android.gms.drive.DriveFile;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class r {
|
|
|
|
public interface b {
|
|
void a(Activity activity);
|
|
}
|
|
|
|
public class a extends p {
|
|
final /* synthetic */ Class a;
|
|
final /* synthetic */ b b;
|
|
final /* synthetic */ q c;
|
|
|
|
public a(Class cls, b bVar, q qVar) {
|
|
this.a = cls;
|
|
this.b = bVar;
|
|
this.c = qVar;
|
|
}
|
|
|
|
@Override // com.applovin.impl.p, android.app.Application.ActivityLifecycleCallbacks
|
|
public void onActivityCreated(Activity activity, Bundle bundle) {
|
|
if (this.a.isInstance(activity)) {
|
|
this.b.a(activity);
|
|
}
|
|
}
|
|
|
|
@Override // com.applovin.impl.p, android.app.Application.ActivityLifecycleCallbacks
|
|
public void onActivityDestroyed(Activity activity) {
|
|
if (!this.a.isInstance(activity) || activity.isChangingConfigurations()) {
|
|
return;
|
|
}
|
|
this.c.b(this);
|
|
}
|
|
}
|
|
|
|
public static Activity a(View view) {
|
|
if (view == null) {
|
|
return null;
|
|
}
|
|
for (Context context = view.getContext(); context instanceof ContextWrapper; context = ((ContextWrapper) context).getBaseContext()) {
|
|
if (context instanceof Activity) {
|
|
return (Activity) context;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public static void a(boolean z, Activity activity) {
|
|
WindowInsetsController insetsController;
|
|
int systemBars;
|
|
if (z && z3.b()) {
|
|
insetsController = activity.getWindow().getInsetsController();
|
|
if (insetsController != null) {
|
|
insetsController.setSystemBarsBehavior(2);
|
|
systemBars = WindowInsets.Type.systemBars();
|
|
insetsController.hide(systemBars);
|
|
return;
|
|
}
|
|
activity.getWindow().getDecorView().setSystemUiVisibility(5894);
|
|
return;
|
|
}
|
|
activity.getWindow().getDecorView().setSystemUiVisibility(5894);
|
|
}
|
|
|
|
public static boolean a(Activity activity) {
|
|
return activity == null || activity.isFinishing() || activity.isChangingConfigurations() || (z3.d() && activity.isDestroyed());
|
|
}
|
|
|
|
public static void a(Context context, Class cls) {
|
|
Intent intent = new Intent(context, (Class<?>) cls);
|
|
if (!(context instanceof Activity)) {
|
|
intent.setFlags(DriveFile.MODE_READ_ONLY);
|
|
}
|
|
context.startActivity(intent);
|
|
}
|
|
|
|
public static void a(Context context, Class cls, q qVar, b bVar) {
|
|
qVar.a(new a(cls, bVar, qVar));
|
|
a(context, cls);
|
|
}
|
|
}
|