mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-12-06 12:29:32 +01:00
27 lines
1.4 KiB
Java
27 lines
1.4 KiB
Java
package com.amazon.tarazed.session;
|
|
|
|
import android.app.ActivityManager;
|
|
import kotlin.Metadata;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0003\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0011\u0010\u0003\u001a\u00020\u00048F¢\u0006\u0006\u001a\u0004\b\u0003\u0010\u0005R\u0011\u0010\u0006\u001a\u00020\u00048F¢\u0006\u0006\u001a\u0004\b\u0006\u0010\u0005¨\u0006\u0007"}, d2 = {"Lcom/amazon/tarazed/session/AppBackgroundChecker;", "", "()V", "isAppInBackground", "", "()Z", "isAppInForeground", "TarazedAndroidLibrary_release"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
|
/* loaded from: classes19.dex */
|
|
public final class AppBackgroundChecker {
|
|
|
|
@NotNull
|
|
public static final AppBackgroundChecker INSTANCE = new AppBackgroundChecker();
|
|
|
|
private AppBackgroundChecker() {
|
|
}
|
|
|
|
public final boolean isAppInBackground() {
|
|
return !isAppInForeground();
|
|
}
|
|
|
|
public final boolean isAppInForeground() {
|
|
ActivityManager.RunningAppProcessInfo runningAppProcessInfo = new ActivityManager.RunningAppProcessInfo();
|
|
ActivityManager.getMyMemoryState(runningAppProcessInfo);
|
|
return runningAppProcessInfo.importance <= 100;
|
|
}
|
|
}
|