mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-24 08:02:37 -06:00
93 lines
4.7 KiB
Java
93 lines
4.7 KiB
Java
package androidx.lifecycle;
|
|
|
|
import androidx.core.app.NotificationCompat;
|
|
import androidx.lifecycle.Lifecycle;
|
|
import io.sentry.protocol.TransactionInfo;
|
|
import kotlin.Metadata;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* compiled from: DefaultLifecycleObserverAdapter.kt */
|
|
@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\b\u0000\u0018\u00002\u00020\u0001B\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0001¢\u0006\u0002\u0010\u0005J\u0018\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000bH\u0016R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0004\u001a\u0004\u0018\u00010\u0001X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\f"}, d2 = {"Landroidx/lifecycle/DefaultLifecycleObserverAdapter;", "Landroidx/lifecycle/LifecycleEventObserver;", "defaultLifecycleObserver", "Landroidx/lifecycle/DefaultLifecycleObserver;", "lifecycleEventObserver", "(Landroidx/lifecycle/DefaultLifecycleObserver;Landroidx/lifecycle/LifecycleEventObserver;)V", "onStateChanged", "", TransactionInfo.JsonKeys.SOURCE, "Landroidx/lifecycle/LifecycleOwner;", NotificationCompat.CATEGORY_EVENT, "Landroidx/lifecycle/Lifecycle$Event;", "lifecycle-common"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes2.dex */
|
|
public final class DefaultLifecycleObserverAdapter implements LifecycleEventObserver {
|
|
private final DefaultLifecycleObserver defaultLifecycleObserver;
|
|
private final LifecycleEventObserver lifecycleEventObserver;
|
|
|
|
/* compiled from: DefaultLifecycleObserverAdapter.kt */
|
|
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes2.dex */
|
|
public /* synthetic */ class WhenMappings {
|
|
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
|
|
|
static {
|
|
int[] iArr = new int[Lifecycle.Event.values().length];
|
|
try {
|
|
iArr[Lifecycle.Event.ON_CREATE.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
iArr[Lifecycle.Event.ON_START.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
iArr[Lifecycle.Event.ON_RESUME.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
try {
|
|
iArr[Lifecycle.Event.ON_PAUSE.ordinal()] = 4;
|
|
} catch (NoSuchFieldError unused4) {
|
|
}
|
|
try {
|
|
iArr[Lifecycle.Event.ON_STOP.ordinal()] = 5;
|
|
} catch (NoSuchFieldError unused5) {
|
|
}
|
|
try {
|
|
iArr[Lifecycle.Event.ON_DESTROY.ordinal()] = 6;
|
|
} catch (NoSuchFieldError unused6) {
|
|
}
|
|
try {
|
|
iArr[Lifecycle.Event.ON_ANY.ordinal()] = 7;
|
|
} catch (NoSuchFieldError unused7) {
|
|
}
|
|
$EnumSwitchMapping$0 = iArr;
|
|
}
|
|
}
|
|
|
|
public DefaultLifecycleObserverAdapter(DefaultLifecycleObserver defaultLifecycleObserver, LifecycleEventObserver lifecycleEventObserver) {
|
|
Intrinsics.checkNotNullParameter(defaultLifecycleObserver, "defaultLifecycleObserver");
|
|
this.defaultLifecycleObserver = defaultLifecycleObserver;
|
|
this.lifecycleEventObserver = lifecycleEventObserver;
|
|
}
|
|
|
|
@Override // androidx.lifecycle.LifecycleEventObserver
|
|
public void onStateChanged(LifecycleOwner source, Lifecycle.Event event) {
|
|
Intrinsics.checkNotNullParameter(source, "source");
|
|
Intrinsics.checkNotNullParameter(event, "event");
|
|
switch (WhenMappings.$EnumSwitchMapping$0[event.ordinal()]) {
|
|
case 1:
|
|
this.defaultLifecycleObserver.onCreate(source);
|
|
break;
|
|
case 2:
|
|
this.defaultLifecycleObserver.onStart(source);
|
|
break;
|
|
case 3:
|
|
this.defaultLifecycleObserver.onResume(source);
|
|
break;
|
|
case 4:
|
|
this.defaultLifecycleObserver.onPause(source);
|
|
break;
|
|
case 5:
|
|
this.defaultLifecycleObserver.onStop(source);
|
|
break;
|
|
case 6:
|
|
this.defaultLifecycleObserver.onDestroy(source);
|
|
break;
|
|
case 7:
|
|
throw new IllegalArgumentException("ON_ANY must not been send by anybody");
|
|
}
|
|
LifecycleEventObserver lifecycleEventObserver = this.lifecycleEventObserver;
|
|
if (lifecycleEventObserver != null) {
|
|
lifecycleEventObserver.onStateChanged(source, event);
|
|
}
|
|
}
|
|
}
|