discord-jadx/app/src/main/java/c/a/h/b.java

49 lines
1.9 KiB
Java
Raw Normal View History

2021-07-24 02:37:17 +00:00
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) {
}
}