- 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
61 lines
2.4 KiB
Java
61 lines
2.4 KiB
Java
package com.google.firebase.sessions;
|
|
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.content.ServiceConnection;
|
|
import android.os.Messenger;
|
|
import android.os.Process;
|
|
import android.util.Log;
|
|
import com.google.firebase.FirebaseApp;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class SessionLifecycleServiceBinderImpl implements SessionLifecycleServiceBinder {
|
|
public static final Companion Companion = new Companion(null);
|
|
public final FirebaseApp firebaseApp;
|
|
|
|
public SessionLifecycleServiceBinderImpl(FirebaseApp firebaseApp) {
|
|
Intrinsics.checkNotNullParameter(firebaseApp, "firebaseApp");
|
|
this.firebaseApp = firebaseApp;
|
|
}
|
|
|
|
@Override // com.google.firebase.sessions.SessionLifecycleServiceBinder
|
|
public void bindToService(Messenger callback, ServiceConnection serviceConnection) {
|
|
Intrinsics.checkNotNullParameter(callback, "callback");
|
|
Intrinsics.checkNotNullParameter(serviceConnection, "serviceConnection");
|
|
Context appContext = this.firebaseApp.getApplicationContext().getApplicationContext();
|
|
Intent intent = new Intent(appContext, (Class<?>) SessionLifecycleService.class);
|
|
intent.setAction(String.valueOf(Process.myPid()));
|
|
intent.putExtra("ClientCallbackMessenger", callback);
|
|
try {
|
|
if (appContext.bindService(intent, serviceConnection, 65)) {
|
|
return;
|
|
}
|
|
} catch (SecurityException e) {
|
|
Log.w("LifecycleServiceBinder", "Failed to bind session lifecycle service to application.", e);
|
|
}
|
|
Intrinsics.checkNotNullExpressionValue(appContext, "appContext");
|
|
unbindServiceSafely(appContext, serviceConnection);
|
|
}
|
|
|
|
public final Object unbindServiceSafely(Context context, ServiceConnection serviceConnection) {
|
|
try {
|
|
context.unbindService(serviceConnection);
|
|
return Unit.INSTANCE;
|
|
} catch (IllegalArgumentException e) {
|
|
return Integer.valueOf(Log.w("LifecycleServiceBinder", "Session lifecycle service binding failed.", e));
|
|
}
|
|
}
|
|
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
public Companion() {
|
|
}
|
|
}
|
|
}
|