49 lines
1.9 KiB
Java
49 lines
1.9 KiB
Java
|
package c.a.h;
|
||
|
|
||
|
import android.content.ComponentName;
|
||
|
import android.net.Uri;
|
||
|
import android.os.Bundle;
|
||
|
import androidx.browser.customtabs.CustomTabsCallback;
|
||
|
import androidx.browser.customtabs.CustomTabsClient;
|
||
|
import androidx.browser.customtabs.CustomTabsServiceConnection;
|
||
|
import androidx.browser.customtabs.CustomTabsSession;
|
||
|
import d0.t.o;
|
||
|
import d0.t.u;
|
||
|
import d0.z.d.m;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
/* compiled from: CustomTabsService.kt */
|
||
|
public final class b extends CustomTabsServiceConnection {
|
||
|
public final List<Uri> i;
|
||
|
|
||
|
/* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: java.util.List<? extends android.net.Uri> */
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
public b(List<? extends Uri> list) {
|
||
|
m.checkNotNullParameter(list, "uris");
|
||
|
this.i = list;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.browser.customtabs.CustomTabsServiceConnection
|
||
|
public void onCustomTabsServiceConnected(ComponentName componentName, CustomTabsClient customTabsClient) {
|
||
|
m.checkNotNullParameter(componentName, "name");
|
||
|
m.checkNotNullParameter(customTabsClient, "client");
|
||
|
customTabsClient.warmup(0);
|
||
|
CustomTabsSession newSession = customTabsClient.newSession(new CustomTabsCallback());
|
||
|
if (newSession != null) {
|
||
|
Uri uri = (Uri) u.first((List<? extends Object>) this.i);
|
||
|
List<Uri> drop = u.drop(this.i, 1);
|
||
|
ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(drop, 10));
|
||
|
for (Uri uri2 : drop) {
|
||
|
Bundle bundle = new Bundle();
|
||
|
bundle.putParcelable("android.support.customtabs.otherurls.URL", uri2);
|
||
|
arrayList.add(bundle);
|
||
|
}
|
||
|
newSession.mayLaunchUrl(uri, Bundle.EMPTY, arrayList);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.content.ServiceConnection
|
||
|
public void onServiceDisconnected(ComponentName componentName) {
|
||
|
}
|
||
|
}
|