discord-jadx/app/src/main/java/androidx/browser/customtabs/CustomTabsServiceConnection...

44 lines
1.7 KiB
Java

package androidx.browser.customtabs;
import android.content.ComponentName;
import android.content.Context;
import android.content.ServiceConnection;
import android.os.IBinder;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import x.a.a.b;
public abstract class CustomTabsServiceConnection implements ServiceConnection {
@Nullable
private Context mApplicationContext;
/* renamed from: androidx.browser.customtabs.CustomTabsServiceConnection$1 reason: invalid class name */
public class AnonymousClass1 extends CustomTabsClient {
public AnonymousClass1(b bVar, ComponentName componentName, Context context) {
super(bVar, componentName, context);
}
}
@Nullable
@RestrictTo({RestrictTo.Scope.LIBRARY})
public Context getApplicationContext() {
return this.mApplicationContext;
}
public abstract void onCustomTabsServiceConnected(@NonNull ComponentName componentName, @NonNull CustomTabsClient customTabsClient);
@Override // android.content.ServiceConnection
public final void onServiceConnected(@NonNull ComponentName componentName, @NonNull IBinder iBinder) {
if (this.mApplicationContext != null) {
onCustomTabsServiceConnected(componentName, new AnonymousClass1(b.a.asInterface(iBinder), componentName, this.mApplicationContext));
return;
}
throw new IllegalStateException("Custom Tabs Service connected before an applicationcontext has been provided.");
}
@RestrictTo({RestrictTo.Scope.LIBRARY})
public void setApplicationContext(@NonNull Context context) {
this.mApplicationContext = context;
}
}