jimu-decompiled/sources/androidx/browser/customtabs/CustomTabsIntent.java
2025-05-13 19:24:51 +02:00

70 lines
2.1 KiB
Java

package androidx.browser.customtabs;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import androidx.core.app.BundleCompat;
import androidx.core.content.ContextCompat;
import java.util.ArrayList;
/* loaded from: classes.dex */
public final class CustomTabsIntent {
public final Intent a;
public final Bundle b;
public static final class Builder {
private final Intent a;
private ArrayList<Bundle> b;
private Bundle c;
private ArrayList<Bundle> d;
private boolean e;
public Builder() {
this(null);
}
public CustomTabsIntent a() {
ArrayList<Bundle> arrayList = this.b;
if (arrayList != null) {
this.a.putParcelableArrayListExtra("android.support.customtabs.extra.MENU_ITEMS", arrayList);
}
ArrayList<Bundle> arrayList2 = this.d;
if (arrayList2 != null) {
this.a.putParcelableArrayListExtra("android.support.customtabs.extra.TOOLBAR_ITEMS", arrayList2);
}
this.a.putExtra("android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS", this.e);
return new CustomTabsIntent(this.a, this.c);
}
public Builder(CustomTabsSession customTabsSession) {
this.a = new Intent("android.intent.action.VIEW");
this.b = null;
this.c = null;
this.d = null;
this.e = true;
if (customTabsSession != null) {
customTabsSession.b();
throw null;
}
Bundle bundle = new Bundle();
if (customTabsSession != null) {
customTabsSession.a();
throw null;
}
BundleCompat.a(bundle, "android.support.customtabs.extra.SESSION", null);
this.a.putExtras(bundle);
}
}
CustomTabsIntent(Intent intent, Bundle bundle) {
this.a = intent;
this.b = bundle;
}
public void a(Context context, Uri uri) {
this.a.setData(uri);
ContextCompat.a(context, this.a, this.b);
}
}