Initial commit
This commit is contained in:
29
sources/androidx/browser/R$dimen.java
Normal file
29
sources/androidx/browser/R$dimen.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package androidx.browser;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class R$dimen {
|
||||
public static final int browser_actions_context_menu_max_width = 2131165318;
|
||||
public static final int browser_actions_context_menu_min_padding = 2131165319;
|
||||
public static final int compat_button_inset_horizontal_material = 2131165503;
|
||||
public static final int compat_button_inset_vertical_material = 2131165504;
|
||||
public static final int compat_button_padding_horizontal_material = 2131165505;
|
||||
public static final int compat_button_padding_vertical_material = 2131165506;
|
||||
public static final int compat_control_corner_material = 2131165507;
|
||||
public static final int compat_notification_large_icon_max_height = 2131165508;
|
||||
public static final int compat_notification_large_icon_max_width = 2131165509;
|
||||
public static final int notification_action_icon_size = 2131172010;
|
||||
public static final int notification_action_text_size = 2131172011;
|
||||
public static final int notification_big_circle_margin = 2131172012;
|
||||
public static final int notification_content_margin_start = 2131172013;
|
||||
public static final int notification_large_icon_height = 2131172014;
|
||||
public static final int notification_large_icon_width = 2131172015;
|
||||
public static final int notification_main_column_padding_top = 2131172016;
|
||||
public static final int notification_media_narrow_margin = 2131172017;
|
||||
public static final int notification_right_icon_size = 2131172018;
|
||||
public static final int notification_right_side_padding_top = 2131172019;
|
||||
public static final int notification_small_icon_background_padding = 2131172020;
|
||||
public static final int notification_small_icon_size_as_large = 2131172021;
|
||||
public static final int notification_subtext_size = 2131172022;
|
||||
public static final int notification_top_pad = 2131172023;
|
||||
public static final int notification_top_pad_large_text = 2131172024;
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
package androidx.browser.browseractions;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import androidx.browser.R$dimen;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class BrowserActionsFallbackMenuView extends LinearLayout {
|
||||
private final int a;
|
||||
private final int b;
|
||||
|
||||
public BrowserActionsFallbackMenuView(Context context, AttributeSet attributeSet) {
|
||||
super(context, attributeSet);
|
||||
this.a = getResources().getDimensionPixelOffset(R$dimen.browser_actions_context_menu_min_padding);
|
||||
this.b = getResources().getDimensionPixelOffset(R$dimen.browser_actions_context_menu_max_width);
|
||||
}
|
||||
|
||||
@Override // android.widget.LinearLayout, android.view.View
|
||||
protected void onMeasure(int i, int i2) {
|
||||
super.onMeasure(View.MeasureSpec.makeMeasureSpec(Math.min(getResources().getDisplayMetrics().widthPixels - (this.a * 2), this.b), 1073741824), i2);
|
||||
}
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
package androidx.browser.customtabs;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class CustomTabsCallback {
|
||||
}
|
69
sources/androidx/browser/customtabs/CustomTabsIntent.java
Normal file
69
sources/androidx/browser/customtabs/CustomTabsIntent.java
Normal file
@@ -0,0 +1,69 @@
|
||||
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);
|
||||
}
|
||||
}
|
109
sources/androidx/browser/customtabs/CustomTabsService.java
Normal file
109
sources/androidx/browser/customtabs/CustomTabsService.java
Normal file
@@ -0,0 +1,109 @@
|
||||
package androidx.browser.customtabs;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.support.customtabs.ICustomTabsCallback;
|
||||
import android.support.customtabs.ICustomTabsService;
|
||||
import androidx.collection.ArrayMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class CustomTabsService extends Service {
|
||||
final Map<IBinder, IBinder.DeathRecipient> a = new ArrayMap();
|
||||
private ICustomTabsService.Stub b = new ICustomTabsService.Stub() { // from class: androidx.browser.customtabs.CustomTabsService.1
|
||||
@Override // android.support.customtabs.ICustomTabsService
|
||||
public boolean a(long j) {
|
||||
return CustomTabsService.this.a(j);
|
||||
}
|
||||
|
||||
@Override // android.support.customtabs.ICustomTabsService
|
||||
public Bundle b(String str, Bundle bundle) {
|
||||
return CustomTabsService.this.a(str, bundle);
|
||||
}
|
||||
|
||||
@Override // android.support.customtabs.ICustomTabsService
|
||||
public boolean a(ICustomTabsCallback iCustomTabsCallback) {
|
||||
final CustomTabsSessionToken customTabsSessionToken = new CustomTabsSessionToken(iCustomTabsCallback);
|
||||
try {
|
||||
IBinder.DeathRecipient deathRecipient = new IBinder.DeathRecipient() { // from class: androidx.browser.customtabs.CustomTabsService.1.1
|
||||
@Override // android.os.IBinder.DeathRecipient
|
||||
public void binderDied() {
|
||||
CustomTabsService.this.a(customTabsSessionToken);
|
||||
}
|
||||
};
|
||||
synchronized (CustomTabsService.this.a) {
|
||||
iCustomTabsCallback.asBinder().linkToDeath(deathRecipient, 0);
|
||||
CustomTabsService.this.a.put(iCustomTabsCallback.asBinder(), deathRecipient);
|
||||
}
|
||||
return CustomTabsService.this.b(customTabsSessionToken);
|
||||
} catch (RemoteException unused) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.support.customtabs.ICustomTabsService
|
||||
public boolean b(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) {
|
||||
return CustomTabsService.this.a(new CustomTabsSessionToken(iCustomTabsCallback), bundle);
|
||||
}
|
||||
|
||||
@Override // android.support.customtabs.ICustomTabsService
|
||||
public int b(ICustomTabsCallback iCustomTabsCallback, String str, Bundle bundle) {
|
||||
return CustomTabsService.this.a(new CustomTabsSessionToken(iCustomTabsCallback), str, bundle);
|
||||
}
|
||||
|
||||
@Override // android.support.customtabs.ICustomTabsService
|
||||
public boolean a(ICustomTabsCallback iCustomTabsCallback, Uri uri, Bundle bundle, List<Bundle> list) {
|
||||
return CustomTabsService.this.a(new CustomTabsSessionToken(iCustomTabsCallback), uri, bundle, list);
|
||||
}
|
||||
|
||||
@Override // android.support.customtabs.ICustomTabsService
|
||||
public boolean a(ICustomTabsCallback iCustomTabsCallback, Uri uri) {
|
||||
return CustomTabsService.this.a(new CustomTabsSessionToken(iCustomTabsCallback), uri);
|
||||
}
|
||||
|
||||
@Override // android.support.customtabs.ICustomTabsService
|
||||
public boolean a(ICustomTabsCallback iCustomTabsCallback, int i, Uri uri, Bundle bundle) {
|
||||
return CustomTabsService.this.a(new CustomTabsSessionToken(iCustomTabsCallback), i, uri, bundle);
|
||||
}
|
||||
};
|
||||
|
||||
protected abstract int a(CustomTabsSessionToken customTabsSessionToken, String str, Bundle bundle);
|
||||
|
||||
protected abstract Bundle a(String str, Bundle bundle);
|
||||
|
||||
protected abstract boolean a(long j);
|
||||
|
||||
protected boolean a(CustomTabsSessionToken customTabsSessionToken) {
|
||||
try {
|
||||
synchronized (this.a) {
|
||||
IBinder a = customTabsSessionToken.a();
|
||||
a.unlinkToDeath(this.a.get(a), 0);
|
||||
this.a.remove(a);
|
||||
}
|
||||
return true;
|
||||
} catch (NoSuchElementException unused) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract boolean a(CustomTabsSessionToken customTabsSessionToken, int i, Uri uri, Bundle bundle);
|
||||
|
||||
protected abstract boolean a(CustomTabsSessionToken customTabsSessionToken, Uri uri);
|
||||
|
||||
protected abstract boolean a(CustomTabsSessionToken customTabsSessionToken, Uri uri, Bundle bundle, List<Bundle> list);
|
||||
|
||||
protected abstract boolean a(CustomTabsSessionToken customTabsSessionToken, Bundle bundle);
|
||||
|
||||
protected abstract boolean b(CustomTabsSessionToken customTabsSessionToken);
|
||||
|
||||
@Override // android.app.Service
|
||||
public IBinder onBind(Intent intent) {
|
||||
return this.b;
|
||||
}
|
||||
}
|
15
sources/androidx/browser/customtabs/CustomTabsSession.java
Normal file
15
sources/androidx/browser/customtabs/CustomTabsSession.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package androidx.browser.customtabs;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.os.IBinder;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class CustomTabsSession {
|
||||
IBinder a() {
|
||||
throw null;
|
||||
}
|
||||
|
||||
ComponentName b() {
|
||||
throw null;
|
||||
}
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
package androidx.browser.customtabs;
|
||||
|
||||
import android.os.IBinder;
|
||||
import android.support.customtabs.ICustomTabsCallback;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class CustomTabsSessionToken {
|
||||
final ICustomTabsCallback a;
|
||||
|
||||
CustomTabsSessionToken(ICustomTabsCallback iCustomTabsCallback) {
|
||||
this.a = iCustomTabsCallback;
|
||||
new CustomTabsCallback(this) { // from class: androidx.browser.customtabs.CustomTabsSessionToken.1
|
||||
};
|
||||
}
|
||||
|
||||
IBinder a() {
|
||||
return this.a.asBinder();
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof CustomTabsSessionToken) {
|
||||
return ((CustomTabsSessionToken) obj).a().equals(this.a.asBinder());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return a().hashCode();
|
||||
}
|
||||
}
|
29
sources/androidx/browser/customtabs/PostMessageService.java
Normal file
29
sources/androidx/browser/customtabs/PostMessageService.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package androidx.browser.customtabs;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.support.customtabs.ICustomTabsCallback;
|
||||
import android.support.customtabs.IPostMessageService;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class PostMessageService extends Service {
|
||||
private IPostMessageService.Stub a = new IPostMessageService.Stub(this) { // from class: androidx.browser.customtabs.PostMessageService.1
|
||||
@Override // android.support.customtabs.IPostMessageService
|
||||
public void a(ICustomTabsCallback iCustomTabsCallback, Bundle bundle) throws RemoteException {
|
||||
iCustomTabsCallback.b(bundle);
|
||||
}
|
||||
|
||||
@Override // android.support.customtabs.IPostMessageService
|
||||
public void a(ICustomTabsCallback iCustomTabsCallback, String str, Bundle bundle) throws RemoteException {
|
||||
iCustomTabsCallback.a(str, bundle);
|
||||
}
|
||||
};
|
||||
|
||||
@Override // android.app.Service
|
||||
public IBinder onBind(Intent intent) {
|
||||
return this.a;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user