Compare commits
42 commits
Author | SHA1 | Date | |
---|---|---|---|
f18112d208 | |||
d11162a788 | |||
97eb236c01 | |||
79699dcb33 | |||
1f034b9c71 | |||
5146930b5b | |||
74ac69b1f0 | |||
8b5c21b0cb | |||
c506c337b7 | |||
337cf309d4 | |||
fa4851527c | |||
115c50ac46 | |||
0ef8130585 | |||
604fcecab4 | |||
b54c22d8f6 | |||
928b7daecd | |||
39fb11356f | |||
41aca4f815 | |||
45d2c9aed5 | |||
077f7365a3 | |||
e6a57fbcdb | |||
be2d4ee48b | |||
b2b52d0308 | |||
b8eb9e7d19 | |||
87b3740ea0 | |||
eccfaed4ce | |||
61b6fc9c8e | |||
ec28658ea6 | |||
f576fb7f4f | |||
6060696778 | |||
82d9a52aae | |||
4b40101451 | |||
fc3878113a | |||
9810645689 | |||
ea5b0ba468 | |||
2e603407fa | |||
d146377de6 | |||
07d37c759e | |||
4ebeb8b7d5 | |||
0f830f2e49 | |||
11d2314856 | |||
c58955c4b0 |
|
@ -9,9 +9,9 @@ android {
|
|||
defaultConfig {
|
||||
applicationId 'com.discord'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 80108
|
||||
versionName "80.8 - Beta"
|
||||
targetSdkVersion 30
|
||||
versionCode 112009
|
||||
versionName "112.9 - Stable"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="80108" android:versionName="80.8 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="112009" android:versionName="112.9 - Stable" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30"/>
|
||||
<uses-feature android:name="android.hardware.camera" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.faketouch" android:required="false"/>
|
||||
|
@ -25,22 +25,49 @@
|
|||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
||||
<permission android:label="@string/app_permission_connect_label" android:name="com.discord.permission.CONNECT" android:protectionLevel="dangerous" android:description="@string/app_permission_connect_desc"/>
|
||||
<uses-feature android:name="android.hardware.camera.any" android:required="false"/>
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.CHOOSER"/>
|
||||
</intent>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
<data android:scheme="http"/>
|
||||
</intent>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
<data android:scheme="https"/>
|
||||
</intent>
|
||||
<intent>
|
||||
<action android:name="android.media.action.IMAGE_CAPTURE"/>
|
||||
</intent>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.PICK"/>
|
||||
<data android:mimeType="image/*"/>
|
||||
</intent>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.GET_CONTENT"/>
|
||||
<data android:mimeType="image/*"/>
|
||||
</intent>
|
||||
<package android:name="com.spotify.music"/>
|
||||
<package android:name="com.samsung.android.game.gametools"/>
|
||||
<package android:name="com.samsung.android.game.gamehome"/>
|
||||
<package android:name="com.authy.authy"/>
|
||||
<package android:name="com.google.android.apps.authenticator2"/>
|
||||
<intent>
|
||||
<action android:name="android.support.customtabs.action.CustomTabsService"/>
|
||||
</intent>
|
||||
</queries>
|
||||
<uses-feature android:name="android.hardware.camera.any" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.camera.front" android:required="false"/>
|
||||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
|
||||
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<application android:theme="@style/res_2131951648_apptheme_dark" android:label="@string/discord" android:icon="@mipmap/ic_logo_square_beta" android:name="com.discord.app.App" android:allowBackup="false" android:largeHeap="true" android:supportsRtl="true" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_logo_round_beta" android:appCategory="social" android:appComponentFactory="androidx.core.app.CoreComponentFactory">
|
||||
<activity android:theme="@style/res_2131951672_apptheme_translucent" android:name="com.discord.samsung.SamsungConnectActivity"/>
|
||||
<activity android:theme="@style/res_2131951648_apptheme_dark" android:name="com.discord.app.AppActivity" android:screenOrientation="fullUser" android:windowSoftInputMode="stateHidden|adjustResize"/>
|
||||
<activity android:theme="@style/res_2131951662_apptheme_loading" android:name="com.discord.app.AppActivity$Main" android:exported="true" android:launchMode="singleTask" android:screenOrientation="fullUser" android:windowSoftInputMode="stateHidden|adjustResize">
|
||||
<application android:theme="@style/AppTheme_Dark" android:label="@string/discord" android:icon="@mipmap/ic_logo_square" android:name="com.discord.app.App" android:allowBackup="false" android:largeHeap="true" android:supportsRtl="true" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_logo_round" android:appCategory="social" android:appComponentFactory="androidx.core.app.CoreComponentFactory">
|
||||
<activity android:theme="@style/AppTheme_Translucent" android:name="com.discord.samsung.SamsungConnectActivity"/>
|
||||
<activity android:theme="@style/AppTheme_Dark" android:name="com.discord.app.AppActivity" android:screenOrientation="fullUser" android:windowSoftInputMode="stateHidden|adjustResize"/>
|
||||
<activity android:theme="@style/AppTheme_Loading" android:name="com.discord.app.AppActivity$Main" android:exported="true" android:launchMode="singleTask" android:screenOrientation="fullUser" android:windowSoftInputMode="stateHidden|adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
|
@ -55,13 +82,10 @@
|
|||
<data android:scheme="https" android:host="discord.com" android:pathPattern="/gifts/.*"/>
|
||||
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/invite/.*"/>
|
||||
<data android:scheme="https" android:host="discord.com" android:pathPattern="/invite/.*"/>
|
||||
<data android:scheme="http" android:host="discord.com" android:pathPattern="/invite/.*"/>
|
||||
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/template/.*"/>
|
||||
<data android:scheme="https" android:host="discord.com" android:pathPattern="/template/.*"/>
|
||||
<data android:scheme="http" android:host="discord.com" android:pathPattern="/template/.*"/>
|
||||
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/channels/.*"/>
|
||||
<data android:scheme="https" android:host="discord.com" android:pathPattern="/channels/.*"/>
|
||||
<data android:scheme="http" android:host="discord.com" android:pathPattern="/channels/.*"/>
|
||||
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/users/.*"/>
|
||||
<data android:scheme="https" android:host="discord.com" android:pathPattern="/users/.*"/>
|
||||
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/feature/.*"/>
|
||||
|
@ -70,39 +94,40 @@
|
|||
<data android:scheme="https" android:host="discord.com" android:pathPattern="/discovery"/>
|
||||
<data android:scheme="https" android:host="discord.com" android:pathPattern="/query/.*"/>
|
||||
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/query/.*"/>
|
||||
<data android:scheme="http" android:host="discord.com" android:pathPattern="/ra/.*"/>
|
||||
<data android:scheme="https" android:host="discord.com" android:pathPattern="/ra/.*"/>
|
||||
<data android:scheme="https" android:host="*.discord.com" android:pathPattern="/events/.*"/>
|
||||
<data android:scheme="https" android:host="discord.com" android:pathPattern="/events/.*"/>
|
||||
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/app"/>
|
||||
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/app"/>
|
||||
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/gifts/.*"/>
|
||||
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/gifts/.*"/>
|
||||
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/invite/.*"/>
|
||||
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/invite/.*"/>
|
||||
<data android:scheme="http" android:host="discordapp.com" android:pathPattern="/invite/.*"/>
|
||||
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/template/.*"/>
|
||||
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/template/.*"/>
|
||||
<data android:scheme="http" android:host="discordapp.com" android:pathPattern="/template/.*"/>
|
||||
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/channels/.*"/>
|
||||
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/channels/.*"/>
|
||||
<data android:scheme="http" android:host="discordapp.com" android:pathPattern="/channels/.*"/>
|
||||
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/users/.*"/>
|
||||
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/users/.*"/>
|
||||
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/discovery"/>
|
||||
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/discovery"/>
|
||||
<data android:scheme="http" android:host="discordapp.com" android:pathPattern="/ra/.*"/>
|
||||
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/ra/.*"/>
|
||||
<data android:scheme="https" android:host="*.discordapp.com" android:pathPattern="/events/.*"/>
|
||||
<data android:scheme="https" android:host="discordapp.com" android:pathPattern="/events/.*"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
<data android:scheme="discord" android:host="app" android:pathPattern="/.*"/>
|
||||
</intent-filter>
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
<data android:scheme="https" android:host="discord.gift" android:pathPattern="/.*"/>
|
||||
<data android:scheme="http" android:host="discord.gift" android:pathPattern="/.*"/>
|
||||
<data android:scheme="https" android:host="discord.gg" android:pathPattern="/.*"/>
|
||||
<data android:scheme="http" android:host="discord.gg" android:pathPattern="/.*"/>
|
||||
<data android:scheme="https" android:host="discord.new" android:pathPattern="/.*"/>
|
||||
<data android:scheme="http" android:host="discord.new" android:pathPattern="/.*"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
|
@ -122,7 +147,7 @@
|
|||
</activity>
|
||||
<activity android:name="com.discord.app.AppActivity$Call" android:excludeFromRecents="true" android:launchMode="singleTask"/>
|
||||
<activity android:name="com.discord.app.AppActivity$IncomingCall" android:excludeFromRecents="true" android:launchMode="singleTask" android:showOnLockScreen="true" android:showWhenLocked="true" android:turnScreenOn="true"/>
|
||||
<activity android:theme="@style/res_2131951662_apptheme_loading" android:label="@string/discord" android:name="com.discord.app.AppActivity$AppAction" android:exported="true" android:launchMode="standard" android:windowSoftInputMode="stateHidden|adjustResize">
|
||||
<activity android:theme="@style/AppTheme_Loading" android:label="@string/discord" android:name="com.discord.app.AppActivity$AppAction" android:exported="true" android:launchMode="standard" android:windowSoftInputMode="stateHidden|adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="com.discord.intent.action.SDK"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
|
@ -154,7 +179,7 @@
|
|||
<service android:name="com.discord.utilities.voice.DiscordOverlayService" android:exported="false"/>
|
||||
<meta-data android:name="com.discord.features.FLAG" android:value="1"/>
|
||||
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/asset_default_avatar_64dp"/>
|
||||
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/brand_500"/>
|
||||
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/brand_new_500"/>
|
||||
<receiver android:name="com.discord.utilities.fcm.NotificationActions" android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="com.discord.intent.action.ENQUEUE_WORK"/>
|
||||
|
@ -174,8 +199,7 @@
|
|||
<meta-data android:name="firebase_crashlytics_collection_enabled" android:value="true"/>
|
||||
<meta-data android:name="com.google.android.nearby.messages.API_KEY" android:value="AIzaSyD-4L6bgKMixqBRtrG2UktVXK6IexXlsog"/>
|
||||
<meta-data android:name="com.google.android.actions" android:resource="@xml/actions"/>
|
||||
<meta-data android:name="libdiscord_version" android:value="89.0.4-direct-surface-encode"/>
|
||||
<service android:name="com.discord.hardware_analytics.HardwareSurveyService" android:exported="false" android:process=":HardwareSurveyService.PrivateRemoteProcess"/>
|
||||
<meta-data android:name="libdiscord_version" android:value="89.0.26-pixel6-hwdec"/>
|
||||
<activity android:theme="@style/res_2131952270_theme_appcompat_light_noactionbar" android:name="com.yalantis.ucrop.UCropActivity"/>
|
||||
<service android:name="androidx.sharetarget.ChooserTargetServiceCompat" android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE">
|
||||
<intent-filter>
|
||||
|
@ -266,7 +290,7 @@
|
|||
<service android:name="com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService" android:permission="android.permission.BIND_JOB_SERVICE" android:exported="false"/>
|
||||
<receiver android:name="com.google.android.datatransport.runtime.scheduling.jobscheduling.AlarmManagerSchedulerBroadcastReceiver" android:exported="false"/>
|
||||
<service android:name="androidx.room.MultiInstanceInvalidationService" android:exported="false" android:directBootAware="true"/>
|
||||
<meta-data android:name="com.google.android.play.billingclient.version" android:value="3.0.3"/>
|
||||
<meta-data android:name="com.google.android.play.billingclient.version" android:value="4.0.0"/>
|
||||
<activity android:theme="@android:style/Theme.Translucent.NoTitleBar" android:name="com.android.billingclient.api.ProxyBillingActivity" android:exported="false" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
<meta-data android:name="com.android.vending.derived.apk.id" android:value="1"/>
|
||||
</application>
|
||||
|
|
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
@ -3,6 +3,7 @@ package android.support.v4.media;
|
|||
import android.annotation.SuppressLint;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.media.MediaDescription;
|
||||
import android.media.browse.MediaBrowser;
|
||||
import android.os.BadParcelableException;
|
||||
import android.os.Binder;
|
||||
|
@ -20,11 +21,14 @@ import android.support.v4.media.session.MediaSessionCompat;
|
|||
import android.support.v4.os.ResultReceiver;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.collection.ArrayMap;
|
||||
import androidx.core.app.BundleCompat;
|
||||
import androidx.media.MediaBrowserCompatUtils;
|
||||
import androidx.media.MediaBrowserProtocol;
|
||||
import androidx.media.MediaBrowserServiceCompat;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -32,7 +36,9 @@ import java.util.Objects;
|
|||
import x.a.b.b.a.b;
|
||||
public final class MediaBrowserCompat {
|
||||
public static final boolean a = Log.isLoggable("MediaBrowserCompat", 3);
|
||||
public final c b;
|
||||
|
||||
/* renamed from: b reason: collision with root package name */
|
||||
public final d f14b;
|
||||
|
||||
public static class CustomActionResultReceiver extends ResultReceiver {
|
||||
@Override // android.support.v4.os.ResultReceiver
|
||||
|
@ -46,10 +52,10 @@ public final class MediaBrowserCompat {
|
|||
if (bundle != null) {
|
||||
bundle = MediaSessionCompat.b(bundle);
|
||||
}
|
||||
if (i != 0 || bundle == null || !bundle.containsKey("media_item")) {
|
||||
if (i != 0 || bundle == null || !bundle.containsKey(MediaBrowserServiceCompat.KEY_MEDIA_ITEM)) {
|
||||
throw null;
|
||||
}
|
||||
Parcelable parcelable = bundle.getParcelable("media_item");
|
||||
Parcelable parcelable = bundle.getParcelable(MediaBrowserServiceCompat.KEY_MEDIA_ITEM);
|
||||
if (parcelable == null || (parcelable instanceof MediaItem)) {
|
||||
MediaItem mediaItem = (MediaItem) parcelable;
|
||||
throw null;
|
||||
|
@ -61,8 +67,8 @@ public final class MediaBrowserCompat {
|
|||
@SuppressLint({"BanParcelableUsage"})
|
||||
public static class MediaItem implements Parcelable {
|
||||
public static final Parcelable.Creator<MediaItem> CREATOR = new a();
|
||||
public final int i;
|
||||
public final MediaDescriptionCompat j;
|
||||
public final int j;
|
||||
public final MediaDescriptionCompat k;
|
||||
|
||||
public class a implements Parcelable.Creator<MediaItem> {
|
||||
/* Return type fixed from 'java.lang.Object' to match base method */
|
||||
|
@ -79,16 +85,16 @@ public final class MediaBrowserCompat {
|
|||
}
|
||||
|
||||
public MediaItem(Parcel parcel) {
|
||||
this.i = parcel.readInt();
|
||||
this.j = MediaDescriptionCompat.CREATOR.createFromParcel(parcel);
|
||||
this.j = parcel.readInt();
|
||||
this.k = MediaDescriptionCompat.CREATOR.createFromParcel(parcel);
|
||||
}
|
||||
|
||||
public MediaItem(@NonNull MediaDescriptionCompat mediaDescriptionCompat, int i) {
|
||||
if (mediaDescriptionCompat == null) {
|
||||
throw new IllegalArgumentException("description cannot be null");
|
||||
} else if (!TextUtils.isEmpty(mediaDescriptionCompat.i)) {
|
||||
this.i = i;
|
||||
this.j = mediaDescriptionCompat;
|
||||
} else if (!TextUtils.isEmpty(mediaDescriptionCompat.j)) {
|
||||
this.j = i;
|
||||
this.k = mediaDescriptionCompat;
|
||||
} else {
|
||||
throw new IllegalArgumentException("description must have a non-empty media id");
|
||||
}
|
||||
|
@ -103,7 +109,7 @@ public final class MediaBrowserCompat {
|
|||
for (Object obj : list) {
|
||||
if (obj != null) {
|
||||
MediaBrowser.MediaItem mediaItem2 = (MediaBrowser.MediaItem) obj;
|
||||
mediaItem = new MediaItem(MediaDescriptionCompat.a(mediaItem2.getDescription()), mediaItem2.getFlags());
|
||||
mediaItem = new MediaItem(MediaDescriptionCompat.a(a.a(mediaItem2)), a.b(mediaItem2));
|
||||
} else {
|
||||
mediaItem = null;
|
||||
}
|
||||
|
@ -120,13 +126,13 @@ public final class MediaBrowserCompat {
|
|||
@Override // java.lang.Object
|
||||
@NonNull
|
||||
public String toString() {
|
||||
return "MediaItem{mFlags=" + this.i + ", mDescription=" + this.j + '}';
|
||||
return "MediaItem{mFlags=" + this.j + ", mDescription=" + this.k + '}';
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
parcel.writeInt(this.i);
|
||||
this.j.writeToParcel(parcel, i);
|
||||
parcel.writeInt(this.j);
|
||||
this.k.writeToParcel(parcel, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,10 +142,10 @@ public final class MediaBrowserCompat {
|
|||
if (bundle != null) {
|
||||
bundle = MediaSessionCompat.b(bundle);
|
||||
}
|
||||
if (i != 0 || bundle == null || !bundle.containsKey("search_results")) {
|
||||
if (i != 0 || bundle == null || !bundle.containsKey(MediaBrowserServiceCompat.KEY_SEARCH_RESULTS)) {
|
||||
throw null;
|
||||
}
|
||||
Parcelable[] parcelableArray = bundle.getParcelableArray("search_results");
|
||||
Parcelable[] parcelableArray = bundle.getParcelableArray(MediaBrowserServiceCompat.KEY_SEARCH_RESULTS);
|
||||
Objects.requireNonNull(parcelableArray);
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (Parcelable parcelable : parcelableArray) {
|
||||
|
@ -149,56 +155,71 @@ public final class MediaBrowserCompat {
|
|||
}
|
||||
}
|
||||
|
||||
public static class a extends Handler {
|
||||
public final WeakReference<g> a;
|
||||
public WeakReference<Messenger> b;
|
||||
@RequiresApi(21)
|
||||
public static class a {
|
||||
@DoNotInline
|
||||
public static MediaDescription a(MediaBrowser.MediaItem mediaItem) {
|
||||
return mediaItem.getDescription();
|
||||
}
|
||||
|
||||
public a(g gVar) {
|
||||
this.a = new WeakReference<>(gVar);
|
||||
@DoNotInline
|
||||
public static int b(MediaBrowser.MediaItem mediaItem) {
|
||||
return mediaItem.getFlags();
|
||||
}
|
||||
}
|
||||
|
||||
public static class b extends Handler {
|
||||
public final WeakReference<h> a;
|
||||
|
||||
/* renamed from: b reason: collision with root package name */
|
||||
public WeakReference<Messenger> f15b;
|
||||
|
||||
public b(h hVar) {
|
||||
this.a = new WeakReference<>(hVar);
|
||||
}
|
||||
|
||||
public void a(Messenger messenger) {
|
||||
this.b = new WeakReference<>(messenger);
|
||||
this.f15b = new WeakReference<>(messenger);
|
||||
}
|
||||
|
||||
@Override // android.os.Handler
|
||||
public void handleMessage(@NonNull Message message) {
|
||||
WeakReference<Messenger> weakReference = this.b;
|
||||
WeakReference<Messenger> weakReference = this.f15b;
|
||||
if (weakReference != null && weakReference.get() != null && this.a.get() != null) {
|
||||
Bundle data = message.getData();
|
||||
MediaSessionCompat.a(data);
|
||||
g gVar = this.a.get();
|
||||
Messenger messenger = this.b.get();
|
||||
h hVar = this.a.get();
|
||||
Messenger messenger = this.f15b.get();
|
||||
try {
|
||||
int i = message.what;
|
||||
if (i == 1) {
|
||||
Bundle bundle = data.getBundle("data_root_hints");
|
||||
Bundle bundle = data.getBundle(MediaBrowserProtocol.DATA_ROOT_HINTS);
|
||||
MediaSessionCompat.a(bundle);
|
||||
gVar.a(messenger, data.getString("data_media_item_id"), (MediaSessionCompat.Token) data.getParcelable("data_media_session_token"), bundle);
|
||||
hVar.a(messenger, data.getString(MediaBrowserProtocol.DATA_MEDIA_ITEM_ID), (MediaSessionCompat.Token) data.getParcelable(MediaBrowserProtocol.DATA_MEDIA_SESSION_TOKEN), bundle);
|
||||
} else if (i == 2) {
|
||||
gVar.c(messenger);
|
||||
hVar.c(messenger);
|
||||
} else if (i != 3) {
|
||||
Log.w("MediaBrowserCompat", "Unhandled message: " + message + "\n Client version: 1\n Service version: " + message.arg1);
|
||||
} else {
|
||||
Bundle bundle2 = data.getBundle("data_options");
|
||||
Bundle bundle2 = data.getBundle(MediaBrowserProtocol.DATA_OPTIONS);
|
||||
MediaSessionCompat.a(bundle2);
|
||||
Bundle bundle3 = data.getBundle("data_notify_children_changed_options");
|
||||
Bundle bundle3 = data.getBundle(MediaBrowserProtocol.DATA_NOTIFY_CHILDREN_CHANGED_OPTIONS);
|
||||
MediaSessionCompat.a(bundle3);
|
||||
gVar.b(messenger, data.getString("data_media_item_id"), data.getParcelableArrayList("data_media_item_list"), bundle2, bundle3);
|
||||
hVar.b(messenger, data.getString(MediaBrowserProtocol.DATA_MEDIA_ITEM_ID), data.getParcelableArrayList(MediaBrowserProtocol.DATA_MEDIA_ITEM_LIST), bundle2, bundle3);
|
||||
}
|
||||
} catch (BadParcelableException unused) {
|
||||
Log.e("MediaBrowserCompat", "Could not unparcel the data.");
|
||||
if (message.what == 1) {
|
||||
gVar.c(messenger);
|
||||
hVar.c(messenger);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class b {
|
||||
public static class c {
|
||||
public final MediaBrowser.ConnectionCallback mConnectionCallbackFwk = new a();
|
||||
public AbstractC0000b mConnectionCallbackInternal;
|
||||
public b mConnectionCallbackInternal;
|
||||
|
||||
@RequiresApi(21)
|
||||
public class a extends MediaBrowser.ConnectionCallback {
|
||||
|
@ -207,71 +228,70 @@ public final class MediaBrowserCompat {
|
|||
|
||||
@Override // android.media.browse.MediaBrowser.ConnectionCallback
|
||||
public void onConnected() {
|
||||
AbstractC0000b bVar = b.this.mConnectionCallbackInternal;
|
||||
b bVar = c.this.mConnectionCallbackInternal;
|
||||
if (bVar != null) {
|
||||
d dVar = (d) bVar;
|
||||
Objects.requireNonNull(dVar);
|
||||
e eVar = (e) bVar;
|
||||
Objects.requireNonNull(eVar);
|
||||
try {
|
||||
Bundle extras = dVar.b.getExtras();
|
||||
Bundle extras = eVar.f16b.getExtras();
|
||||
if (extras != null) {
|
||||
extras.getInt("extra_service_version", 0);
|
||||
IBinder binder = BundleCompat.getBinder(extras, "extra_messenger");
|
||||
extras.getInt(MediaBrowserProtocol.EXTRA_SERVICE_VERSION, 0);
|
||||
IBinder binder = BundleCompat.getBinder(extras, MediaBrowserProtocol.EXTRA_MESSENGER_BINDER);
|
||||
if (binder != null) {
|
||||
dVar.f = new h(binder, dVar.f10c);
|
||||
Messenger messenger = new Messenger(dVar.d);
|
||||
dVar.g = messenger;
|
||||
dVar.d.a(messenger);
|
||||
eVar.f = new i(binder, eVar.c);
|
||||
Messenger messenger = new Messenger(eVar.d);
|
||||
eVar.g = messenger;
|
||||
eVar.d.a(messenger);
|
||||
try {
|
||||
h hVar = dVar.f;
|
||||
Context context = dVar.a;
|
||||
Messenger messenger2 = dVar.g;
|
||||
Objects.requireNonNull(hVar);
|
||||
i iVar = eVar.f;
|
||||
Context context = eVar.a;
|
||||
Messenger messenger2 = eVar.g;
|
||||
Objects.requireNonNull(iVar);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("data_package_name", context.getPackageName());
|
||||
bundle.putInt("data_calling_pid", Process.myPid());
|
||||
bundle.putBundle("data_root_hints", hVar.b);
|
||||
hVar.a(6, bundle, messenger2);
|
||||
bundle.putString(MediaBrowserProtocol.DATA_PACKAGE_NAME, context.getPackageName());
|
||||
bundle.putInt(MediaBrowserProtocol.DATA_CALLING_PID, Process.myPid());
|
||||
bundle.putBundle(MediaBrowserProtocol.DATA_ROOT_HINTS, iVar.f17b);
|
||||
iVar.a(6, bundle, messenger2);
|
||||
} catch (RemoteException unused) {
|
||||
Log.i("MediaBrowserCompat", "Remote error registering client messenger.");
|
||||
}
|
||||
}
|
||||
x.a.b.b.a.b e = b.a.e(BundleCompat.getBinder(extras, "extra_session_binder"));
|
||||
if (e != null) {
|
||||
dVar.h = MediaSessionCompat.Token.a(dVar.b.getSessionToken(), e);
|
||||
x.a.b.b.a.b c = b.a.c(BundleCompat.getBinder(extras, MediaBrowserProtocol.EXTRA_SESSION_BINDER));
|
||||
if (c != null) {
|
||||
eVar.h = MediaSessionCompat.Token.a(eVar.f16b.getSessionToken(), c);
|
||||
}
|
||||
}
|
||||
} catch (IllegalStateException e2) {
|
||||
Log.e("MediaBrowserCompat", "Unexpected IllegalStateException", e2);
|
||||
} catch (IllegalStateException e) {
|
||||
Log.e("MediaBrowserCompat", "Unexpected IllegalStateException", e);
|
||||
}
|
||||
}
|
||||
b.this.onConnected();
|
||||
c.this.onConnected();
|
||||
}
|
||||
|
||||
@Override // android.media.browse.MediaBrowser.ConnectionCallback
|
||||
public void onConnectionFailed() {
|
||||
AbstractC0000b bVar = b.this.mConnectionCallbackInternal;
|
||||
b bVar = c.this.mConnectionCallbackInternal;
|
||||
if (bVar != null) {
|
||||
Objects.requireNonNull((d) bVar);
|
||||
Objects.requireNonNull((e) bVar);
|
||||
}
|
||||
b.this.onConnectionFailed();
|
||||
c.this.onConnectionFailed();
|
||||
}
|
||||
|
||||
@Override // android.media.browse.MediaBrowser.ConnectionCallback
|
||||
public void onConnectionSuspended() {
|
||||
AbstractC0000b bVar = b.this.mConnectionCallbackInternal;
|
||||
b bVar = c.this.mConnectionCallbackInternal;
|
||||
if (bVar != null) {
|
||||
d dVar = (d) bVar;
|
||||
dVar.f = null;
|
||||
dVar.g = null;
|
||||
dVar.h = null;
|
||||
dVar.d.a(null);
|
||||
e eVar = (e) bVar;
|
||||
eVar.f = null;
|
||||
eVar.g = null;
|
||||
eVar.h = null;
|
||||
eVar.d.a(null);
|
||||
}
|
||||
b.this.onConnectionSuspended();
|
||||
c.this.onConnectionSuspended();
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: android.support.v4.media.MediaBrowserCompat$b$b reason: collision with other inner class name */
|
||||
public interface AbstractC0000b {
|
||||
public interface b {
|
||||
}
|
||||
|
||||
public void onConnected() {
|
||||
|
@ -286,73 +306,73 @@ public final class MediaBrowserCompat {
|
|||
throw null;
|
||||
}
|
||||
|
||||
public void setInternalConnectionCallback(AbstractC0000b bVar) {
|
||||
public void setInternalConnectionCallback(b bVar) {
|
||||
this.mConnectionCallbackInternal = bVar;
|
||||
}
|
||||
}
|
||||
|
||||
public interface c {
|
||||
public interface d {
|
||||
}
|
||||
|
||||
@RequiresApi(21)
|
||||
public static class d implements c, g, b.AbstractC0000b {
|
||||
public static class e implements d, h, c.b {
|
||||
public final Context a;
|
||||
public final MediaBrowser b;
|
||||
|
||||
/* renamed from: c reason: collision with root package name */
|
||||
public final Bundle f10c;
|
||||
public final a d = new a(this);
|
||||
public final ArrayMap<String, i> e = new ArrayMap<>();
|
||||
public h f;
|
||||
/* renamed from: b reason: collision with root package name */
|
||||
public final MediaBrowser f16b;
|
||||
public final Bundle c;
|
||||
public final b d = new b(this);
|
||||
public final ArrayMap<String, j> e = new ArrayMap<>();
|
||||
public i f;
|
||||
public Messenger g;
|
||||
public MediaSessionCompat.Token h;
|
||||
|
||||
public d(Context context, ComponentName componentName, b bVar, Bundle bundle) {
|
||||
public e(Context context, ComponentName componentName, c cVar, Bundle bundle) {
|
||||
this.a = context;
|
||||
Bundle bundle2 = bundle != null ? new Bundle(bundle) : new Bundle();
|
||||
this.f10c = bundle2;
|
||||
bundle2.putInt("extra_client_version", 1);
|
||||
bundle2.putInt("extra_calling_pid", Process.myPid());
|
||||
bVar.setInternalConnectionCallback(this);
|
||||
this.b = new MediaBrowser(context, componentName, bVar.mConnectionCallbackFwk, bundle2);
|
||||
this.c = bundle2;
|
||||
bundle2.putInt(MediaBrowserProtocol.EXTRA_CLIENT_VERSION, 1);
|
||||
bundle2.putInt(MediaBrowserProtocol.EXTRA_CALLING_PID, Process.myPid());
|
||||
cVar.setInternalConnectionCallback(this);
|
||||
this.f16b = new MediaBrowser(context, componentName, cVar.mConnectionCallbackFwk, bundle2);
|
||||
}
|
||||
|
||||
@Override // android.support.v4.media.MediaBrowserCompat.g
|
||||
@Override // android.support.v4.media.MediaBrowserCompat.h
|
||||
public void a(Messenger messenger, String str, MediaSessionCompat.Token token, Bundle bundle) {
|
||||
}
|
||||
|
||||
@Override // android.support.v4.media.MediaBrowserCompat.g
|
||||
@Override // android.support.v4.media.MediaBrowserCompat.h
|
||||
public void b(Messenger messenger, String str, List<MediaItem> list, Bundle bundle, Bundle bundle2) {
|
||||
if (this.g == messenger) {
|
||||
i iVar = this.e.get(str);
|
||||
if (iVar != null) {
|
||||
iVar.a(bundle);
|
||||
j jVar = this.e.get(str);
|
||||
if (jVar != null) {
|
||||
jVar.a(bundle);
|
||||
} else if (MediaBrowserCompat.a) {
|
||||
Log.d("MediaBrowserCompat", "onLoadChildren for id that isn't subscribed id=" + str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.support.v4.media.MediaBrowserCompat.g
|
||||
@Override // android.support.v4.media.MediaBrowserCompat.h
|
||||
public void c(Messenger messenger) {
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(23)
|
||||
public static class e extends d {
|
||||
public e(Context context, ComponentName componentName, b bVar, Bundle bundle) {
|
||||
super(context, componentName, bVar, bundle);
|
||||
public static class f extends e {
|
||||
public f(Context context, ComponentName componentName, c cVar, Bundle bundle) {
|
||||
super(context, componentName, cVar, bundle);
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(26)
|
||||
public static class f extends e {
|
||||
public f(Context context, ComponentName componentName, b bVar, Bundle bundle) {
|
||||
super(context, componentName, bVar, bundle);
|
||||
public static class g extends f {
|
||||
public g(Context context, ComponentName componentName, c cVar, Bundle bundle) {
|
||||
super(context, componentName, cVar, bundle);
|
||||
}
|
||||
}
|
||||
|
||||
public interface g {
|
||||
public interface h {
|
||||
void a(Messenger messenger, String str, MediaSessionCompat.Token token, Bundle bundle);
|
||||
|
||||
void b(Messenger messenger, String str, List<MediaItem> list, Bundle bundle, Bundle bundle2);
|
||||
|
@ -360,13 +380,15 @@ public final class MediaBrowserCompat {
|
|||
void c(Messenger messenger);
|
||||
}
|
||||
|
||||
public static class h {
|
||||
public static class i {
|
||||
public Messenger a;
|
||||
public Bundle b;
|
||||
|
||||
public h(IBinder iBinder, Bundle bundle) {
|
||||
/* renamed from: b reason: collision with root package name */
|
||||
public Bundle f17b;
|
||||
|
||||
public i(IBinder iBinder, Bundle bundle) {
|
||||
this.a = new Messenger(iBinder);
|
||||
this.b = bundle;
|
||||
this.f17b = bundle;
|
||||
}
|
||||
|
||||
public final void a(int i, Bundle bundle, Messenger messenger) throws RemoteException {
|
||||
|
@ -379,13 +401,15 @@ public final class MediaBrowserCompat {
|
|||
}
|
||||
}
|
||||
|
||||
public static class i {
|
||||
public final List<j> a = new ArrayList();
|
||||
public final List<Bundle> b = new ArrayList();
|
||||
public static class j {
|
||||
public final List<k> a = new ArrayList();
|
||||
|
||||
public j a(Bundle bundle) {
|
||||
for (int i = 0; i < this.b.size(); i++) {
|
||||
if (MediaBrowserCompatUtils.areSameOptions(this.b.get(i), bundle)) {
|
||||
/* renamed from: b reason: collision with root package name */
|
||||
public final List<Bundle> f18b = new ArrayList();
|
||||
|
||||
public k a(Bundle bundle) {
|
||||
for (int i = 0; i < this.f18b.size(); i++) {
|
||||
if (MediaBrowserCompatUtils.areSameOptions(this.f18b.get(i), bundle)) {
|
||||
return this.a.get(i);
|
||||
}
|
||||
}
|
||||
|
@ -393,7 +417,7 @@ public final class MediaBrowserCompat {
|
|||
}
|
||||
}
|
||||
|
||||
public static abstract class j {
|
||||
public static abstract class k {
|
||||
public final IBinder a = new Binder();
|
||||
|
||||
@RequiresApi(21)
|
||||
|
@ -403,15 +427,15 @@ public final class MediaBrowserCompat {
|
|||
|
||||
@Override // android.media.browse.MediaBrowser.SubscriptionCallback
|
||||
public void onChildrenLoaded(@NonNull String str, List<MediaBrowser.MediaItem> list) {
|
||||
Objects.requireNonNull(j.this);
|
||||
j jVar = j.this;
|
||||
Objects.requireNonNull(k.this);
|
||||
k kVar = k.this;
|
||||
MediaItem.a(list);
|
||||
Objects.requireNonNull(jVar);
|
||||
Objects.requireNonNull(kVar);
|
||||
}
|
||||
|
||||
@Override // android.media.browse.MediaBrowser.SubscriptionCallback
|
||||
public void onError(@NonNull String str) {
|
||||
Objects.requireNonNull(j.this);
|
||||
Objects.requireNonNull(k.this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -424,19 +448,19 @@ public final class MediaBrowserCompat {
|
|||
@Override // android.media.browse.MediaBrowser.SubscriptionCallback
|
||||
public void onChildrenLoaded(@NonNull String str, @NonNull List<MediaBrowser.MediaItem> list, @NonNull Bundle bundle) {
|
||||
MediaSessionCompat.a(bundle);
|
||||
j jVar = j.this;
|
||||
k kVar = k.this;
|
||||
MediaItem.a(list);
|
||||
Objects.requireNonNull(jVar);
|
||||
Objects.requireNonNull(kVar);
|
||||
}
|
||||
|
||||
@Override // android.media.browse.MediaBrowser.SubscriptionCallback
|
||||
public void onError(@NonNull String str, @NonNull Bundle bundle) {
|
||||
MediaSessionCompat.a(bundle);
|
||||
Objects.requireNonNull(j.this);
|
||||
Objects.requireNonNull(k.this);
|
||||
}
|
||||
}
|
||||
|
||||
public j() {
|
||||
public k() {
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
new b();
|
||||
} else {
|
||||
|
@ -445,14 +469,14 @@ public final class MediaBrowserCompat {
|
|||
}
|
||||
}
|
||||
|
||||
public MediaBrowserCompat(Context context, ComponentName componentName, b bVar, Bundle bundle) {
|
||||
public MediaBrowserCompat(Context context, ComponentName componentName, c cVar, Bundle bundle) {
|
||||
int i2 = Build.VERSION.SDK_INT;
|
||||
if (i2 >= 26) {
|
||||
this.b = new f(context, componentName, bVar, null);
|
||||
this.f14b = new g(context, componentName, cVar, null);
|
||||
} else if (i2 >= 23) {
|
||||
this.b = new e(context, componentName, bVar, null);
|
||||
this.f14b = new f(context, componentName, cVar, null);
|
||||
} else {
|
||||
this.b = new d(context, componentName, bVar, null);
|
||||
this.f14b = new e(context, componentName, cVar, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,18 +9,21 @@ import android.os.Bundle;
|
|||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.v4.media.session.MediaSessionCompat;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
@SuppressLint({"BanParcelableUsage"})
|
||||
public final class MediaDescriptionCompat implements Parcelable {
|
||||
public static final Parcelable.Creator<MediaDescriptionCompat> CREATOR = new a();
|
||||
public final String i;
|
||||
public final CharSequence j;
|
||||
public final String j;
|
||||
public final CharSequence k;
|
||||
public final CharSequence l;
|
||||
public final Bitmap m;
|
||||
public final Uri n;
|
||||
public final Bundle o;
|
||||
public final Uri p;
|
||||
public MediaDescription q;
|
||||
public final CharSequence m;
|
||||
public final Bitmap n;
|
||||
public final Uri o;
|
||||
public final Bundle p;
|
||||
public final Uri q;
|
||||
public MediaDescription r;
|
||||
|
||||
public class a implements Parcelable.Creator<MediaDescriptionCompat> {
|
||||
/* Return type fixed from 'java.lang.Object' to match base method */
|
||||
|
@ -36,15 +39,119 @@ public final class MediaDescriptionCompat implements Parcelable {
|
|||
}
|
||||
}
|
||||
|
||||
@RequiresApi(21)
|
||||
public static class b {
|
||||
@DoNotInline
|
||||
public static MediaDescription a(MediaDescription.Builder builder) {
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static MediaDescription.Builder b() {
|
||||
return new MediaDescription.Builder();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@DoNotInline
|
||||
public static CharSequence c(MediaDescription mediaDescription) {
|
||||
return mediaDescription.getDescription();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@DoNotInline
|
||||
public static Bundle d(MediaDescription mediaDescription) {
|
||||
return mediaDescription.getExtras();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@DoNotInline
|
||||
public static Bitmap e(MediaDescription mediaDescription) {
|
||||
return mediaDescription.getIconBitmap();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@DoNotInline
|
||||
public static Uri f(MediaDescription mediaDescription) {
|
||||
return mediaDescription.getIconUri();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@DoNotInline
|
||||
public static String g(MediaDescription mediaDescription) {
|
||||
return mediaDescription.getMediaId();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@DoNotInline
|
||||
public static CharSequence h(MediaDescription mediaDescription) {
|
||||
return mediaDescription.getSubtitle();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@DoNotInline
|
||||
public static CharSequence i(MediaDescription mediaDescription) {
|
||||
return mediaDescription.getTitle();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void j(MediaDescription.Builder builder, @Nullable CharSequence charSequence) {
|
||||
builder.setDescription(charSequence);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void k(MediaDescription.Builder builder, @Nullable Bundle bundle) {
|
||||
builder.setExtras(bundle);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void l(MediaDescription.Builder builder, @Nullable Bitmap bitmap) {
|
||||
builder.setIconBitmap(bitmap);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void m(MediaDescription.Builder builder, @Nullable Uri uri) {
|
||||
builder.setIconUri(uri);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void n(MediaDescription.Builder builder, @Nullable String str) {
|
||||
builder.setMediaId(str);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void o(MediaDescription.Builder builder, @Nullable CharSequence charSequence) {
|
||||
builder.setSubtitle(charSequence);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void p(MediaDescription.Builder builder, @Nullable CharSequence charSequence) {
|
||||
builder.setTitle(charSequence);
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(23)
|
||||
public static class c {
|
||||
@Nullable
|
||||
@DoNotInline
|
||||
public static Uri a(MediaDescription mediaDescription) {
|
||||
return mediaDescription.getMediaUri();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void b(MediaDescription.Builder builder, @Nullable Uri uri) {
|
||||
builder.setMediaUri(uri);
|
||||
}
|
||||
}
|
||||
|
||||
public MediaDescriptionCompat(String str, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, Bitmap bitmap, Uri uri, Bundle bundle, Uri uri2) {
|
||||
this.i = str;
|
||||
this.j = charSequence;
|
||||
this.k = charSequence2;
|
||||
this.l = charSequence3;
|
||||
this.m = bitmap;
|
||||
this.n = uri;
|
||||
this.o = bundle;
|
||||
this.p = uri2;
|
||||
this.j = str;
|
||||
this.k = charSequence;
|
||||
this.l = charSequence2;
|
||||
this.m = charSequence3;
|
||||
this.n = bitmap;
|
||||
this.o = uri;
|
||||
this.p = bundle;
|
||||
this.q = uri2;
|
||||
}
|
||||
|
||||
/* JADX WARNING: Removed duplicated region for block: B:18:0x0052 */
|
||||
|
@ -56,39 +163,39 @@ public final class MediaDescriptionCompat implements Parcelable {
|
|||
}
|
||||
int i = Build.VERSION.SDK_INT;
|
||||
MediaDescription mediaDescription = (MediaDescription) obj;
|
||||
String mediaId = mediaDescription.getMediaId();
|
||||
CharSequence title = mediaDescription.getTitle();
|
||||
CharSequence subtitle = mediaDescription.getSubtitle();
|
||||
CharSequence description = mediaDescription.getDescription();
|
||||
Bitmap iconBitmap = mediaDescription.getIconBitmap();
|
||||
Uri iconUri = mediaDescription.getIconUri();
|
||||
Bundle extras = mediaDescription.getExtras();
|
||||
if (extras != null) {
|
||||
extras = MediaSessionCompat.b(extras);
|
||||
String g = b.g(mediaDescription);
|
||||
CharSequence i2 = b.i(mediaDescription);
|
||||
CharSequence h = b.h(mediaDescription);
|
||||
CharSequence c2 = b.c(mediaDescription);
|
||||
Bitmap e = b.e(mediaDescription);
|
||||
Uri f = b.f(mediaDescription);
|
||||
Bundle d = b.d(mediaDescription);
|
||||
if (d != null) {
|
||||
d = MediaSessionCompat.b(d);
|
||||
}
|
||||
Uri uri2 = extras != null ? (Uri) extras.getParcelable("android.support.v4.media.description.MEDIA_URI") : null;
|
||||
Uri uri2 = d != null ? (Uri) d.getParcelable("android.support.v4.media.description.MEDIA_URI") : null;
|
||||
if (uri2 != null) {
|
||||
if (!extras.containsKey("android.support.v4.media.description.NULL_BUNDLE_FLAG") || extras.size() != 2) {
|
||||
extras.remove("android.support.v4.media.description.MEDIA_URI");
|
||||
extras.remove("android.support.v4.media.description.NULL_BUNDLE_FLAG");
|
||||
if (!d.containsKey("android.support.v4.media.description.NULL_BUNDLE_FLAG") || d.size() != 2) {
|
||||
d.remove("android.support.v4.media.description.MEDIA_URI");
|
||||
d.remove("android.support.v4.media.description.NULL_BUNDLE_FLAG");
|
||||
} else {
|
||||
bundle = null;
|
||||
if (uri2 == null) {
|
||||
if (i >= 23) {
|
||||
uri = mediaDescription.getMediaUri();
|
||||
uri = c.a(mediaDescription);
|
||||
}
|
||||
uri2 = uri;
|
||||
}
|
||||
MediaDescriptionCompat mediaDescriptionCompat = new MediaDescriptionCompat(mediaId, title, subtitle, description, iconBitmap, iconUri, bundle, uri2);
|
||||
mediaDescriptionCompat.q = mediaDescription;
|
||||
MediaDescriptionCompat mediaDescriptionCompat = new MediaDescriptionCompat(g, i2, h, c2, e, f, bundle, uri2);
|
||||
mediaDescriptionCompat.r = mediaDescription;
|
||||
return mediaDescriptionCompat;
|
||||
}
|
||||
}
|
||||
bundle = extras;
|
||||
bundle = d;
|
||||
if (uri2 == null) {
|
||||
}
|
||||
MediaDescriptionCompat mediaDescriptionCompat = new MediaDescriptionCompat(mediaId, title, subtitle, description, iconBitmap, iconUri, bundle, uri2);
|
||||
mediaDescriptionCompat.q = mediaDescription;
|
||||
MediaDescriptionCompat mediaDescriptionCompat = new MediaDescriptionCompat(g, i2, h, c2, e, f, bundle, uri2);
|
||||
mediaDescriptionCompat.r = mediaDescription;
|
||||
return mediaDescriptionCompat;
|
||||
}
|
||||
|
||||
|
@ -99,35 +206,39 @@ public final class MediaDescriptionCompat implements Parcelable {
|
|||
|
||||
@Override // java.lang.Object
|
||||
public String toString() {
|
||||
return ((Object) this.j) + ", " + ((Object) this.k) + ", " + ((Object) this.l);
|
||||
return ((Object) this.k) + ", " + ((Object) this.l) + ", " + ((Object) this.m);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
Bundle bundle;
|
||||
int i2 = Build.VERSION.SDK_INT;
|
||||
MediaDescription mediaDescription = this.q;
|
||||
MediaDescription mediaDescription = this.r;
|
||||
if (mediaDescription == null) {
|
||||
MediaDescription.Builder builder = new MediaDescription.Builder();
|
||||
builder.setMediaId(this.i);
|
||||
builder.setTitle(this.j);
|
||||
builder.setSubtitle(this.k);
|
||||
builder.setDescription(this.l);
|
||||
builder.setIconBitmap(this.m);
|
||||
builder.setIconUri(this.n);
|
||||
Bundle bundle = this.o;
|
||||
if (i2 < 23 && this.p != null) {
|
||||
if (bundle == null) {
|
||||
MediaDescription.Builder b2 = b.b();
|
||||
b.n(b2, this.j);
|
||||
b.p(b2, this.k);
|
||||
b.o(b2, this.l);
|
||||
b.j(b2, this.m);
|
||||
b.l(b2, this.n);
|
||||
b.m(b2, this.o);
|
||||
if (i2 >= 23 || this.q == null) {
|
||||
b.k(b2, this.p);
|
||||
} else {
|
||||
if (this.p == null) {
|
||||
bundle = new Bundle();
|
||||
bundle.putBoolean("android.support.v4.media.description.NULL_BUNDLE_FLAG", true);
|
||||
} else {
|
||||
bundle = new Bundle(this.p);
|
||||
}
|
||||
bundle.putParcelable("android.support.v4.media.description.MEDIA_URI", this.p);
|
||||
bundle.putParcelable("android.support.v4.media.description.MEDIA_URI", this.q);
|
||||
b.k(b2, bundle);
|
||||
}
|
||||
builder.setExtras(bundle);
|
||||
if (i2 >= 23) {
|
||||
builder.setMediaUri(this.p);
|
||||
c.b(b2, this.q);
|
||||
}
|
||||
mediaDescription = builder.build();
|
||||
this.q = mediaDescription;
|
||||
mediaDescription = b.a(b2);
|
||||
this.r = mediaDescription;
|
||||
}
|
||||
mediaDescription.writeToParcel(parcel, i);
|
||||
}
|
||||
|
|
|
@ -6,11 +6,12 @@ import android.os.Parcel;
|
|||
import android.os.Parcelable;
|
||||
import android.support.v4.media.session.MediaSessionCompat;
|
||||
import androidx.collection.ArrayMap;
|
||||
import androidx.media.utils.MediaConstants;
|
||||
@SuppressLint({"BanParcelableUsage"})
|
||||
public final class MediaMetadataCompat implements Parcelable {
|
||||
public static final Parcelable.Creator<MediaMetadataCompat> CREATOR = new a();
|
||||
public static final ArrayMap<String, Integer> i;
|
||||
public final Bundle j;
|
||||
public static final ArrayMap<String, Integer> j;
|
||||
public final Bundle k;
|
||||
|
||||
public class a implements Parcelable.Creator<MediaMetadataCompat> {
|
||||
/* Return type fixed from 'java.lang.Object' to match base method */
|
||||
|
@ -28,7 +29,7 @@ public final class MediaMetadataCompat implements Parcelable {
|
|||
|
||||
static {
|
||||
ArrayMap<String, Integer> arrayMap = new ArrayMap<>();
|
||||
i = arrayMap;
|
||||
j = arrayMap;
|
||||
arrayMap.put("android.media.metadata.TITLE", 1);
|
||||
arrayMap.put("android.media.metadata.ARTIST", 1);
|
||||
arrayMap.put("android.media.metadata.DURATION", 0);
|
||||
|
@ -58,12 +59,12 @@ public final class MediaMetadataCompat implements Parcelable {
|
|||
arrayMap.put("android.media.metadata.MEDIA_ID", 1);
|
||||
arrayMap.put("android.media.metadata.BT_FOLDER_TYPE", 0);
|
||||
arrayMap.put("android.media.metadata.MEDIA_URI", 1);
|
||||
arrayMap.put("android.media.metadata.ADVERTISEMENT", 0);
|
||||
arrayMap.put(MediaConstants.METADATA_KEY_IS_ADVERTISEMENT, 0);
|
||||
arrayMap.put("android.media.metadata.DOWNLOAD_STATUS", 0);
|
||||
}
|
||||
|
||||
public MediaMetadataCompat(Parcel parcel) {
|
||||
this.j = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
|
||||
this.k = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
|
@ -72,7 +73,7 @@ public final class MediaMetadataCompat implements Parcelable {
|
|||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i2) {
|
||||
parcel.writeBundle(this.j);
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
parcel.writeBundle(this.k);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import android.os.Parcelable;
|
|||
@SuppressLint({"BanParcelableUsage"})
|
||||
public final class RatingCompat implements Parcelable {
|
||||
public static final Parcelable.Creator<RatingCompat> CREATOR = new a();
|
||||
public final int i;
|
||||
public final float j;
|
||||
public final int j;
|
||||
public final float k;
|
||||
|
||||
public class a implements Parcelable.Creator<RatingCompat> {
|
||||
/* Return type fixed from 'java.lang.Object' to match base method */
|
||||
|
@ -24,28 +24,28 @@ public final class RatingCompat implements Parcelable {
|
|||
}
|
||||
|
||||
public RatingCompat(int i, float f) {
|
||||
this.i = i;
|
||||
this.j = f;
|
||||
this.j = i;
|
||||
this.k = f;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public int describeContents() {
|
||||
return this.i;
|
||||
return this.j;
|
||||
}
|
||||
|
||||
@Override // java.lang.Object
|
||||
public String toString() {
|
||||
StringBuilder L = c.d.b.a.a.L("Rating:style=");
|
||||
L.append(this.i);
|
||||
L.append(" rating=");
|
||||
float f = this.j;
|
||||
L.append(f < 0.0f ? "unrated" : String.valueOf(f));
|
||||
return L.toString();
|
||||
StringBuilder R = b.d.b.a.a.R("Rating:style=");
|
||||
R.append(this.j);
|
||||
R.append(" rating=");
|
||||
float f = this.k;
|
||||
R.append(f < 0.0f ? "unrated" : String.valueOf(f));
|
||||
return R.toString();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
parcel.writeInt(this.i);
|
||||
parcel.writeFloat(this.j);
|
||||
parcel.writeInt(this.j);
|
||||
parcel.writeFloat(this.k);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,36 +23,36 @@ import x.a.b.b.a.c;
|
|||
@RequiresApi(21)
|
||||
public class MediaControllerCompat$MediaControllerImplApi21 {
|
||||
public final MediaController a;
|
||||
public final Object b = new Object();
|
||||
@GuardedBy("mLock")
|
||||
|
||||
/* renamed from: c reason: collision with root package name */
|
||||
public final List<c> f11c = new ArrayList();
|
||||
/* renamed from: b reason: collision with root package name */
|
||||
public final Object f20b = new Object();
|
||||
@GuardedBy("mLock")
|
||||
public final List<c> c = new ArrayList();
|
||||
public HashMap<c, a> d = new HashMap<>();
|
||||
public final MediaSessionCompat.Token e;
|
||||
|
||||
public static class ExtraBinderRequestResultReceiver extends ResultReceiver {
|
||||
public WeakReference<MediaControllerCompat$MediaControllerImplApi21> i;
|
||||
public WeakReference<MediaControllerCompat$MediaControllerImplApi21> j;
|
||||
|
||||
public ExtraBinderRequestResultReceiver(MediaControllerCompat$MediaControllerImplApi21 mediaControllerCompat$MediaControllerImplApi21) {
|
||||
super(null);
|
||||
this.i = new WeakReference<>(mediaControllerCompat$MediaControllerImplApi21);
|
||||
this.j = new WeakReference<>(mediaControllerCompat$MediaControllerImplApi21);
|
||||
}
|
||||
|
||||
@Override // android.os.ResultReceiver
|
||||
public void onReceiveResult(int i, Bundle bundle) {
|
||||
MediaControllerCompat$MediaControllerImplApi21 mediaControllerCompat$MediaControllerImplApi21 = this.i.get();
|
||||
MediaControllerCompat$MediaControllerImplApi21 mediaControllerCompat$MediaControllerImplApi21 = this.j.get();
|
||||
if (mediaControllerCompat$MediaControllerImplApi21 != null && bundle != null) {
|
||||
synchronized (mediaControllerCompat$MediaControllerImplApi21.b) {
|
||||
synchronized (mediaControllerCompat$MediaControllerImplApi21.f20b) {
|
||||
MediaSessionCompat.Token token = mediaControllerCompat$MediaControllerImplApi21.e;
|
||||
b e = b.a.e(BundleCompat.getBinder(bundle, "android.support.v4.media.session.EXTRA_BINDER"));
|
||||
synchronized (token.i) {
|
||||
token.k = e;
|
||||
b c = b.a.c(BundleCompat.getBinder(bundle, "android.support.v4.media.session.EXTRA_BINDER"));
|
||||
synchronized (token.j) {
|
||||
token.l = c;
|
||||
}
|
||||
MediaSessionCompat.Token token2 = mediaControllerCompat$MediaControllerImplApi21.e;
|
||||
VersionedParcelable versionedParcelable = ParcelUtils.getVersionedParcelable(bundle, "android.support.v4.media.session.SESSION_TOKEN2");
|
||||
synchronized (token2.i) {
|
||||
token2.l = versionedParcelable;
|
||||
synchronized (token2.j) {
|
||||
token2.m = versionedParcelable;
|
||||
}
|
||||
mediaControllerCompat$MediaControllerImplApi21.a();
|
||||
}
|
||||
|
@ -66,39 +66,39 @@ public class MediaControllerCompat$MediaControllerImplApi21 {
|
|||
}
|
||||
|
||||
@Override // x.a.b.b.a.c.b, x.a.b.b.a.a
|
||||
public void T(CharSequence charSequence) throws RemoteException {
|
||||
public void U(CharSequence charSequence) throws RemoteException {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@Override // x.a.b.b.a.c.b, x.a.b.b.a.a
|
||||
public void U() throws RemoteException {
|
||||
public void W() throws RemoteException {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@Override // x.a.b.b.a.c.b, x.a.b.b.a.a
|
||||
public void V(MediaMetadataCompat mediaMetadataCompat) throws RemoteException {
|
||||
public void X(MediaMetadataCompat mediaMetadataCompat) throws RemoteException {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@Override // x.a.b.b.a.c.b, x.a.b.b.a.a
|
||||
public void x(Bundle bundle) throws RemoteException {
|
||||
public void s0(ParcelableVolumeInfo parcelableVolumeInfo) throws RemoteException {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@Override // x.a.b.b.a.c.b, x.a.b.b.a.a
|
||||
public void x0(ParcelableVolumeInfo parcelableVolumeInfo) throws RemoteException {
|
||||
public void y(Bundle bundle) throws RemoteException {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@Override // x.a.b.b.a.c.b, x.a.b.b.a.a
|
||||
public void y(List<MediaSessionCompat.QueueItem> list) throws RemoteException {
|
||||
public void z(List<MediaSessionCompat.QueueItem> list) throws RemoteException {
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
|
||||
public MediaControllerCompat$MediaControllerImplApi21(Context context, MediaSessionCompat.Token token) {
|
||||
this.e = token;
|
||||
MediaController mediaController = new MediaController(context, (MediaSession.Token) token.j);
|
||||
MediaController mediaController = new MediaController(context, (MediaSession.Token) token.k);
|
||||
this.a = mediaController;
|
||||
if (token.b() == null) {
|
||||
mediaController.sendCommand("android.support.v4.media.session.command.GET_EXTRA_BINDER", null, new ExtraBinderRequestResultReceiver(this));
|
||||
|
@ -108,17 +108,17 @@ public class MediaControllerCompat$MediaControllerImplApi21 {
|
|||
@GuardedBy("mLock")
|
||||
public void a() {
|
||||
if (this.e.b() != null) {
|
||||
for (c cVar : this.f11c) {
|
||||
for (c cVar : this.c) {
|
||||
a aVar = new a(cVar);
|
||||
this.d.put(cVar, aVar);
|
||||
cVar.a = aVar;
|
||||
try {
|
||||
this.e.b().j(aVar);
|
||||
this.e.b().k(aVar);
|
||||
} catch (RemoteException e) {
|
||||
Log.e("MediaControllerCompat", "Dead object in registerCallback.", e);
|
||||
}
|
||||
}
|
||||
this.f11c.clear();
|
||||
this.c.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package android.support.v4.media.session;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.media.MediaDescription;
|
||||
import android.media.session.MediaSession;
|
||||
import android.os.BadParcelableException;
|
||||
import android.os.Bundle;
|
||||
|
@ -9,18 +10,23 @@ import android.os.Parcelable;
|
|||
import android.os.ResultReceiver;
|
||||
import android.support.v4.media.MediaDescriptionCompat;
|
||||
import android.util.Log;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.GuardedBy;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.annotation.RestrictTo;
|
||||
import androidx.core.os.BuildCompat;
|
||||
import androidx.versionedparcelable.VersionedParcelable;
|
||||
import x.a.b.b.a.b;
|
||||
public class MediaSessionCompat {
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
||||
public static final int a = (BuildCompat.isAtLeastS() ? 33554432 : 0);
|
||||
|
||||
@SuppressLint({"BanParcelableUsage"})
|
||||
public static final class QueueItem implements Parcelable {
|
||||
public static final Parcelable.Creator<QueueItem> CREATOR = new a();
|
||||
public final MediaDescriptionCompat i;
|
||||
public final long j;
|
||||
public final MediaDescriptionCompat j;
|
||||
public final long k;
|
||||
|
||||
public class a implements Parcelable.Creator<QueueItem> {
|
||||
/* Return type fixed from 'java.lang.Object' to match base method */
|
||||
|
@ -36,20 +42,38 @@ public class MediaSessionCompat {
|
|||
}
|
||||
}
|
||||
|
||||
@RequiresApi(21)
|
||||
public static class b {
|
||||
@DoNotInline
|
||||
public static MediaSession.QueueItem a(MediaDescription mediaDescription, long j) {
|
||||
return new MediaSession.QueueItem(mediaDescription, j);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static MediaDescription b(MediaSession.QueueItem queueItem) {
|
||||
return queueItem.getDescription();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static long c(MediaSession.QueueItem queueItem) {
|
||||
return queueItem.getQueueId();
|
||||
}
|
||||
}
|
||||
|
||||
public QueueItem(MediaSession.QueueItem queueItem, MediaDescriptionCompat mediaDescriptionCompat, long j) {
|
||||
if (mediaDescriptionCompat == null) {
|
||||
throw new IllegalArgumentException("Description cannot be null");
|
||||
} else if (j != -1) {
|
||||
this.i = mediaDescriptionCompat;
|
||||
this.j = j;
|
||||
this.j = mediaDescriptionCompat;
|
||||
this.k = j;
|
||||
} else {
|
||||
throw new IllegalArgumentException("Id cannot be QueueItem.UNKNOWN_ID");
|
||||
}
|
||||
}
|
||||
|
||||
public QueueItem(Parcel parcel) {
|
||||
this.i = MediaDescriptionCompat.CREATOR.createFromParcel(parcel);
|
||||
this.j = parcel.readLong();
|
||||
this.j = MediaDescriptionCompat.CREATOR.createFromParcel(parcel);
|
||||
this.k = parcel.readLong();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
|
@ -59,23 +83,23 @@ public class MediaSessionCompat {
|
|||
|
||||
@Override // java.lang.Object
|
||||
public String toString() {
|
||||
StringBuilder L = c.d.b.a.a.L("MediaSession.QueueItem {Description=");
|
||||
L.append(this.i);
|
||||
L.append(", Id=");
|
||||
return c.d.b.a.a.A(L, this.j, " }");
|
||||
StringBuilder R = b.d.b.a.a.R("MediaSession.QueueItem {Description=");
|
||||
R.append(this.j);
|
||||
R.append(", Id=");
|
||||
return b.d.b.a.a.B(R, this.k, " }");
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
this.i.writeToParcel(parcel, i);
|
||||
parcel.writeLong(this.j);
|
||||
this.j.writeToParcel(parcel, i);
|
||||
parcel.writeLong(this.k);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint({"BanParcelableUsage"})
|
||||
public static final class ResultReceiverWrapper implements Parcelable {
|
||||
public static final Parcelable.Creator<ResultReceiverWrapper> CREATOR = new a();
|
||||
public ResultReceiver i;
|
||||
public ResultReceiver j;
|
||||
|
||||
public class a implements Parcelable.Creator<ResultReceiverWrapper> {
|
||||
/* Return type fixed from 'java.lang.Object' to match base method */
|
||||
|
@ -92,7 +116,7 @@ public class MediaSessionCompat {
|
|||
}
|
||||
|
||||
public ResultReceiverWrapper(Parcel parcel) {
|
||||
this.i = (ResultReceiver) ResultReceiver.CREATOR.createFromParcel(parcel);
|
||||
this.j = (ResultReceiver) ResultReceiver.CREATOR.createFromParcel(parcel);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
|
@ -102,19 +126,19 @@ public class MediaSessionCompat {
|
|||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
this.i.writeToParcel(parcel, i);
|
||||
this.j.writeToParcel(parcel, i);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint({"BanParcelableUsage"})
|
||||
public static final class Token implements Parcelable {
|
||||
public static final Parcelable.Creator<Token> CREATOR = new a();
|
||||
public final Object i = new Object();
|
||||
public final Object j;
|
||||
public final Object j = new Object();
|
||||
public final Object k;
|
||||
@GuardedBy("mLock")
|
||||
public b k;
|
||||
public b l;
|
||||
@GuardedBy("mLock")
|
||||
public VersionedParcelable l;
|
||||
public VersionedParcelable m;
|
||||
|
||||
public class a implements Parcelable.Creator<Token> {
|
||||
/* Return type fixed from 'java.lang.Object' to match base method */
|
||||
|
@ -131,13 +155,13 @@ public class MediaSessionCompat {
|
|||
}
|
||||
|
||||
public Token(Object obj) {
|
||||
this.j = obj;
|
||||
this.k = null;
|
||||
this.k = obj;
|
||||
this.l = null;
|
||||
}
|
||||
|
||||
public Token(Object obj, b bVar) {
|
||||
this.j = obj;
|
||||
this.k = bVar;
|
||||
this.k = obj;
|
||||
this.l = bVar;
|
||||
}
|
||||
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
||||
|
@ -154,8 +178,8 @@ public class MediaSessionCompat {
|
|||
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
||||
public b b() {
|
||||
b bVar;
|
||||
synchronized (this.i) {
|
||||
bVar = this.k;
|
||||
synchronized (this.j) {
|
||||
bVar = this.l;
|
||||
}
|
||||
return bVar;
|
||||
}
|
||||
|
@ -174,11 +198,11 @@ public class MediaSessionCompat {
|
|||
return false;
|
||||
}
|
||||
Token token = (Token) obj;
|
||||
Object obj2 = this.j;
|
||||
Object obj2 = this.k;
|
||||
if (obj2 == null) {
|
||||
return token.j == null;
|
||||
return token.k == null;
|
||||
}
|
||||
Object obj3 = token.j;
|
||||
Object obj3 = token.k;
|
||||
if (obj3 == null) {
|
||||
return false;
|
||||
}
|
||||
|
@ -187,7 +211,7 @@ public class MediaSessionCompat {
|
|||
|
||||
@Override // java.lang.Object
|
||||
public int hashCode() {
|
||||
Object obj = this.j;
|
||||
Object obj = this.k;
|
||||
if (obj == null) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -196,7 +220,7 @@ public class MediaSessionCompat {
|
|||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
parcel.writeParcelable((Parcelable) this.j, i);
|
||||
parcel.writeParcelable((Parcelable) this.k, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@ import android.os.Parcelable;
|
|||
@SuppressLint({"BanParcelableUsage"})
|
||||
public class ParcelableVolumeInfo implements Parcelable {
|
||||
public static final Parcelable.Creator<ParcelableVolumeInfo> CREATOR = new a();
|
||||
public int i;
|
||||
public int j;
|
||||
public int k;
|
||||
public int l;
|
||||
public int m;
|
||||
public int n;
|
||||
|
||||
public class a implements Parcelable.Creator<ParcelableVolumeInfo> {
|
||||
/* Return type fixed from 'java.lang.Object' to match base method */
|
||||
|
@ -27,11 +27,11 @@ public class ParcelableVolumeInfo implements Parcelable {
|
|||
}
|
||||
|
||||
public ParcelableVolumeInfo(Parcel parcel) {
|
||||
this.i = parcel.readInt();
|
||||
this.k = parcel.readInt();
|
||||
this.j = parcel.readInt();
|
||||
this.l = parcel.readInt();
|
||||
this.m = parcel.readInt();
|
||||
this.j = parcel.readInt();
|
||||
this.n = parcel.readInt();
|
||||
this.k = parcel.readInt();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
|
@ -41,10 +41,10 @@ public class ParcelableVolumeInfo implements Parcelable {
|
|||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
parcel.writeInt(this.i);
|
||||
parcel.writeInt(this.k);
|
||||
parcel.writeInt(this.j);
|
||||
parcel.writeInt(this.l);
|
||||
parcel.writeInt(this.m);
|
||||
parcel.writeInt(this.j);
|
||||
parcel.writeInt(this.n);
|
||||
parcel.writeInt(this.k);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,35 +1,38 @@
|
|||
package android.support.v4.media.session;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.media.session.PlaybackState;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
import androidx.annotation.DoNotInline;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@SuppressLint({"BanParcelableUsage"})
|
||||
public final class PlaybackStateCompat implements Parcelable {
|
||||
public static final Parcelable.Creator<PlaybackStateCompat> CREATOR = new a();
|
||||
public final int i;
|
||||
public final long j;
|
||||
public final int j;
|
||||
public final long k;
|
||||
public final float l;
|
||||
public final long m;
|
||||
public final int n;
|
||||
public final CharSequence o;
|
||||
public final long p;
|
||||
public List<CustomAction> q;
|
||||
public final long r;
|
||||
public final long l;
|
||||
public final float m;
|
||||
public final long n;
|
||||
public final int o;
|
||||
public final CharSequence p;
|
||||
public final long q;
|
||||
public List<CustomAction> r;
|
||||
|
||||
/* renamed from: s reason: collision with root package name */
|
||||
public final Bundle f12s;
|
||||
public final long f21s;
|
||||
public final Bundle t;
|
||||
|
||||
public static final class CustomAction implements Parcelable {
|
||||
public static final Parcelable.Creator<CustomAction> CREATOR = new a();
|
||||
public final String i;
|
||||
public final CharSequence j;
|
||||
public final int k;
|
||||
public final Bundle l;
|
||||
public final String j;
|
||||
public final CharSequence k;
|
||||
public final int l;
|
||||
public final Bundle m;
|
||||
|
||||
public class a implements Parcelable.Creator<CustomAction> {
|
||||
/* Return type fixed from 'java.lang.Object' to match base method */
|
||||
|
@ -46,17 +49,17 @@ public final class PlaybackStateCompat implements Parcelable {
|
|||
}
|
||||
|
||||
public CustomAction(Parcel parcel) {
|
||||
this.i = parcel.readString();
|
||||
this.j = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
|
||||
this.k = parcel.readInt();
|
||||
this.l = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
|
||||
this.j = parcel.readString();
|
||||
this.k = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
|
||||
this.l = parcel.readInt();
|
||||
this.m = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
|
||||
}
|
||||
|
||||
public CustomAction(String str, CharSequence charSequence, int i, Bundle bundle) {
|
||||
this.i = str;
|
||||
this.j = charSequence;
|
||||
this.k = i;
|
||||
this.l = bundle;
|
||||
this.j = str;
|
||||
this.k = charSequence;
|
||||
this.l = i;
|
||||
this.m = bundle;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
|
@ -66,21 +69,21 @@ public final class PlaybackStateCompat implements Parcelable {
|
|||
|
||||
@Override // java.lang.Object
|
||||
public String toString() {
|
||||
StringBuilder L = c.d.b.a.a.L("Action:mName='");
|
||||
L.append((Object) this.j);
|
||||
L.append(", mIcon=");
|
||||
L.append(this.k);
|
||||
L.append(", mExtras=");
|
||||
L.append(this.l);
|
||||
return L.toString();
|
||||
StringBuilder R = b.d.b.a.a.R("Action:mName='");
|
||||
R.append((Object) this.k);
|
||||
R.append(", mIcon=");
|
||||
R.append(this.l);
|
||||
R.append(", mExtras=");
|
||||
R.append(this.m);
|
||||
return R.toString();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
parcel.writeString(this.i);
|
||||
TextUtils.writeToParcel(this.j, parcel, i);
|
||||
parcel.writeInt(this.k);
|
||||
parcel.writeBundle(this.l);
|
||||
parcel.writeString(this.j);
|
||||
TextUtils.writeToParcel(this.k, parcel, i);
|
||||
parcel.writeInt(this.l);
|
||||
parcel.writeBundle(this.m);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,32 +101,168 @@ public final class PlaybackStateCompat implements Parcelable {
|
|||
}
|
||||
}
|
||||
|
||||
@RequiresApi(21)
|
||||
public static class b {
|
||||
@DoNotInline
|
||||
public static void a(PlaybackState.Builder builder, PlaybackState.CustomAction customAction) {
|
||||
builder.addCustomAction(customAction);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static PlaybackState.CustomAction b(PlaybackState.CustomAction.Builder builder) {
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static PlaybackState c(PlaybackState.Builder builder) {
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static PlaybackState.Builder d() {
|
||||
return new PlaybackState.Builder();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static PlaybackState.CustomAction.Builder e(String str, CharSequence charSequence, int i) {
|
||||
return new PlaybackState.CustomAction.Builder(str, charSequence, i);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static String f(PlaybackState.CustomAction customAction) {
|
||||
return customAction.getAction();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static long g(PlaybackState playbackState) {
|
||||
return playbackState.getActions();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static long h(PlaybackState playbackState) {
|
||||
return playbackState.getActiveQueueItemId();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static long i(PlaybackState playbackState) {
|
||||
return playbackState.getBufferedPosition();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static List<PlaybackState.CustomAction> j(PlaybackState playbackState) {
|
||||
return playbackState.getCustomActions();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static CharSequence k(PlaybackState playbackState) {
|
||||
return playbackState.getErrorMessage();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static Bundle l(PlaybackState.CustomAction customAction) {
|
||||
return customAction.getExtras();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static int m(PlaybackState.CustomAction customAction) {
|
||||
return customAction.getIcon();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static long n(PlaybackState playbackState) {
|
||||
return playbackState.getLastPositionUpdateTime();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static CharSequence o(PlaybackState.CustomAction customAction) {
|
||||
return customAction.getName();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static float p(PlaybackState playbackState) {
|
||||
return playbackState.getPlaybackSpeed();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static long q(PlaybackState playbackState) {
|
||||
return playbackState.getPosition();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static int r(PlaybackState playbackState) {
|
||||
return playbackState.getState();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void s(PlaybackState.Builder builder, long j) {
|
||||
builder.setActions(j);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void t(PlaybackState.Builder builder, long j) {
|
||||
builder.setActiveQueueItemId(j);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void u(PlaybackState.Builder builder, long j) {
|
||||
builder.setBufferedPosition(j);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void v(PlaybackState.Builder builder, CharSequence charSequence) {
|
||||
builder.setErrorMessage(charSequence);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void w(PlaybackState.CustomAction.Builder builder, Bundle bundle) {
|
||||
builder.setExtras(bundle);
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void x(PlaybackState.Builder builder, int i, long j, float f, long j2) {
|
||||
builder.setState(i, j, f, j2);
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(22)
|
||||
public static class c {
|
||||
@DoNotInline
|
||||
public static Bundle a(PlaybackState playbackState) {
|
||||
return playbackState.getExtras();
|
||||
}
|
||||
|
||||
@DoNotInline
|
||||
public static void b(PlaybackState.Builder builder, Bundle bundle) {
|
||||
builder.setExtras(bundle);
|
||||
}
|
||||
}
|
||||
|
||||
public PlaybackStateCompat(int i, long j, long j2, float f, long j3, int i2, CharSequence charSequence, long j4, List<CustomAction> list, long j5, Bundle bundle) {
|
||||
this.i = i;
|
||||
this.j = j;
|
||||
this.k = j2;
|
||||
this.l = f;
|
||||
this.m = j3;
|
||||
this.n = i2;
|
||||
this.o = charSequence;
|
||||
this.p = j4;
|
||||
this.q = new ArrayList(list);
|
||||
this.r = j5;
|
||||
this.f12s = bundle;
|
||||
this.j = i;
|
||||
this.k = j;
|
||||
this.l = j2;
|
||||
this.m = f;
|
||||
this.n = j3;
|
||||
this.o = i2;
|
||||
this.p = charSequence;
|
||||
this.q = j4;
|
||||
this.r = new ArrayList(list);
|
||||
this.f21s = j5;
|
||||
this.t = bundle;
|
||||
}
|
||||
|
||||
public PlaybackStateCompat(Parcel parcel) {
|
||||
this.i = parcel.readInt();
|
||||
this.j = parcel.readLong();
|
||||
this.l = parcel.readFloat();
|
||||
this.p = parcel.readLong();
|
||||
this.j = parcel.readInt();
|
||||
this.k = parcel.readLong();
|
||||
this.m = parcel.readLong();
|
||||
this.o = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
|
||||
this.q = parcel.createTypedArrayList(CustomAction.CREATOR);
|
||||
this.r = parcel.readLong();
|
||||
this.f12s = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
|
||||
this.n = parcel.readInt();
|
||||
this.m = parcel.readFloat();
|
||||
this.q = parcel.readLong();
|
||||
this.l = parcel.readLong();
|
||||
this.n = parcel.readLong();
|
||||
this.p = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
|
||||
this.r = parcel.createTypedArrayList(CustomAction.CREATOR);
|
||||
this.f21s = parcel.readLong();
|
||||
this.t = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
|
||||
this.o = parcel.readInt();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
|
@ -135,39 +274,39 @@ public final class PlaybackStateCompat implements Parcelable {
|
|||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("PlaybackState {");
|
||||
sb.append("state=");
|
||||
sb.append(this.i);
|
||||
sb.append(", position=");
|
||||
sb.append(this.j);
|
||||
sb.append(", buffered position=");
|
||||
sb.append(", position=");
|
||||
sb.append(this.k);
|
||||
sb.append(", speed=");
|
||||
sb.append(", buffered position=");
|
||||
sb.append(this.l);
|
||||
sb.append(", updated=");
|
||||
sb.append(this.p);
|
||||
sb.append(", actions=");
|
||||
sb.append(", speed=");
|
||||
sb.append(this.m);
|
||||
sb.append(", error code=");
|
||||
sb.append(this.n);
|
||||
sb.append(", error message=");
|
||||
sb.append(this.o);
|
||||
sb.append(", custom actions=");
|
||||
sb.append(", updated=");
|
||||
sb.append(this.q);
|
||||
sb.append(", actions=");
|
||||
sb.append(this.n);
|
||||
sb.append(", error code=");
|
||||
sb.append(this.o);
|
||||
sb.append(", error message=");
|
||||
sb.append(this.p);
|
||||
sb.append(", custom actions=");
|
||||
sb.append(this.r);
|
||||
sb.append(", active item id=");
|
||||
return c.d.b.a.a.A(sb, this.r, "}");
|
||||
return b.d.b.a.a.B(sb, this.f21s, "}");
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
parcel.writeInt(this.i);
|
||||
parcel.writeLong(this.j);
|
||||
parcel.writeFloat(this.l);
|
||||
parcel.writeLong(this.p);
|
||||
parcel.writeInt(this.j);
|
||||
parcel.writeLong(this.k);
|
||||
parcel.writeLong(this.m);
|
||||
TextUtils.writeToParcel(this.o, parcel, i);
|
||||
parcel.writeTypedList(this.q);
|
||||
parcel.writeLong(this.r);
|
||||
parcel.writeBundle(this.f12s);
|
||||
parcel.writeInt(this.n);
|
||||
parcel.writeFloat(this.m);
|
||||
parcel.writeLong(this.q);
|
||||
parcel.writeLong(this.l);
|
||||
parcel.writeLong(this.n);
|
||||
TextUtils.writeToParcel(this.p, parcel, i);
|
||||
parcel.writeTypedList(this.r);
|
||||
parcel.writeLong(this.f21s);
|
||||
parcel.writeBundle(this.t);
|
||||
parcel.writeInt(this.o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import x.a.b.c.a;
|
|||
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
|
||||
public class ResultReceiver implements Parcelable {
|
||||
public static final Parcelable.Creator<ResultReceiver> CREATOR = new a();
|
||||
public x.a.b.c.a i;
|
||||
public x.a.b.c.a j;
|
||||
|
||||
public class a implements Parcelable.Creator<ResultReceiver> {
|
||||
/* Return type fixed from 'java.lang.Object' to match base method */
|
||||
|
@ -30,12 +30,12 @@ public class ResultReceiver implements Parcelable {
|
|||
}
|
||||
}
|
||||
|
||||
public class b extends a.AbstractBinderC0355a {
|
||||
public class b extends a.AbstractBinderC0358a {
|
||||
public b() {
|
||||
}
|
||||
|
||||
@Override // x.a.b.c.a
|
||||
public void w0(int i, Bundle bundle) {
|
||||
public void r0(int i, Bundle bundle) {
|
||||
Objects.requireNonNull(ResultReceiver.this);
|
||||
ResultReceiver.this.a(i, bundle);
|
||||
}
|
||||
|
@ -44,24 +44,24 @@ public class ResultReceiver implements Parcelable {
|
|||
public ResultReceiver(Parcel parcel) {
|
||||
x.a.b.c.a aVar;
|
||||
IBinder readStrongBinder = parcel.readStrongBinder();
|
||||
int i = a.AbstractBinderC0355a.a;
|
||||
int i = a.AbstractBinderC0358a.a;
|
||||
if (readStrongBinder == null) {
|
||||
aVar = null;
|
||||
} else {
|
||||
IInterface queryLocalInterface = readStrongBinder.queryLocalInterface("android.support.v4.os.IResultReceiver");
|
||||
aVar = (queryLocalInterface == null || !(queryLocalInterface instanceof x.a.b.c.a)) ? new a.AbstractBinderC0355a.C0356a(readStrongBinder) : (x.a.b.c.a) queryLocalInterface;
|
||||
aVar = (queryLocalInterface == null || !(queryLocalInterface instanceof x.a.b.c.a)) ? new a.AbstractBinderC0358a.C0359a(readStrongBinder) : (x.a.b.c.a) queryLocalInterface;
|
||||
}
|
||||
this.i = aVar;
|
||||
this.j = aVar;
|
||||
}
|
||||
|
||||
public void a(int i, Bundle bundle) {
|
||||
}
|
||||
|
||||
public void b(int i, Bundle bundle) {
|
||||
x.a.b.c.a aVar = this.i;
|
||||
x.a.b.c.a aVar = this.j;
|
||||
if (aVar != null) {
|
||||
try {
|
||||
aVar.w0(i, bundle);
|
||||
aVar.r0(i, bundle);
|
||||
} catch (RemoteException unused) {
|
||||
}
|
||||
}
|
||||
|
@ -75,10 +75,10 @@ public class ResultReceiver implements Parcelable {
|
|||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
synchronized (this) {
|
||||
if (this.i == null) {
|
||||
this.i = new b();
|
||||
if (this.j == null) {
|
||||
this.j = new b();
|
||||
}
|
||||
parcel.writeStrongBinder(this.i.asBinder());
|
||||
parcel.writeStrongBinder(this.j.asBinder());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import androidx.activity.result.ActivityResultRegistry;
|
|||
import androidx.activity.result.ActivityResultRegistryOwner;
|
||||
import androidx.activity.result.IntentSenderRequest;
|
||||
import androidx.activity.result.contract.ActivityResultContract;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.ContentView;
|
||||
import androidx.annotation.LayoutRes;
|
||||
|
@ -48,7 +49,7 @@ import androidx.savedstate.SavedStateRegistryController;
|
|||
import androidx.savedstate.SavedStateRegistryOwner;
|
||||
import androidx.savedstate.ViewTreeSavedStateRegistryOwner;
|
||||
import androidx.tracing.Trace;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
public class ComponentActivity extends androidx.core.app.ComponentActivity implements ContextAware, LifecycleOwner, ViewModelStoreOwner, HasDefaultViewModelProviderFactory, SavedStateRegistryOwner, OnBackPressedDispatcherOwner, ActivityResultRegistryOwner, ActivityResultCaller {
|
||||
|
@ -111,7 +112,7 @@ public class ComponentActivity extends androidx.core.app.ComponentActivity imple
|
|||
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
AnonymousClass2.this.dispatchResult(this.val$requestCode, 0, new Intent().setAction("androidx.activity.result.contract.action.INTENT_SENDER_REQUEST").putExtra("androidx.activity.result.contract.extra.SEND_INTENT_EXCEPTION", this.val$e));
|
||||
AnonymousClass2.this.dispatchResult(this.val$requestCode, 0, new Intent().setAction(ActivityResultContracts.StartIntentSenderForResult.ACTION_INTENT_SENDER_REQUEST).putExtra(ActivityResultContracts.StartIntentSenderForResult.EXTRA_SEND_INTENT_EXCEPTION, this.val$e));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,14 +129,14 @@ public class ComponentActivity extends androidx.core.app.ComponentActivity imple
|
|||
}
|
||||
Intent createIntent = activityResultContract.createIntent(componentActivity, i2);
|
||||
Bundle bundle = null;
|
||||
if (createIntent.hasExtra("androidx.activity.result.contract.extra.ACTIVITY_OPTIONS_BUNDLE")) {
|
||||
bundle = createIntent.getBundleExtra("androidx.activity.result.contract.extra.ACTIVITY_OPTIONS_BUNDLE");
|
||||
createIntent.removeExtra("androidx.activity.result.contract.extra.ACTIVITY_OPTIONS_BUNDLE");
|
||||
if (createIntent.hasExtra(ActivityResultContracts.StartActivityForResult.EXTRA_ACTIVITY_OPTIONS_BUNDLE)) {
|
||||
bundle = createIntent.getBundleExtra(ActivityResultContracts.StartActivityForResult.EXTRA_ACTIVITY_OPTIONS_BUNDLE);
|
||||
createIntent.removeExtra(ActivityResultContracts.StartActivityForResult.EXTRA_ACTIVITY_OPTIONS_BUNDLE);
|
||||
} else if (activityOptionsCompat != null) {
|
||||
bundle = activityOptionsCompat.toBundle();
|
||||
}
|
||||
if ("androidx.activity.result.contract.action.REQUEST_PERMISSIONS".equals(createIntent.getAction())) {
|
||||
String[] stringArrayExtra = createIntent.getStringArrayExtra("androidx.activity.result.contract.extra.PERMISSIONS");
|
||||
if (ActivityResultContracts.RequestMultiplePermissions.ACTION_REQUEST_PERMISSIONS.equals(createIntent.getAction())) {
|
||||
String[] stringArrayExtra = createIntent.getStringArrayExtra(ActivityResultContracts.RequestMultiplePermissions.EXTRA_PERMISSIONS);
|
||||
if (stringArrayExtra != null) {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (String str : stringArrayExtra) {
|
||||
|
@ -147,8 +148,8 @@ public class ComponentActivity extends androidx.core.app.ComponentActivity imple
|
|||
ActivityCompat.requestPermissions(componentActivity, (String[]) arrayList.toArray(new String[0]), i);
|
||||
}
|
||||
}
|
||||
} else if ("androidx.activity.result.contract.action.INTENT_SENDER_REQUEST".equals(createIntent.getAction())) {
|
||||
IntentSenderRequest intentSenderRequest = (IntentSenderRequest) createIntent.getParcelableExtra("androidx.activity.result.contract.extra.INTENT_SENDER_REQUEST");
|
||||
} else if (ActivityResultContracts.StartIntentSenderForResult.ACTION_INTENT_SENDER_REQUEST.equals(createIntent.getAction())) {
|
||||
IntentSenderRequest intentSenderRequest = (IntentSenderRequest) createIntent.getParcelableExtra(ActivityResultContracts.StartIntentSenderForResult.EXTRA_INTENT_SENDER_REQUEST);
|
||||
try {
|
||||
ActivityCompat.startIntentSenderForResult(componentActivity, intentSenderRequest.getIntentSender(), i, intentSenderRequest.getFillInIntent(), intentSenderRequest.getFlagsMask(), intentSenderRequest.getFlagsValues(), 0, bundle);
|
||||
} catch (IntentSender.SendIntentException e) {
|
||||
|
@ -358,7 +359,7 @@ public class ComponentActivity extends androidx.core.app.ComponentActivity imple
|
|||
@CallSuper
|
||||
@Deprecated
|
||||
public void onRequestPermissionsResult(int i, @NonNull String[] strArr, @NonNull int[] iArr) {
|
||||
if (!this.mActivityResultRegistry.dispatchResult(i, -1, new Intent().putExtra("androidx.activity.result.contract.extra.PERMISSIONS", strArr).putExtra("androidx.activity.result.contract.extra.PERMISSION_GRANT_RESULTS", iArr)) && Build.VERSION.SDK_INT >= 23) {
|
||||
if (!this.mActivityResultRegistry.dispatchResult(i, -1, new Intent().putExtra(ActivityResultContracts.RequestMultiplePermissions.EXTRA_PERMISSIONS, strArr).putExtra(ActivityResultContracts.RequestMultiplePermissions.EXTRA_PERMISSION_GRANT_RESULTS, iArr)) && Build.VERSION.SDK_INT >= 23) {
|
||||
super.onRequestPermissionsResult(i, strArr, iArr);
|
||||
}
|
||||
}
|
||||
|
@ -414,9 +415,9 @@ public class ComponentActivity extends androidx.core.app.ComponentActivity imple
|
|||
@Override // androidx.activity.result.ActivityResultCaller
|
||||
@NonNull
|
||||
public final <I, O> ActivityResultLauncher<I> registerForActivityResult(@NonNull ActivityResultContract<I, O> activityResultContract, @NonNull ActivityResultRegistry activityResultRegistry, @NonNull ActivityResultCallback<O> activityResultCallback) {
|
||||
StringBuilder L = a.L("activity_rq#");
|
||||
L.append(this.mNextLocalRequestCode.getAndIncrement());
|
||||
return activityResultRegistry.register(L.toString(), this, activityResultContract, activityResultCallback);
|
||||
StringBuilder R = a.R("activity_rq#");
|
||||
R.append(this.mNextLocalRequestCode.getAndIncrement());
|
||||
return activityResultRegistry.register(R.toString(), this, activityResultContract, activityResultCallback);
|
||||
}
|
||||
|
||||
@Override // androidx.activity.contextaware.ContextAware
|
||||
|
|
|
@ -24,11 +24,11 @@ public final class ContextAwareKt$withContextAvailable$$inlined$suspendCancellab
|
|||
m.checkNotNullParameter(context, "context");
|
||||
CancellableContinuation cancellableContinuation = this.$co;
|
||||
try {
|
||||
k.a aVar = k.i;
|
||||
obj = k.m78constructorimpl(this.$onContextAvailable$inlined.invoke(context));
|
||||
k.a aVar = k.j;
|
||||
obj = k.m72constructorimpl(this.$onContextAvailable$inlined.invoke(context));
|
||||
} catch (Throwable th) {
|
||||
k.a aVar2 = k.i;
|
||||
obj = k.m78constructorimpl(l.createFailure(th));
|
||||
k.a aVar2 = k.j;
|
||||
obj = k.m72constructorimpl(l.createFailure(th));
|
||||
}
|
||||
cancellableContinuation.resumeWith(obj);
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package androidx.activity.contextaware;
|
||||
|
||||
import android.content.Context;
|
||||
import d0.w.g.b;
|
||||
import d0.w.g.c;
|
||||
import d0.w.h.a.g;
|
||||
import d0.z.d.l;
|
||||
import d0.w.h.b;
|
||||
import d0.w.h.c;
|
||||
import d0.w.i.a.g;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import s.a.j;
|
||||
import s.a.l;
|
||||
/* compiled from: ContextAware.kt */
|
||||
public final class ContextAwareKt {
|
||||
public static final <R> Object withContextAvailable(ContextAware contextAware, Function1<? super Context, ? extends R> function1, Continuation<? super R> continuation) {
|
||||
|
@ -15,12 +14,12 @@ public final class ContextAwareKt {
|
|||
if (peekAvailableContext != null) {
|
||||
return function1.invoke(peekAvailableContext);
|
||||
}
|
||||
j jVar = new j(b.intercepted(continuation), 1);
|
||||
jVar.A();
|
||||
ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1 contextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1 = new ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1(jVar, contextAware, function1);
|
||||
l lVar = new l(b.intercepted(continuation), 1);
|
||||
lVar.A();
|
||||
ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1 contextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1 = new ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1(lVar, contextAware, function1);
|
||||
contextAware.addOnContextAvailableListener(contextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1);
|
||||
jVar.e(new ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$2(contextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1, contextAware, function1));
|
||||
Object u = jVar.u();
|
||||
lVar.f(new ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$2(contextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1, contextAware, function1));
|
||||
Object u = lVar.u();
|
||||
if (u != c.getCOROUTINE_SUSPENDED()) {
|
||||
return u;
|
||||
}
|
||||
|
@ -33,17 +32,17 @@ public final class ContextAwareKt {
|
|||
if (peekAvailableContext != null) {
|
||||
return function1.invoke(peekAvailableContext);
|
||||
}
|
||||
l.mark(0);
|
||||
j jVar = new j(b.intercepted(continuation), 1);
|
||||
jVar.A();
|
||||
ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1 contextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1 = new ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1(jVar, contextAware, function1);
|
||||
d0.z.d.l.mark(0);
|
||||
l lVar = new l(b.intercepted(continuation), 1);
|
||||
lVar.A();
|
||||
ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1 contextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1 = new ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1(lVar, contextAware, function1);
|
||||
contextAware.addOnContextAvailableListener(contextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1);
|
||||
jVar.e(new ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$2(contextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1, contextAware, function1));
|
||||
Object u = jVar.u();
|
||||
lVar.f(new ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$2(contextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1, contextAware, function1));
|
||||
Object u = lVar.u();
|
||||
if (u == c.getCOROUTINE_SUSPENDED()) {
|
||||
g.probeCoroutineSuspended(continuation);
|
||||
}
|
||||
l.mark(1);
|
||||
d0.z.d.l.mark(1);
|
||||
return u;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import android.os.Parcel;
|
|||
import android.os.Parcelable;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
@SuppressLint({"BanParcelableUsage"})
|
||||
public final class ActivityResult implements Parcelable {
|
||||
@NonNull
|
||||
|
@ -59,12 +59,12 @@ public final class ActivityResult implements Parcelable {
|
|||
|
||||
@Override // java.lang.Object
|
||||
public String toString() {
|
||||
StringBuilder L = a.L("ActivityResult{resultCode=");
|
||||
L.append(resultCodeToString(this.mResultCode));
|
||||
L.append(", data=");
|
||||
L.append(this.mData);
|
||||
L.append('}');
|
||||
return L.toString();
|
||||
StringBuilder R = a.R("ActivityResult{resultCode=");
|
||||
R.append(resultCodeToString(this.mResultCode));
|
||||
R.append(", data=");
|
||||
R.append(this.mData);
|
||||
R.append('}');
|
||||
return R.toString();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
|
|
|
@ -12,7 +12,7 @@ import androidx.core.app.ActivityOptionsCompat;
|
|||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.lifecycle.LifecycleEventObserver;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
@ -225,24 +225,24 @@ public abstract class ActivityResultRegistry {
|
|||
|
||||
public final void onRestoreInstanceState(@Nullable Bundle bundle) {
|
||||
if (bundle != null) {
|
||||
ArrayList<Integer> integerArrayList = bundle.getIntegerArrayList("KEY_COMPONENT_ACTIVITY_REGISTERED_RCS");
|
||||
ArrayList<String> stringArrayList = bundle.getStringArrayList("KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS");
|
||||
ArrayList<Integer> integerArrayList = bundle.getIntegerArrayList(KEY_COMPONENT_ACTIVITY_REGISTERED_RCS);
|
||||
ArrayList<String> stringArrayList = bundle.getStringArrayList(KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS);
|
||||
if (!(stringArrayList == null || integerArrayList == null)) {
|
||||
int size = stringArrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
bindRcKey(integerArrayList.get(i).intValue(), stringArrayList.get(i));
|
||||
}
|
||||
this.mRandom = (Random) bundle.getSerializable("KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT");
|
||||
this.mPendingResults.putAll(bundle.getBundle("KEY_COMPONENT_ACTIVITY_PENDING_RESULT"));
|
||||
this.mRandom = (Random) bundle.getSerializable(KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT);
|
||||
this.mPendingResults.putAll(bundle.getBundle(KEY_COMPONENT_ACTIVITY_PENDING_RESULTS));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void onSaveInstanceState(@NonNull Bundle bundle) {
|
||||
bundle.putIntegerArrayList("KEY_COMPONENT_ACTIVITY_REGISTERED_RCS", new ArrayList<>(this.mRcToKey.keySet()));
|
||||
bundle.putStringArrayList("KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS", new ArrayList<>(this.mRcToKey.values()));
|
||||
bundle.putBundle("KEY_COMPONENT_ACTIVITY_PENDING_RESULT", (Bundle) this.mPendingResults.clone());
|
||||
bundle.putSerializable("KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT", this.mRandom);
|
||||
bundle.putIntegerArrayList(KEY_COMPONENT_ACTIVITY_REGISTERED_RCS, new ArrayList<>(this.mRcToKey.keySet()));
|
||||
bundle.putStringArrayList(KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS, new ArrayList<>(this.mRcToKey.values()));
|
||||
bundle.putBundle(KEY_COMPONENT_ACTIVITY_PENDING_RESULTS, (Bundle) this.mPendingResults.clone());
|
||||
bundle.putSerializable(KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT, this.mRandom);
|
||||
}
|
||||
|
||||
/* JADX DEBUG: Multi-variable search result rejected for r6v0, resolved type: androidx.activity.result.ActivityResultCallback<O> */
|
||||
|
@ -288,15 +288,15 @@ public abstract class ActivityResultRegistry {
|
|||
}
|
||||
this.mKeyToCallback.remove(str);
|
||||
if (this.mParsedPendingResults.containsKey(str)) {
|
||||
StringBuilder Q = a.Q("Dropping pending result for request ", str, ": ");
|
||||
Q.append(this.mParsedPendingResults.get(str));
|
||||
Log.w("ActivityResultRegistry", Q.toString());
|
||||
StringBuilder W = a.W("Dropping pending result for request ", str, ": ");
|
||||
W.append(this.mParsedPendingResults.get(str));
|
||||
Log.w(LOG_TAG, W.toString());
|
||||
this.mParsedPendingResults.remove(str);
|
||||
}
|
||||
if (this.mPendingResults.containsKey(str)) {
|
||||
StringBuilder Q2 = a.Q("Dropping pending result for request ", str, ": ");
|
||||
Q2.append(this.mPendingResults.getParcelable(str));
|
||||
Log.w("ActivityResultRegistry", Q2.toString());
|
||||
StringBuilder W2 = a.W("Dropping pending result for request ", str, ": ");
|
||||
W2.append(this.mPendingResults.getParcelable(str));
|
||||
Log.w(LOG_TAG, W2.toString());
|
||||
this.mPendingResults.remove(str);
|
||||
}
|
||||
LifecycleContainer lifecycleContainer = this.mKeyToLifecycleContainers.get(str);
|
||||
|
|
|
@ -202,7 +202,7 @@ public final class ActivityResultContracts {
|
|||
|
||||
@NonNull
|
||||
public static Intent createIntent(@NonNull String[] strArr) {
|
||||
return new Intent("androidx.activity.result.contract.action.REQUEST_PERMISSIONS").putExtra("androidx.activity.result.contract.extra.PERMISSIONS", strArr);
|
||||
return new Intent(ACTION_REQUEST_PERMISSIONS).putExtra(EXTRA_PERMISSIONS, strArr);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
@ -239,8 +239,8 @@ public final class ActivityResultContracts {
|
|||
if (intent == null) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
String[] stringArrayExtra = intent.getStringArrayExtra("androidx.activity.result.contract.extra.PERMISSIONS");
|
||||
int[] intArrayExtra = intent.getIntArrayExtra("androidx.activity.result.contract.extra.PERMISSION_GRANT_RESULTS");
|
||||
String[] stringArrayExtra = intent.getStringArrayExtra(EXTRA_PERMISSIONS);
|
||||
int[] intArrayExtra = intent.getIntArrayExtra(EXTRA_PERMISSION_GRANT_RESULTS);
|
||||
if (intArrayExtra == null || stringArrayExtra == null) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ public final class ActivityResultContracts {
|
|||
if (intent == null || i != -1) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
int[] intArrayExtra = intent.getIntArrayExtra("androidx.activity.result.contract.extra.PERMISSION_GRANT_RESULTS");
|
||||
int[] intArrayExtra = intent.getIntArrayExtra(RequestMultiplePermissions.EXTRA_PERMISSION_GRANT_RESULTS);
|
||||
if (intArrayExtra == null || intArrayExtra.length == 0) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ public final class ActivityResultContracts {
|
|||
|
||||
@NonNull
|
||||
public Intent createIntent(@NonNull Context context, @NonNull IntentSenderRequest intentSenderRequest) {
|
||||
return new Intent("androidx.activity.result.contract.action.INTENT_SENDER_REQUEST").putExtra("androidx.activity.result.contract.extra.INTENT_SENDER_REQUEST", intentSenderRequest);
|
||||
return new Intent(ACTION_INTENT_SENDER_REQUEST).putExtra(EXTRA_INTENT_SENDER_REQUEST, intentSenderRequest);
|
||||
}
|
||||
|
||||
@Override // androidx.activity.result.contract.ActivityResultContract
|
||||
|
|
13
app/src/main/java/androidx/annotation/OptIn.java
Normal file
|
@ -0,0 +1,13 @@
|
|||
package androidx.annotation;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
/* compiled from: OptIn.kt */
|
||||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE})
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface OptIn {
|
||||
Class<? extends Annotation>[] markerClass();
|
||||
}
|
19
app/src/main/java/androidx/annotation/RequiresOptIn.java
Normal file
|
@ -0,0 +1,19 @@
|
|||
package androidx.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
/* compiled from: RequiresOptIn.kt */
|
||||
@Target({ElementType.ANNOTATION_TYPE})
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface RequiresOptIn {
|
||||
|
||||
/* compiled from: RequiresOptIn.kt */
|
||||
public enum Level {
|
||||
WARNING,
|
||||
ERROR
|
||||
}
|
||||
|
||||
Level level() default Level.ERROR;
|
||||
}
|
|
@ -4,10 +4,12 @@ import java.lang.annotation.ElementType;
|
|||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
/* compiled from: Experimental.kt */
|
||||
@Target({ElementType.ANNOTATION_TYPE})
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface Experimental {
|
||||
|
||||
/* compiled from: Experimental.kt */
|
||||
public enum Level {
|
||||
WARNING,
|
||||
ERROR
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
package androidx.annotation.experimental;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.PACKAGE})
|
||||
/* compiled from: UseExperimental.kt */
|
||||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE})
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface UseExperimental {
|
||||
Class<?> markerClass();
|
||||
Class<? extends Annotation>[] markerClass();
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ import androidx.annotation.StringRes;
|
|||
import androidx.appcompat.app.ActionBarDrawerToggleHoneycomb;
|
||||
import androidx.appcompat.graphics.drawable.DrawerArrowDrawable;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
public class ActionBarDrawerToggle implements DrawerLayout.DrawerListener {
|
||||
private final Delegate mActivityImpl;
|
||||
|
@ -278,7 +279,7 @@ public class ActionBarDrawerToggle implements DrawerLayout.DrawerListener {
|
|||
public void setDrawerIndicatorEnabled(boolean z2) {
|
||||
if (z2 != this.mDrawerIndicatorEnabled) {
|
||||
if (z2) {
|
||||
setActionBarUpIndicator(this.mSlider, this.mDrawerLayout.isDrawerOpen(8388611) ? this.mCloseDrawerContentDescRes : this.mOpenDrawerContentDescRes);
|
||||
setActionBarUpIndicator(this.mSlider, this.mDrawerLayout.isDrawerOpen(GravityCompat.START) ? this.mCloseDrawerContentDescRes : this.mOpenDrawerContentDescRes);
|
||||
} else {
|
||||
setActionBarUpIndicator(this.mHomeAsUpIndicator, 0);
|
||||
}
|
||||
|
@ -315,22 +316,22 @@ public class ActionBarDrawerToggle implements DrawerLayout.DrawerListener {
|
|||
}
|
||||
|
||||
public void syncState() {
|
||||
if (this.mDrawerLayout.isDrawerOpen(8388611)) {
|
||||
if (this.mDrawerLayout.isDrawerOpen(GravityCompat.START)) {
|
||||
setPosition(1.0f);
|
||||
} else {
|
||||
setPosition(0.0f);
|
||||
}
|
||||
if (this.mDrawerIndicatorEnabled) {
|
||||
setActionBarUpIndicator(this.mSlider, this.mDrawerLayout.isDrawerOpen(8388611) ? this.mCloseDrawerContentDescRes : this.mOpenDrawerContentDescRes);
|
||||
setActionBarUpIndicator(this.mSlider, this.mDrawerLayout.isDrawerOpen(GravityCompat.START) ? this.mCloseDrawerContentDescRes : this.mOpenDrawerContentDescRes);
|
||||
}
|
||||
}
|
||||
|
||||
public void toggle() {
|
||||
int drawerLockMode = this.mDrawerLayout.getDrawerLockMode(8388611);
|
||||
if (this.mDrawerLayout.isDrawerVisible(8388611) && drawerLockMode != 2) {
|
||||
this.mDrawerLayout.closeDrawer(8388611);
|
||||
int drawerLockMode = this.mDrawerLayout.getDrawerLockMode(GravityCompat.START);
|
||||
if (this.mDrawerLayout.isDrawerVisible(GravityCompat.START) && drawerLockMode != 2) {
|
||||
this.mDrawerLayout.closeDrawer(GravityCompat.START);
|
||||
} else if (drawerLockMode != 1) {
|
||||
this.mDrawerLayout.openDrawer(8388611);
|
||||
this.mDrawerLayout.openDrawer(GravityCompat.START);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class ActionBarDrawerToggleHoneycomb {
|
|||
try {
|
||||
setIndicatorInfo.setHomeActionContentDescription.invoke(activity.getActionBar(), Integer.valueOf(i));
|
||||
} catch (Exception e) {
|
||||
Log.w("ActionBarDrawerToggleHC", "Couldn't set content description via JB-MR2 API", e);
|
||||
Log.w(TAG, "Couldn't set content description via JB-MR2 API", e);
|
||||
}
|
||||
}
|
||||
return setIndicatorInfo;
|
||||
|
@ -70,14 +70,14 @@ public class ActionBarDrawerToggleHoneycomb {
|
|||
setIndicatorInfo.setHomeAsUpIndicator.invoke(actionBar, drawable);
|
||||
setIndicatorInfo.setHomeActionContentDescription.invoke(actionBar, Integer.valueOf(i));
|
||||
} catch (Exception e) {
|
||||
Log.w("ActionBarDrawerToggleHC", "Couldn't set home-as-up indicator via JB-MR2 API", e);
|
||||
Log.w(TAG, "Couldn't set home-as-up indicator via JB-MR2 API", e);
|
||||
}
|
||||
} else {
|
||||
ImageView imageView = setIndicatorInfo.upIndicatorView;
|
||||
if (imageView != null) {
|
||||
imageView.setImageDrawable(drawable);
|
||||
} else {
|
||||
Log.w("ActionBarDrawerToggleHC", "Couldn't set home-as-up indicator");
|
||||
Log.w(TAG, "Couldn't set home-as-up indicator");
|
||||
}
|
||||
}
|
||||
return setIndicatorInfo;
|
||||
|
|
|
@ -805,8 +805,8 @@ public class AlertController {
|
|||
i4 = 2;
|
||||
}
|
||||
int i5 = z3 ? 1 : 0;
|
||||
char c = z3 ? 1 : 0;
|
||||
char c2 = z3 ? 1 : 0;
|
||||
char c3 = z3 ? 1 : 0;
|
||||
setScrollIndicators(resolvePanel2, view2, i5 | i4, 3);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ public abstract class AppCompatDelegate {
|
|||
|
||||
public static void setDefaultNightMode(int i) {
|
||||
if (i != -1 && i != 0 && i != 1 && i != 2 && i != 3) {
|
||||
Log.d("AppCompatDelegate", "setDefaultNightMode() called with an unknown mode");
|
||||
Log.d(TAG, "setDefaultNightMode() called with an unknown mode");
|
||||
} else if (sDefaultNightMode != i) {
|
||||
sDefaultNightMode = i;
|
||||
applyDayNightToActiveDelegates();
|
||||
|
|
|
@ -87,6 +87,7 @@ import androidx.core.util.ObjectsCompat;
|
|||
import androidx.core.view.KeyEventDispatcher;
|
||||
import androidx.core.view.LayoutInflaterCompat;
|
||||
import androidx.core.view.OnApplyWindowInsetsListener;
|
||||
import androidx.core.view.PointerIconCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.ViewPropertyAnimatorCompat;
|
||||
import androidx.core.view.ViewPropertyAnimatorListenerAdapter;
|
||||
|
@ -94,9 +95,10 @@ import androidx.core.view.WindowInsetsCompat;
|
|||
import androidx.core.widget.PopupWindowCompat;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import java.lang.Thread;
|
||||
import java.util.List;
|
||||
import org.webrtc.MediaStreamTrack;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
||||
public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuilder.Callback, LayoutInflater.Factory2 {
|
||||
|
@ -176,7 +178,7 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
|
|||
@Override // java.lang.Thread.UncaughtExceptionHandler
|
||||
public void uncaughtException(@NonNull Thread thread, @NonNull Throwable th) {
|
||||
if (shouldWrapException(th)) {
|
||||
Resources.NotFoundException notFoundException = new Resources.NotFoundException(th.getMessage() + ". If the resource you are trying to use is a vector resource, you may be referencing it in an unsupported way. See AppCompatDelegate.setCompatVectorFromResourcesEnabled() for more info.");
|
||||
Resources.NotFoundException notFoundException = new Resources.NotFoundException(th.getMessage() + AppCompatDelegateImpl.EXCEPTION_HANDLER_MESSAGE_SUFFIX);
|
||||
notFoundException.initCause(th.getCause());
|
||||
notFoundException.setStackTrace(th.getStackTrace());
|
||||
this.val$defHandler.uncaughtException(thread, notFoundException);
|
||||
|
@ -752,10 +754,10 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
|
|||
public int windowAnimations;
|
||||
|
||||
/* renamed from: x reason: collision with root package name */
|
||||
public int f13x;
|
||||
public int f23x;
|
||||
|
||||
/* renamed from: y reason: collision with root package name */
|
||||
public int f14y;
|
||||
public int f24y;
|
||||
|
||||
@SuppressLint({"BanParcelableUsage"})
|
||||
public static class SavedState implements Parcelable {
|
||||
|
@ -1163,16 +1165,16 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
|
|||
contentFrameLayout.setAttachListener(new AnonymousClass5());
|
||||
return viewGroup;
|
||||
}
|
||||
StringBuilder L = a.L("AppCompat does not support the current theme features: { windowActionBar: ");
|
||||
L.append(this.mHasActionBar);
|
||||
L.append(", windowActionBarOverlay: ");
|
||||
L.append(this.mOverlayActionBar);
|
||||
L.append(", android:windowIsFloating: ");
|
||||
L.append(this.mIsFloating);
|
||||
L.append(", windowActionModeOverlay: ");
|
||||
L.append(this.mOverlayActionMode);
|
||||
L.append(", windowNoTitle: ");
|
||||
throw new IllegalArgumentException(a.G(L, this.mWindowNoTitle, " }"));
|
||||
StringBuilder R = a.R("AppCompat does not support the current theme features: { windowActionBar: ");
|
||||
R.append(this.mHasActionBar);
|
||||
R.append(", windowActionBarOverlay: ");
|
||||
R.append(this.mOverlayActionBar);
|
||||
R.append(", android:windowIsFloating: ");
|
||||
R.append(this.mIsFloating);
|
||||
R.append(", windowActionModeOverlay: ");
|
||||
R.append(this.mOverlayActionMode);
|
||||
R.append(", windowNoTitle: ");
|
||||
throw new IllegalArgumentException(a.M(R, this.mWindowNoTitle, " }"));
|
||||
}
|
||||
obtainStyledAttributes.recycle();
|
||||
throw new IllegalStateException("You need to use a Theme.AppCompat theme (or descendant) with this activity.");
|
||||
|
@ -1437,7 +1439,7 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
|
|||
ActivityInfo activityInfo = packageManager.getActivityInfo(new ComponentName(this.mContext, this.mHost.getClass()), i >= 29 ? 269221888 : i >= 24 ? 786432 : 0);
|
||||
this.mActivityHandlesUiMode = (activityInfo == null || (activityInfo.configChanges & 512) == 0) ? false : true;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.d("AppCompatDelegate", "Exception while getting ActivityInfo", e);
|
||||
Log.d(AppCompatDelegate.TAG, "Exception while getting ActivityInfo", e);
|
||||
this.mActivityHandlesUiMode = false;
|
||||
}
|
||||
}
|
||||
|
@ -1471,11 +1473,11 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
|
|||
closePanel(panelState, true);
|
||||
z3 = z4;
|
||||
if (z3) {
|
||||
AudioManager audioManager = (AudioManager) this.mContext.getApplicationContext().getSystemService("audio");
|
||||
AudioManager audioManager = (AudioManager) this.mContext.getApplicationContext().getSystemService(MediaStreamTrack.AUDIO_TRACK_KIND);
|
||||
if (audioManager != null) {
|
||||
audioManager.playSoundEffect(0);
|
||||
} else {
|
||||
Log.w("AppCompatDelegate", "Couldn't get audio manager");
|
||||
Log.w(AppCompatDelegate.TAG, "Couldn't get audio manager");
|
||||
}
|
||||
}
|
||||
return z3;
|
||||
|
@ -1553,7 +1555,7 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
|
|||
if (!(view == null || (layoutParams = view.getLayoutParams()) == null || layoutParams.width != -1)) {
|
||||
i = -1;
|
||||
panelFeatureState.isHandled = false;
|
||||
WindowManager.LayoutParams layoutParams3 = new WindowManager.LayoutParams(i, -2, panelFeatureState.f13x, panelFeatureState.f14y, 1002, 8519680, -3);
|
||||
WindowManager.LayoutParams layoutParams3 = new WindowManager.LayoutParams(i, -2, panelFeatureState.f23x, panelFeatureState.f24y, PointerIconCompat.TYPE_HAND, 8519680, -3);
|
||||
layoutParams3.gravity = panelFeatureState.gravity;
|
||||
layoutParams3.windowAnimations = panelFeatureState.windowAnimations;
|
||||
windowManager.addView(panelFeatureState.decorView, layoutParams3);
|
||||
|
@ -1563,7 +1565,7 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
|
|||
}
|
||||
i = -2;
|
||||
panelFeatureState.isHandled = false;
|
||||
WindowManager.LayoutParams layoutParams3 = new WindowManager.LayoutParams(i, -2, panelFeatureState.f13x, panelFeatureState.f14y, 1002, 8519680, -3);
|
||||
WindowManager.LayoutParams layoutParams3 = new WindowManager.LayoutParams(i, -2, panelFeatureState.f23x, panelFeatureState.f24y, PointerIconCompat.TYPE_HAND, 8519680, -3);
|
||||
layoutParams3.gravity = panelFeatureState.gravity;
|
||||
layoutParams3.windowAnimations = panelFeatureState.windowAnimations;
|
||||
windowManager.addView(panelFeatureState.decorView, layoutParams3);
|
||||
|
@ -1691,12 +1693,12 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
|
|||
|
||||
private int sanitizeWindowFeatureId(int i) {
|
||||
if (i == 8) {
|
||||
Log.i("AppCompatDelegate", "You should now use the AppCompatDelegate.FEATURE_SUPPORT_ACTION_BAR id when requesting this feature.");
|
||||
Log.i(AppCompatDelegate.TAG, "You should now use the AppCompatDelegate.FEATURE_SUPPORT_ACTION_BAR id when requesting this feature.");
|
||||
return 108;
|
||||
} else if (i != 9) {
|
||||
return i;
|
||||
} else {
|
||||
Log.i("AppCompatDelegate", "You should now use the AppCompatDelegate.FEATURE_SUPPORT_ACTION_BAR_OVERLAY id when requesting this feature.");
|
||||
Log.i(AppCompatDelegate.TAG, "You should now use the AppCompatDelegate.FEATURE_SUPPORT_ACTION_BAR_OVERLAY id when requesting this feature.");
|
||||
return 109;
|
||||
}
|
||||
}
|
||||
|
@ -1941,7 +1943,7 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
|
|||
try {
|
||||
this.mAppCompatViewInflater = (AppCompatViewInflater) Class.forName(string).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
|
||||
} catch (Throwable th) {
|
||||
Log.i("AppCompatDelegate", "Failed to instantiate custom view inflater " + string + ". Falling back to default.", th);
|
||||
Log.i(AppCompatDelegate.TAG, "Failed to instantiate custom view inflater " + string + ". Falling back to default.", th);
|
||||
this.mAppCompatViewInflater = new AppCompatViewInflater();
|
||||
}
|
||||
}
|
||||
|
@ -2129,7 +2131,7 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
|
|||
if (from.getFactory() == null) {
|
||||
LayoutInflaterCompat.setFactory2(from, this);
|
||||
} else if (!(from.getFactory2() instanceof AppCompatDelegateImpl)) {
|
||||
Log.i("AppCompatDelegate", "The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's");
|
||||
Log.i(AppCompatDelegate.TAG, "The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import androidx.appcompat.widget.AppCompatToggleButton;
|
|||
import androidx.appcompat.widget.TintContextWrapper;
|
||||
import androidx.collection.SimpleArrayMap;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
@ -69,17 +69,17 @@ public class AppCompatViewInflater {
|
|||
if (id2 == -1) {
|
||||
str = "";
|
||||
} else {
|
||||
StringBuilder L = a.L(" with id '");
|
||||
L.append(this.mHostView.getContext().getResources().getResourceEntryName(id2));
|
||||
L.append("'");
|
||||
str = L.toString();
|
||||
StringBuilder R = a.R(" with id '");
|
||||
R.append(this.mHostView.getContext().getResources().getResourceEntryName(id2));
|
||||
R.append("'");
|
||||
str = R.toString();
|
||||
}
|
||||
StringBuilder L2 = a.L("Could not find method ");
|
||||
L2.append(this.mMethodName);
|
||||
L2.append("(View) in a parent or ancestor Context for android:onClick attribute defined on view ");
|
||||
L2.append(this.mHostView.getClass());
|
||||
L2.append(str);
|
||||
throw new IllegalStateException(L2.toString());
|
||||
StringBuilder R2 = a.R("Could not find method ");
|
||||
R2.append(this.mMethodName);
|
||||
R2.append("(View) in a parent or ancestor Context for android:onClick attribute defined on view ");
|
||||
R2.append(this.mHostView.getClass());
|
||||
R2.append(str);
|
||||
throw new IllegalStateException(R2.toString());
|
||||
}
|
||||
|
||||
@Override // android.view.View.OnClickListener
|
||||
|
@ -135,8 +135,8 @@ public class AppCompatViewInflater {
|
|||
if (str.equals("view")) {
|
||||
str = attributeSet.getAttributeValue(null, "class");
|
||||
}
|
||||
char c2 = 1;
|
||||
char c3 = 0;
|
||||
char c = 1;
|
||||
char c2 = 0;
|
||||
try {
|
||||
Object[] objArr = this.mConstructorArgs;
|
||||
objArr[0] = context;
|
||||
|
@ -169,8 +169,8 @@ public class AppCompatViewInflater {
|
|||
return null;
|
||||
} finally {
|
||||
Object[] objArr4 = this.mConstructorArgs;
|
||||
objArr4[c3] = obj;
|
||||
objArr4[c2] = obj;
|
||||
objArr4[c] = obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ public class AppCompatViewInflater {
|
|||
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, R.styleable.View, 0, 0);
|
||||
int resourceId = z2 ? obtainStyledAttributes.getResourceId(R.styleable.View_android_theme, 0) : 0;
|
||||
if (z3 && resourceId == 0 && (resourceId = obtainStyledAttributes.getResourceId(R.styleable.View_theme, 0)) != 0) {
|
||||
Log.i("AppCompatViewInflater", "app:theme is now deprecated. Please move to using android:theme instead.");
|
||||
Log.i(LOG_TAG, "app:theme is now deprecated. Please move to using android:theme instead.");
|
||||
}
|
||||
obtainStyledAttributes.recycle();
|
||||
return resourceId != 0 ? (!(context instanceof ContextThemeWrapper) || ((ContextThemeWrapper) context).getThemeResId() != resourceId) ? new ContextThemeWrapper(context, resourceId) : context : context;
|
||||
|
@ -275,94 +275,94 @@ public class AppCompatViewInflater {
|
|||
context2 = TintContextWrapper.wrap(context2);
|
||||
}
|
||||
str.hashCode();
|
||||
char c2 = 65535;
|
||||
char c = 65535;
|
||||
switch (str.hashCode()) {
|
||||
case -1946472170:
|
||||
if (str.equals("RatingBar")) {
|
||||
c2 = 0;
|
||||
c = 0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case -1455429095:
|
||||
if (str.equals("CheckedTextView")) {
|
||||
c2 = 1;
|
||||
c = 1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case -1346021293:
|
||||
if (str.equals("MultiAutoCompleteTextView")) {
|
||||
c2 = 2;
|
||||
c = 2;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case -938935918:
|
||||
if (str.equals("TextView")) {
|
||||
c2 = 3;
|
||||
c = 3;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case -937446323:
|
||||
if (str.equals("ImageButton")) {
|
||||
c2 = 4;
|
||||
c = 4;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case -658531749:
|
||||
if (str.equals("SeekBar")) {
|
||||
c2 = 5;
|
||||
c = 5;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case -339785223:
|
||||
if (str.equals("Spinner")) {
|
||||
c2 = 6;
|
||||
c = 6;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 776382189:
|
||||
if (str.equals("RadioButton")) {
|
||||
c2 = 7;
|
||||
c = 7;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 799298502:
|
||||
if (str.equals("ToggleButton")) {
|
||||
c2 = '\b';
|
||||
c = '\b';
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 1125864064:
|
||||
if (str.equals("ImageView")) {
|
||||
c2 = '\t';
|
||||
c = '\t';
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 1413872058:
|
||||
if (str.equals("AutoCompleteTextView")) {
|
||||
c2 = '\n';
|
||||
c = '\n';
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 1601505219:
|
||||
if (str.equals("CheckBox")) {
|
||||
c2 = 11;
|
||||
c = 11;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 1666676343:
|
||||
if (str.equals("EditText")) {
|
||||
c2 = '\f';
|
||||
c = '\f';
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2001146706:
|
||||
if (str.equals("Button")) {
|
||||
c2 = '\r';
|
||||
c = '\r';
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
switch (c2) {
|
||||
switch (c) {
|
||||
case 0:
|
||||
view2 = createRatingBar(context2, attributeSet);
|
||||
verifyNotNull(view2, str);
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ResourcesFlusher {
|
|||
sDrawableCacheField = declaredField;
|
||||
declaredField.setAccessible(true);
|
||||
} catch (NoSuchFieldException e) {
|
||||
Log.e("ResourcesFlusher", "Could not retrieve Resources#mDrawableCache field", e);
|
||||
Log.e(TAG, "Could not retrieve Resources#mDrawableCache field", e);
|
||||
}
|
||||
sDrawableCacheFieldFetched = true;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class ResourcesFlusher {
|
|||
try {
|
||||
map = (Map) field.get(resources);
|
||||
} catch (IllegalAccessException e2) {
|
||||
Log.e("ResourcesFlusher", "Could not retrieve value from Resources#mDrawableCache", e2);
|
||||
Log.e(TAG, "Could not retrieve value from Resources#mDrawableCache", e2);
|
||||
}
|
||||
if (map != null) {
|
||||
map.clear();
|
||||
|
@ -69,7 +69,7 @@ public class ResourcesFlusher {
|
|||
sDrawableCacheField = declaredField;
|
||||
declaredField.setAccessible(true);
|
||||
} catch (NoSuchFieldException e) {
|
||||
Log.e("ResourcesFlusher", "Could not retrieve Resources#mDrawableCache field", e);
|
||||
Log.e(TAG, "Could not retrieve Resources#mDrawableCache field", e);
|
||||
}
|
||||
sDrawableCacheFieldFetched = true;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ public class ResourcesFlusher {
|
|||
try {
|
||||
obj = field.get(resources);
|
||||
} catch (IllegalAccessException e2) {
|
||||
Log.e("ResourcesFlusher", "Could not retrieve value from Resources#mDrawableCache", e2);
|
||||
Log.e(TAG, "Could not retrieve value from Resources#mDrawableCache", e2);
|
||||
}
|
||||
}
|
||||
if (obj != null) {
|
||||
|
@ -96,7 +96,7 @@ public class ResourcesFlusher {
|
|||
sResourcesImplField = declaredField;
|
||||
declaredField.setAccessible(true);
|
||||
} catch (NoSuchFieldException e) {
|
||||
Log.e("ResourcesFlusher", "Could not retrieve Resources#mResourcesImpl field", e);
|
||||
Log.e(TAG, "Could not retrieve Resources#mResourcesImpl field", e);
|
||||
}
|
||||
sResourcesImplFieldFetched = true;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public class ResourcesFlusher {
|
|||
try {
|
||||
obj = field.get(resources);
|
||||
} catch (IllegalAccessException e2) {
|
||||
Log.e("ResourcesFlusher", "Could not retrieve value from Resources#mResourcesImpl", e2);
|
||||
Log.e(TAG, "Could not retrieve value from Resources#mResourcesImpl", e2);
|
||||
obj = null;
|
||||
}
|
||||
if (obj != null) {
|
||||
|
@ -116,7 +116,7 @@ public class ResourcesFlusher {
|
|||
sDrawableCacheField = declaredField2;
|
||||
declaredField2.setAccessible(true);
|
||||
} catch (NoSuchFieldException e3) {
|
||||
Log.e("ResourcesFlusher", "Could not retrieve ResourcesImpl#mDrawableCache field", e3);
|
||||
Log.e(TAG, "Could not retrieve ResourcesImpl#mDrawableCache field", e3);
|
||||
}
|
||||
sDrawableCacheFieldFetched = true;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public class ResourcesFlusher {
|
|||
try {
|
||||
obj2 = field2.get(obj);
|
||||
} catch (IllegalAccessException e4) {
|
||||
Log.e("ResourcesFlusher", "Could not retrieve value from ResourcesImpl#mDrawableCache", e4);
|
||||
Log.e(TAG, "Could not retrieve value from ResourcesImpl#mDrawableCache", e4);
|
||||
}
|
||||
}
|
||||
if (obj2 != null) {
|
||||
|
@ -141,7 +141,7 @@ public class ResourcesFlusher {
|
|||
try {
|
||||
sThemedResourceCacheClazz = Class.forName("android.content.res.ThemedResourceCache");
|
||||
} catch (ClassNotFoundException e) {
|
||||
Log.e("ResourcesFlusher", "Could not find ThemedResourceCache class", e);
|
||||
Log.e(TAG, "Could not find ThemedResourceCache class", e);
|
||||
}
|
||||
sThemedResourceCacheClazzFetched = true;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ public class ResourcesFlusher {
|
|||
sThemedResourceCache_mUnthemedEntriesField = declaredField;
|
||||
declaredField.setAccessible(true);
|
||||
} catch (NoSuchFieldException e2) {
|
||||
Log.e("ResourcesFlusher", "Could not retrieve ThemedResourceCache#mUnthemedEntries field", e2);
|
||||
Log.e(TAG, "Could not retrieve ThemedResourceCache#mUnthemedEntries field", e2);
|
||||
}
|
||||
sThemedResourceCache_mUnthemedEntriesFieldFetched = true;
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ public class ResourcesFlusher {
|
|||
try {
|
||||
longSparseArray = (LongSparseArray) field.get(obj);
|
||||
} catch (IllegalAccessException e3) {
|
||||
Log.e("ResourcesFlusher", "Could not retrieve value from ThemedResourceCache#mUnthemedEntries", e3);
|
||||
Log.e(TAG, "Could not retrieve value from ThemedResourceCache#mUnthemedEntries", e3);
|
||||
}
|
||||
if (longSparseArray != null) {
|
||||
longSparseArray.clear();
|
||||
|
|
|
@ -23,12 +23,12 @@ public class TwilightCalculator {
|
|||
}
|
||||
|
||||
public void calculateTwilight(long j, double d, double d2) {
|
||||
float f = ((float) (j - 946728000000L)) / 8.64E7f;
|
||||
float f = ((float) (j - UTC_2000)) / 8.64E7f;
|
||||
float f2 = (0.01720197f * f) + 6.24006f;
|
||||
double d3 = (double) f2;
|
||||
double sin = (Math.sin((double) (f2 * 3.0f)) * 5.236000106378924E-6d) + (Math.sin((double) (2.0f * f2)) * 3.4906598739326E-4d) + (Math.sin(d3) * 0.03341960161924362d) + d3 + 1.796593063d + 3.141592653589793d;
|
||||
double d4 = (-d2) / 360.0d;
|
||||
double sin2 = (Math.sin(2.0d * sin) * -0.0069d) + (Math.sin(d3) * 0.0053d) + ((double) (((float) Math.round(((double) (f - 9.0E-4f)) - d4)) + 9.0E-4f)) + d4;
|
||||
double sin2 = (Math.sin(2.0d * sin) * -0.0069d) + (Math.sin(d3) * 0.0053d) + ((double) (((float) Math.round(((double) (f - J0)) - d4)) + J0)) + d4;
|
||||
double asin = Math.asin(Math.sin(0.4092797040939331d) * Math.sin(sin));
|
||||
double d5 = 0.01745329238474369d * d;
|
||||
double sin3 = (Math.sin(-0.10471975803375244d) - (Math.sin(asin) * Math.sin(d5))) / (Math.cos(asin) * Math.cos(d5));
|
||||
|
@ -42,8 +42,8 @@ public class TwilightCalculator {
|
|||
this.sunrise = -1;
|
||||
} else {
|
||||
double acos = (double) ((float) (Math.acos(sin3) / 6.283185307179586d));
|
||||
this.sunset = Math.round((sin2 + acos) * 8.64E7d) + 946728000000L;
|
||||
long round = Math.round((sin2 - acos) * 8.64E7d) + 946728000000L;
|
||||
this.sunset = Math.round((sin2 + acos) * 8.64E7d) + UTC_2000;
|
||||
long round = Math.round((sin2 - acos) * 8.64E7d) + UTC_2000;
|
||||
this.sunrise = round;
|
||||
if (round >= j || this.sunset <= j) {
|
||||
this.state = 1;
|
||||
|
|
|
@ -9,6 +9,7 @@ import androidx.annotation.NonNull;
|
|||
import androidx.annotation.RequiresPermission;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.core.content.PermissionChecker;
|
||||
import com.discord.models.domain.ModelAuditLogEntry;
|
||||
import java.util.Calendar;
|
||||
public class TwilightManager {
|
||||
private static final int SUNRISE = 6;
|
||||
|
@ -37,7 +38,7 @@ public class TwilightManager {
|
|||
public static TwilightManager getInstance(@NonNull Context context) {
|
||||
if (sInstance == null) {
|
||||
Context applicationContext = context.getApplicationContext();
|
||||
sInstance = new TwilightManager(applicationContext, (LocationManager) applicationContext.getSystemService("location"));
|
||||
sInstance = new TwilightManager(applicationContext, (LocationManager) applicationContext.getSystemService(ModelAuditLogEntry.CHANGE_KEY_LOCATION));
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
@ -60,7 +61,7 @@ public class TwilightManager {
|
|||
}
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
Log.d("TwilightManager", "Failed to get last known location", e);
|
||||
Log.d(TAG, "Failed to get last known location", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +111,7 @@ public class TwilightManager {
|
|||
updateState(lastKnownLocation);
|
||||
return twilightState.isNight;
|
||||
}
|
||||
Log.i("TwilightManager", "Could not get last known location. This is probably because the app does not have any location permissions. Falling back to hardcoded sunrise/sunset values.");
|
||||
Log.i(TAG, "Could not get last known location. This is probably because the app does not have any location permissions. Falling back to hardcoded sunrise/sunset values.");
|
||||
int i = Calendar.getInstance().get(11);
|
||||
return i < 6 || i >= 22;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ import androidx.core.view.ViewPropertyAnimatorListenerAdapter;
|
|||
import androidx.core.view.ViewPropertyAnimatorUpdateListener;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
|
||||
|
@ -509,9 +509,9 @@ public class WindowDecorActionBar extends ActionBar implements ActionBarOverlayL
|
|||
if (view instanceof Toolbar) {
|
||||
return ((Toolbar) view).getWrapper();
|
||||
}
|
||||
StringBuilder L = a.L("Can't make a decor toolbar out of ");
|
||||
L.append(view != null ? view.getClass().getSimpleName() : "null");
|
||||
throw new IllegalStateException(L.toString());
|
||||
StringBuilder R = a.R("Can't make a decor toolbar out of ");
|
||||
R.append(view != null ? view.getClass().getSimpleName() : "null");
|
||||
throw new IllegalStateException(R.toString());
|
||||
}
|
||||
|
||||
private void hideForActionMode() {
|
||||
|
@ -662,9 +662,9 @@ public class WindowDecorActionBar extends ActionBar implements ActionBarOverlayL
|
|||
if (shouldAnimateContextView()) {
|
||||
if (z2) {
|
||||
viewPropertyAnimatorCompat = this.mDecorToolbar.setupAnimatorToVisibility(4, 100);
|
||||
viewPropertyAnimatorCompat2 = this.mContextView.setupAnimatorToVisibility(0, 200);
|
||||
viewPropertyAnimatorCompat2 = this.mContextView.setupAnimatorToVisibility(0, FADE_IN_DURATION_MS);
|
||||
} else {
|
||||
viewPropertyAnimatorCompat2 = this.mDecorToolbar.setupAnimatorToVisibility(0, 200);
|
||||
viewPropertyAnimatorCompat2 = this.mDecorToolbar.setupAnimatorToVisibility(0, FADE_IN_DURATION_MS);
|
||||
viewPropertyAnimatorCompat = this.mContextView.setupAnimatorToVisibility(8, 100);
|
||||
}
|
||||
ViewPropertyAnimatorCompatSet viewPropertyAnimatorCompatSet = new ViewPropertyAnimatorCompatSet();
|
||||
|
|
|
@ -107,7 +107,7 @@ public final class AppCompatResources {
|
|||
try {
|
||||
return ColorStateListInflaterCompat.createFromXml(resources, resources.getXml(i), context.getTheme());
|
||||
} catch (Exception e) {
|
||||
Log.e("AppCompatResources", "Failed to inflate ColorStateList, leaving it to the framework", e);
|
||||
Log.e(LOG_TAG, "Failed to inflate ColorStateList, leaving it to the framework", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -331,9 +331,9 @@ public class AnimatedStateListDrawableCompat extends StateListDrawable implement
|
|||
return;
|
||||
}
|
||||
if (next == 2 && depth2 <= depth) {
|
||||
if (xmlPullParser.getName().equals("item")) {
|
||||
if (xmlPullParser.getName().equals(ELEMENT_ITEM)) {
|
||||
parseItem(context, resources, xmlPullParser, attributeSet, theme);
|
||||
} else if (xmlPullParser.getName().equals("transition")) {
|
||||
} else if (xmlPullParser.getName().equals(ELEMENT_TRANSITION)) {
|
||||
parseTransition(context, resources, xmlPullParser, attributeSet, theme);
|
||||
}
|
||||
}
|
||||
|
@ -362,13 +362,13 @@ public class AnimatedStateListDrawableCompat extends StateListDrawable implement
|
|||
if (next == 2) {
|
||||
drawable = xmlPullParser.getName().equals("vector") ? VectorDrawableCompat.createFromXmlInner(resources, xmlPullParser, attributeSet, theme) : Drawable.createFromXmlInner(resources, xmlPullParser, attributeSet, theme);
|
||||
} else {
|
||||
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ": <item> tag requires a 'drawable' attribute or child tag defining a drawable");
|
||||
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ITEM_MISSING_DRAWABLE_ERROR);
|
||||
}
|
||||
}
|
||||
if (drawable != null) {
|
||||
return this.mState.addStateSet(extractStateSet, drawable, resourceId);
|
||||
}
|
||||
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ": <item> tag requires a 'drawable' attribute or child tag defining a drawable");
|
||||
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ITEM_MISSING_DRAWABLE_ERROR);
|
||||
}
|
||||
|
||||
private int parseTransition(@NonNull Context context, @NonNull Resources resources, @NonNull XmlPullParser xmlPullParser, @NonNull AttributeSet attributeSet, @Nullable Resources.Theme theme) throws XmlPullParserException, IOException {
|
||||
|
@ -387,15 +387,15 @@ public class AnimatedStateListDrawableCompat extends StateListDrawable implement
|
|||
if (next == 2) {
|
||||
drawable = xmlPullParser.getName().equals("animated-vector") ? AnimatedVectorDrawableCompat.createFromXmlInner(context, resources, xmlPullParser, attributeSet, theme) : Drawable.createFromXmlInner(resources, xmlPullParser, attributeSet, theme);
|
||||
} else {
|
||||
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ": <transition> tag requires a 'drawable' attribute or child tag defining a drawable");
|
||||
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + TRANSITION_MISSING_DRAWABLE_ERROR);
|
||||
}
|
||||
}
|
||||
if (drawable == null) {
|
||||
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ": <transition> tag requires a 'drawable' attribute or child tag defining a drawable");
|
||||
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + TRANSITION_MISSING_DRAWABLE_ERROR);
|
||||
} else if (resourceId != -1 && resourceId2 != -1) {
|
||||
return this.mState.addTransition(resourceId, resourceId2, drawable, z2);
|
||||
} else {
|
||||
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ": <transition> tag requires 'fromId' & 'toId' attributes");
|
||||
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + TRANSITION_MISSING_FROM_TO_ID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,8 @@ import androidx.annotation.FloatRange;
|
|||
import androidx.annotation.RestrictTo;
|
||||
import androidx.appcompat.R;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import com.google.android.material.shadow.ShadowDrawableWrapper;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
public class DrawerArrowDrawable extends Drawable {
|
||||
|
@ -153,7 +154,7 @@ public class DrawerArrowDrawable extends Drawable {
|
|||
return this.mPaint;
|
||||
}
|
||||
|
||||
@FloatRange(from = 0.0d, to = 1.0d)
|
||||
@FloatRange(from = ShadowDrawableWrapper.COS_45, to = 1.0d)
|
||||
public float getProgress() {
|
||||
return this.mProgress;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import androidx.appcompat.widget.TintTypedArray;
|
|||
import androidx.core.internal.view.SupportMenu;
|
||||
import androidx.core.view.ActionProvider;
|
||||
import androidx.core.view.MenuItemCompat;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Method;
|
||||
|
@ -57,9 +57,9 @@ public class SupportMenuInflater extends MenuInflater {
|
|||
try {
|
||||
this.mMethod = cls.getMethod(str, PARAM_TYPES);
|
||||
} catch (Exception e) {
|
||||
StringBuilder Q = a.Q("Couldn't resolve menu item onClick handler ", str, " in class ");
|
||||
Q.append(cls.getName());
|
||||
InflateException inflateException = new InflateException(Q.toString());
|
||||
StringBuilder W = a.W("Couldn't resolve menu item onClick handler ", str, " in class ");
|
||||
W.append(cls.getName());
|
||||
InflateException inflateException = new InflateException(W.toString());
|
||||
inflateException.initCause(e);
|
||||
throw inflateException;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ public class SupportMenuInflater extends MenuInflater {
|
|||
constructor.setAccessible(true);
|
||||
return (T) constructor.newInstance(objArr);
|
||||
} catch (Exception e) {
|
||||
Log.w("SupportMenuInflater", "Cannot instantiate class: " + str, e);
|
||||
Log.w(SupportMenuInflater.LOG_TAG, "Cannot instantiate class: " + str, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ public class SupportMenuInflater extends MenuInflater {
|
|||
if (!z2) {
|
||||
menuItem.setActionView(i2);
|
||||
} else {
|
||||
Log.w("SupportMenuInflater", "Ignoring attribute 'itemActionViewLayout'. Action view already specified.");
|
||||
Log.w(SupportMenuInflater.LOG_TAG, "Ignoring attribute 'itemActionViewLayout'. Action view already specified.");
|
||||
}
|
||||
}
|
||||
ActionProvider actionProvider = this.itemActionProvider;
|
||||
|
@ -225,7 +225,7 @@ public class SupportMenuInflater extends MenuInflater {
|
|||
public void readItem(AttributeSet attributeSet) {
|
||||
TintTypedArray obtainStyledAttributes = TintTypedArray.obtainStyledAttributes(SupportMenuInflater.this.mContext, attributeSet, R.styleable.MenuItem);
|
||||
this.itemId = obtainStyledAttributes.getResourceId(R.styleable.MenuItem_android_id, 0);
|
||||
this.itemCategoryOrder = (obtainStyledAttributes.getInt(R.styleable.MenuItem_android_menuCategory, this.groupCategory) & -65536) | (obtainStyledAttributes.getInt(R.styleable.MenuItem_android_orderInCategory, this.groupOrder) & 65535);
|
||||
this.itemCategoryOrder = (obtainStyledAttributes.getInt(R.styleable.MenuItem_android_menuCategory, this.groupCategory) & SupportMenu.CATEGORY_MASK) | (obtainStyledAttributes.getInt(R.styleable.MenuItem_android_orderInCategory, this.groupOrder) & 65535);
|
||||
this.itemTitle = obtainStyledAttributes.getText(R.styleable.MenuItem_android_title);
|
||||
this.itemTitleCondensed = obtainStyledAttributes.getText(R.styleable.MenuItem_android_titleCondensed);
|
||||
this.itemIconResId = obtainStyledAttributes.getResourceId(R.styleable.MenuItem_android_icon, 0);
|
||||
|
@ -253,7 +253,7 @@ public class SupportMenuInflater extends MenuInflater {
|
|||
this.itemActionProvider = (ActionProvider) newInstance(string, SupportMenuInflater.ACTION_PROVIDER_CONSTRUCTOR_SIGNATURE, SupportMenuInflater.this.mActionProviderConstructorArguments);
|
||||
} else {
|
||||
if (z2) {
|
||||
Log.w("SupportMenuInflater", "Ignoring attribute 'actionProviderClass'. Action view already specified.");
|
||||
Log.w(SupportMenuInflater.LOG_TAG, "Ignoring attribute 'actionProviderClass'. Action view already specified.");
|
||||
}
|
||||
this.itemActionProvider = null;
|
||||
}
|
||||
|
@ -314,10 +314,10 @@ public class SupportMenuInflater extends MenuInflater {
|
|||
}
|
||||
} else {
|
||||
String name = xmlPullParser.getName();
|
||||
if (name.equals("menu")) {
|
||||
if (name.equals(XML_MENU)) {
|
||||
eventType = xmlPullParser.next();
|
||||
} else {
|
||||
throw new RuntimeException(a.u("Expecting menu, got ", name));
|
||||
throw new RuntimeException(a.v("Expecting menu, got ", name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -332,9 +332,9 @@ public class SupportMenuInflater extends MenuInflater {
|
|||
if (z3 && name2.equals(str)) {
|
||||
str = null;
|
||||
z3 = false;
|
||||
} else if (name2.equals("group")) {
|
||||
} else if (name2.equals(XML_GROUP)) {
|
||||
menuState.resetGroup();
|
||||
} else if (name2.equals("item")) {
|
||||
} else if (name2.equals(XML_ITEM)) {
|
||||
if (!menuState.hasAddedItem()) {
|
||||
ActionProvider actionProvider = menuState.itemActionProvider;
|
||||
if (actionProvider == null || !actionProvider.hasSubMenu()) {
|
||||
|
@ -343,17 +343,17 @@ public class SupportMenuInflater extends MenuInflater {
|
|||
menuState.addSubMenuItem();
|
||||
}
|
||||
}
|
||||
} else if (name2.equals("menu")) {
|
||||
} else if (name2.equals(XML_MENU)) {
|
||||
z2 = true;
|
||||
}
|
||||
}
|
||||
} else if (!z3) {
|
||||
String name3 = xmlPullParser.getName();
|
||||
if (name3.equals("group")) {
|
||||
if (name3.equals(XML_GROUP)) {
|
||||
menuState.readGroup(attributeSet);
|
||||
} else if (name3.equals("item")) {
|
||||
} else if (name3.equals(XML_ITEM)) {
|
||||
menuState.readItem(attributeSet);
|
||||
} else if (name3.equals("menu")) {
|
||||
} else if (name3.equals(XML_MENU)) {
|
||||
parseMenu(xmlPullParser, attributeSet, menuState.addSubMenuItem());
|
||||
} else {
|
||||
z3 = true;
|
||||
|
|
|
@ -251,14 +251,14 @@ public class ActionMenuItem implements SupportMenuItem {
|
|||
}
|
||||
|
||||
@Override // android.view.MenuItem
|
||||
public MenuItem setAlphabeticShortcut(char c2) {
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c2);
|
||||
public MenuItem setAlphabeticShortcut(char c) {
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // androidx.core.internal.view.SupportMenuItem, android.view.MenuItem
|
||||
public MenuItem setAlphabeticShortcut(char c2, int i) {
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c2);
|
||||
public MenuItem setAlphabeticShortcut(char c, int i) {
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c);
|
||||
this.mShortcutAlphabeticModifiers = KeyEvent.normalizeMetaState(i);
|
||||
return this;
|
||||
}
|
||||
|
@ -329,14 +329,14 @@ public class ActionMenuItem implements SupportMenuItem {
|
|||
}
|
||||
|
||||
@Override // android.view.MenuItem
|
||||
public MenuItem setNumericShortcut(char c2) {
|
||||
this.mShortcutNumericChar = c2;
|
||||
public MenuItem setNumericShortcut(char c) {
|
||||
this.mShortcutNumericChar = c;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // androidx.core.internal.view.SupportMenuItem, android.view.MenuItem
|
||||
public MenuItem setNumericShortcut(char c2, int i) {
|
||||
this.mShortcutNumericChar = c2;
|
||||
public MenuItem setNumericShortcut(char c, int i) {
|
||||
this.mShortcutNumericChar = c;
|
||||
this.mShortcutNumericModifiers = KeyEvent.normalizeMetaState(i);
|
||||
return this;
|
||||
}
|
||||
|
@ -353,17 +353,17 @@ public class ActionMenuItem implements SupportMenuItem {
|
|||
}
|
||||
|
||||
@Override // android.view.MenuItem
|
||||
public MenuItem setShortcut(char c2, char c3) {
|
||||
this.mShortcutNumericChar = c2;
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c3);
|
||||
public MenuItem setShortcut(char c, char c2) {
|
||||
this.mShortcutNumericChar = c;
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c2);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // androidx.core.internal.view.SupportMenuItem, android.view.MenuItem
|
||||
public MenuItem setShortcut(char c2, char c3, int i, int i2) {
|
||||
this.mShortcutNumericChar = c2;
|
||||
public MenuItem setShortcut(char c, char c2, int i, int i2) {
|
||||
this.mShortcutNumericChar = c;
|
||||
this.mShortcutNumericModifiers = KeyEvent.normalizeMetaState(i);
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c3);
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c2);
|
||||
this.mShortcutAlphabeticModifiers = KeyEvent.normalizeMetaState(i2);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import androidx.appcompat.widget.ActionMenuView;
|
|||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.appcompat.widget.ForwardingListener;
|
||||
import androidx.appcompat.widget.TooltipCompat;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
|
||||
public class ActionMenuItemView extends AppCompatTextView implements MenuView.ItemView, View.OnClickListener, ActionMenuView.ActionMenuChildView {
|
||||
private static final int MAX_ICON_SIZE = 32;
|
||||
|
@ -174,7 +175,7 @@ public class ActionMenuItemView extends AppCompatTextView implements MenuView.It
|
|||
int measuredWidth = getMeasuredWidth();
|
||||
int min = mode == Integer.MIN_VALUE ? Math.min(size, this.mMinWidth) : this.mMinWidth;
|
||||
if (mode != 1073741824 && this.mMinWidth > 0 && measuredWidth < min) {
|
||||
super.onMeasure(View.MeasureSpec.makeMeasureSpec(min, 1073741824), i2);
|
||||
super.onMeasure(View.MeasureSpec.makeMeasureSpec(min, BasicMeasure.EXACTLY), i2);
|
||||
}
|
||||
if (!hasText && this.mIcon != null) {
|
||||
super.setPadding((getMeasuredWidth() - this.mIcon.getBounds().width()) / 2, getPaddingTop(), getPaddingRight(), getPaddingBottom());
|
||||
|
@ -255,7 +256,7 @@ public class ActionMenuItemView extends AppCompatTextView implements MenuView.It
|
|||
}
|
||||
|
||||
@Override // androidx.appcompat.view.menu.MenuView.ItemView
|
||||
public void setShortcut(boolean z2, char c2) {
|
||||
public void setShortcut(boolean z2, char c) {
|
||||
}
|
||||
|
||||
@Override // androidx.appcompat.view.menu.MenuView.ItemView
|
||||
|
|
|
@ -265,7 +265,7 @@ public class ListMenuItemView extends LinearLayout implements MenuView.ItemView,
|
|||
}
|
||||
|
||||
@Override // androidx.appcompat.view.menu.MenuView.ItemView
|
||||
public void setShortcut(boolean z2, char c2) {
|
||||
public void setShortcut(boolean z2, char c) {
|
||||
int i = (!z2 || !this.mItemData.shouldShowShortcut()) ? 8 : 0;
|
||||
if (i == 0) {
|
||||
this.mShortcutView.setText(this.mItemData.getShortcutLabel());
|
||||
|
|
|
@ -209,7 +209,7 @@ public class ListMenuPresenter implements MenuPresenter, AdapterView.OnItemClick
|
|||
}
|
||||
|
||||
public void restoreHierarchyState(Bundle bundle) {
|
||||
SparseArray<Parcelable> sparseParcelableArray = bundle.getSparseParcelableArray("android:menu:list");
|
||||
SparseArray<Parcelable> sparseParcelableArray = bundle.getSparseParcelableArray(VIEWS_TAG);
|
||||
if (sparseParcelableArray != null) {
|
||||
this.mMenuView.restoreHierarchyState(sparseParcelableArray);
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ public class ListMenuPresenter implements MenuPresenter, AdapterView.OnItemClick
|
|||
if (expandedMenuView != null) {
|
||||
expandedMenuView.saveHierarchyState(sparseArray);
|
||||
}
|
||||
bundle.putSparseParcelableArray("android:menu:list", sparseArray);
|
||||
bundle.putSparseParcelableArray(VIEWS_TAG, sparseArray);
|
||||
}
|
||||
|
||||
@Override // androidx.appcompat.view.menu.MenuPresenter
|
||||
|
|
|
@ -110,7 +110,7 @@ public class MenuBuilder implements SupportMenu {
|
|||
|
||||
private void dispatchRestoreInstanceState(Bundle bundle) {
|
||||
Parcelable parcelable;
|
||||
SparseArray sparseParcelableArray = bundle.getSparseParcelableArray("android:menu:presenters");
|
||||
SparseArray sparseParcelableArray = bundle.getSparseParcelableArray(PRESENTER_KEY);
|
||||
if (sparseParcelableArray != null && !this.mPresenters.isEmpty()) {
|
||||
Iterator<WeakReference<MenuPresenter>> it = this.mPresenters.iterator();
|
||||
while (it.hasNext()) {
|
||||
|
@ -145,7 +145,7 @@ public class MenuBuilder implements SupportMenu {
|
|||
}
|
||||
}
|
||||
}
|
||||
bundle.putSparseParcelableArray("android:menu:presenters", sparseArray);
|
||||
bundle.putSparseParcelableArray(PRESENTER_KEY, sparseArray);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -513,7 +513,7 @@ public class MenuBuilder implements SupportMenu {
|
|||
((MenuBuilder) menuItemImpl.getSubMenu()).findItemsWithShortcutForKey(list, i, keyEvent);
|
||||
}
|
||||
char alphabeticShortcut = isQwertyMode ? menuItemImpl.getAlphabeticShortcut() : menuItemImpl.getNumericShortcut();
|
||||
if (((modifiers & 69647) == ((isQwertyMode ? menuItemImpl.getAlphabeticModifiers() : menuItemImpl.getNumericModifiers()) & 69647)) && alphabeticShortcut != 0) {
|
||||
if (((modifiers & SupportMenu.SUPPORTED_MODIFIERS_MASK) == ((isQwertyMode ? menuItemImpl.getAlphabeticModifiers() : menuItemImpl.getNumericModifiers()) & SupportMenu.SUPPORTED_MODIFIERS_MASK)) && alphabeticShortcut != 0) {
|
||||
char[] cArr = keyData.meta;
|
||||
if ((alphabeticShortcut == cArr[0] || alphabeticShortcut == cArr[2] || (isQwertyMode && alphabeticShortcut == '\b' && i == 67)) && menuItemImpl.isEnabled()) {
|
||||
list.add(menuItemImpl);
|
||||
|
@ -564,7 +564,7 @@ public class MenuBuilder implements SupportMenu {
|
|||
}
|
||||
|
||||
public String getActionViewStatesKey() {
|
||||
return "android:menu:actionviewstates";
|
||||
return ACTION_VIEW_STATES_KEY;
|
||||
}
|
||||
|
||||
public Context getContext() {
|
||||
|
@ -789,7 +789,7 @@ public class MenuBuilder implements SupportMenu {
|
|||
((SubMenuBuilder) item.getSubMenu()).restoreActionViewStates(bundle);
|
||||
}
|
||||
}
|
||||
int i2 = bundle.getInt("android:menu:expandedactionview");
|
||||
int i2 = bundle.getInt(EXPANDED_ACTION_VIEW_ID);
|
||||
if (i2 > 0 && (findItem = findItem(i2)) != null) {
|
||||
findItem.expandActionView();
|
||||
}
|
||||
|
@ -812,7 +812,7 @@ public class MenuBuilder implements SupportMenu {
|
|||
}
|
||||
actionView.saveHierarchyState(sparseArray);
|
||||
if (item.isActionViewExpanded()) {
|
||||
bundle.putInt("android:menu:expandedactionview", item.getItemId());
|
||||
bundle.putInt(EXPANDED_ACTION_VIEW_ID, item.getItemId());
|
||||
}
|
||||
}
|
||||
if (item.hasSubMenu()) {
|
||||
|
|
|
@ -10,6 +10,7 @@ import androidx.annotation.NonNull;
|
|||
import androidx.appcompat.R;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.view.menu.MenuPresenter;
|
||||
import androidx.core.view.PointerIconCompat;
|
||||
public class MenuDialogHelper implements DialogInterface.OnKeyListener, DialogInterface.OnClickListener, DialogInterface.OnDismissListener, MenuPresenter.Callback {
|
||||
private AlertDialog mDialog;
|
||||
private MenuBuilder mMenu;
|
||||
|
@ -103,7 +104,7 @@ public class MenuDialogHelper implements DialogInterface.OnKeyListener, DialogIn
|
|||
this.mDialog = create;
|
||||
create.setOnDismissListener(this);
|
||||
WindowManager.LayoutParams attributes = this.mDialog.getWindow().getAttributes();
|
||||
attributes.type = 1003;
|
||||
attributes.type = PointerIconCompat.TYPE_HELP;
|
||||
if (iBinder != null) {
|
||||
attributes.token = iBinder;
|
||||
}
|
||||
|
|
|
@ -345,7 +345,7 @@ public final class MenuItemImpl implements SupportMenuItem {
|
|||
this.mMenu.getContext().startActivity(this.mIntent);
|
||||
return true;
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Log.e("MenuItemImpl", "Can't find activity to handle intent; ignoring", e);
|
||||
Log.e(TAG, "Can't find activity to handle intent; ignoring", e);
|
||||
}
|
||||
}
|
||||
ActionProvider actionProvider = this.mActionProvider;
|
||||
|
@ -430,21 +430,21 @@ public final class MenuItemImpl implements SupportMenuItem {
|
|||
}
|
||||
|
||||
@Override // android.view.MenuItem
|
||||
public MenuItem setAlphabeticShortcut(char c2) {
|
||||
if (this.mShortcutAlphabeticChar == c2) {
|
||||
public MenuItem setAlphabeticShortcut(char c) {
|
||||
if (this.mShortcutAlphabeticChar == c) {
|
||||
return this;
|
||||
}
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c2);
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c);
|
||||
this.mMenu.onItemsChanged(false);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // androidx.core.internal.view.SupportMenuItem, android.view.MenuItem
|
||||
public MenuItem setAlphabeticShortcut(char c2, int i) {
|
||||
if (this.mShortcutAlphabeticChar == c2 && this.mShortcutAlphabeticModifiers == i) {
|
||||
public MenuItem setAlphabeticShortcut(char c, int i) {
|
||||
if (this.mShortcutAlphabeticChar == c && this.mShortcutAlphabeticModifiers == i) {
|
||||
return this;
|
||||
}
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c2);
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c);
|
||||
this.mShortcutAlphabeticModifiers = KeyEvent.normalizeMetaState(i);
|
||||
this.mMenu.onItemsChanged(false);
|
||||
return this;
|
||||
|
@ -562,21 +562,21 @@ public final class MenuItemImpl implements SupportMenuItem {
|
|||
}
|
||||
|
||||
@Override // android.view.MenuItem
|
||||
public MenuItem setNumericShortcut(char c2) {
|
||||
if (this.mShortcutNumericChar == c2) {
|
||||
public MenuItem setNumericShortcut(char c) {
|
||||
if (this.mShortcutNumericChar == c) {
|
||||
return this;
|
||||
}
|
||||
this.mShortcutNumericChar = c2;
|
||||
this.mShortcutNumericChar = c;
|
||||
this.mMenu.onItemsChanged(false);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // androidx.core.internal.view.SupportMenuItem, android.view.MenuItem
|
||||
public MenuItem setNumericShortcut(char c2, int i) {
|
||||
if (this.mShortcutNumericChar == c2 && this.mShortcutNumericModifiers == i) {
|
||||
public MenuItem setNumericShortcut(char c, int i) {
|
||||
if (this.mShortcutNumericChar == c && this.mShortcutNumericModifiers == i) {
|
||||
return this;
|
||||
}
|
||||
this.mShortcutNumericChar = c2;
|
||||
this.mShortcutNumericChar = c;
|
||||
this.mShortcutNumericModifiers = KeyEvent.normalizeMetaState(i);
|
||||
this.mMenu.onItemsChanged(false);
|
||||
return this;
|
||||
|
@ -595,18 +595,18 @@ public final class MenuItemImpl implements SupportMenuItem {
|
|||
}
|
||||
|
||||
@Override // android.view.MenuItem
|
||||
public MenuItem setShortcut(char c2, char c3) {
|
||||
this.mShortcutNumericChar = c2;
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c3);
|
||||
public MenuItem setShortcut(char c, char c2) {
|
||||
this.mShortcutNumericChar = c;
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c2);
|
||||
this.mMenu.onItemsChanged(false);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // androidx.core.internal.view.SupportMenuItem, android.view.MenuItem
|
||||
public MenuItem setShortcut(char c2, char c3, int i, int i2) {
|
||||
this.mShortcutNumericChar = c2;
|
||||
public MenuItem setShortcut(char c, char c2, int i, int i2) {
|
||||
this.mShortcutNumericChar = c;
|
||||
this.mShortcutNumericModifiers = KeyEvent.normalizeMetaState(i);
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c3);
|
||||
this.mShortcutAlphabeticChar = Character.toLowerCase(c2);
|
||||
this.mShortcutAlphabeticModifiers = KeyEvent.normalizeMetaState(i2);
|
||||
this.mMenu.onItemsChanged(false);
|
||||
return this;
|
||||
|
|
|
@ -331,14 +331,14 @@ public class MenuItemWrapperICS extends BaseMenuWrapper implements MenuItem {
|
|||
}
|
||||
|
||||
@Override // android.view.MenuItem
|
||||
public MenuItem setAlphabeticShortcut(char c2) {
|
||||
this.mWrappedObject.setAlphabeticShortcut(c2);
|
||||
public MenuItem setAlphabeticShortcut(char c) {
|
||||
this.mWrappedObject.setAlphabeticShortcut(c);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // android.view.MenuItem
|
||||
public MenuItem setAlphabeticShortcut(char c2, int i) {
|
||||
this.mWrappedObject.setAlphabeticShortcut(c2, i);
|
||||
public MenuItem setAlphabeticShortcut(char c, int i) {
|
||||
this.mWrappedObject.setAlphabeticShortcut(c, i);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -373,7 +373,7 @@ public class MenuItemWrapperICS extends BaseMenuWrapper implements MenuItem {
|
|||
}
|
||||
this.mSetExclusiveCheckableMethod.invoke(this.mWrappedObject, Boolean.valueOf(z2));
|
||||
} catch (Exception e) {
|
||||
Log.w("MenuItemWrapper", "Error while calling setExclusiveCheckable", e);
|
||||
Log.w(LOG_TAG, "Error while calling setExclusiveCheckable", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -408,14 +408,14 @@ public class MenuItemWrapperICS extends BaseMenuWrapper implements MenuItem {
|
|||
}
|
||||
|
||||
@Override // android.view.MenuItem
|
||||
public MenuItem setNumericShortcut(char c2) {
|
||||
this.mWrappedObject.setNumericShortcut(c2);
|
||||
public MenuItem setNumericShortcut(char c) {
|
||||
this.mWrappedObject.setNumericShortcut(c);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // android.view.MenuItem
|
||||
public MenuItem setNumericShortcut(char c2, int i) {
|
||||
this.mWrappedObject.setNumericShortcut(c2, i);
|
||||
public MenuItem setNumericShortcut(char c, int i) {
|
||||
this.mWrappedObject.setNumericShortcut(c, i);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -432,14 +432,14 @@ public class MenuItemWrapperICS extends BaseMenuWrapper implements MenuItem {
|
|||
}
|
||||
|
||||
@Override // android.view.MenuItem
|
||||
public MenuItem setShortcut(char c2, char c3) {
|
||||
this.mWrappedObject.setShortcut(c2, c3);
|
||||
public MenuItem setShortcut(char c, char c2) {
|
||||
this.mWrappedObject.setShortcut(c, c2);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // android.view.MenuItem
|
||||
public MenuItem setShortcut(char c2, char c3, int i, int i2) {
|
||||
this.mWrappedObject.setShortcut(c2, c3, i, i2);
|
||||
public MenuItem setShortcut(char c, char c2, int i, int i2) {
|
||||
this.mWrappedObject.setShortcut(c, c2, i, i2);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public class MenuPopupHelper implements MenuHelper {
|
|||
}
|
||||
|
||||
public MenuPopupHelper(@NonNull Context context, @NonNull MenuBuilder menuBuilder, @NonNull View view, boolean z2, @AttrRes int i, @StyleRes int i2) {
|
||||
this.mDropDownGravity = 8388611;
|
||||
this.mDropDownGravity = GravityCompat.START;
|
||||
this.mInternalOnDismissListener = new AnonymousClass1();
|
||||
this.mContext = context;
|
||||
this.mMenu = menuBuilder;
|
||||
|
|
|
@ -21,7 +21,7 @@ public interface MenuView {
|
|||
|
||||
void setIcon(Drawable drawable);
|
||||
|
||||
void setShortcut(boolean z2, char c2);
|
||||
void setShortcut(boolean z2, char c);
|
||||
|
||||
void setTitle(CharSequence charSequence);
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ import androidx.annotation.RestrictTo;
|
|||
import androidx.appcompat.R;
|
||||
import androidx.appcompat.view.ActionMode;
|
||||
import androidx.appcompat.view.menu.MenuBuilder;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.ViewPropertyAnimatorCompat;
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
|
||||
|
@ -267,8 +268,9 @@ public class ActionBarContextView extends AbsActionBarView {
|
|||
|
||||
@Override // android.view.View
|
||||
public void onMeasure(int i, int i2) {
|
||||
int i3 = 1073741824;
|
||||
if (View.MeasureSpec.getMode(i) != 1073741824) {
|
||||
int mode = View.MeasureSpec.getMode(i);
|
||||
int i3 = BasicMeasure.EXACTLY;
|
||||
if (mode != 1073741824) {
|
||||
throw new IllegalStateException(getClass().getSimpleName() + " can only be used with android:layout_width=\"match_parent\" (or fill_parent)");
|
||||
} else if (View.MeasureSpec.getMode(i2) != 0) {
|
||||
int size = View.MeasureSpec.getSize(i);
|
||||
|
@ -308,7 +310,7 @@ public class ActionBarContextView extends AbsActionBarView {
|
|||
if (view2 != null) {
|
||||
ViewGroup.LayoutParams layoutParams = view2.getLayoutParams();
|
||||
int i6 = layoutParams.width;
|
||||
int i7 = i6 != -2 ? 1073741824 : Integer.MIN_VALUE;
|
||||
int i7 = i6 != -2 ? BasicMeasure.EXACTLY : Integer.MIN_VALUE;
|
||||
if (i6 >= 0) {
|
||||
paddingLeft = Math.min(i6, paddingLeft);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import androidx.core.view.NestedScrollingParent3;
|
|||
import androidx.core.view.NestedScrollingParentHelper;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
@SuppressLint({"UnknownNullness"})
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
|
||||
public class ActionBarOverlayLayout extends ViewGroup implements DecorContentParent, NestedScrollingParent, NestedScrollingParent2, NestedScrollingParent3 {
|
||||
|
@ -219,9 +219,9 @@ public class ActionBarOverlayLayout extends ViewGroup implements DecorContentPar
|
|||
if (view instanceof Toolbar) {
|
||||
return ((Toolbar) view).getWrapper();
|
||||
}
|
||||
StringBuilder L = a.L("Can't make a decor toolbar out of ");
|
||||
L.append(view.getClass().getSimpleName());
|
||||
throw new IllegalStateException(L.toString());
|
||||
StringBuilder R = a.R("Can't make a decor toolbar out of ");
|
||||
R.append(view.getClass().getSimpleName());
|
||||
throw new IllegalStateException(R.toString());
|
||||
}
|
||||
|
||||
private void init(Context context) {
|
||||
|
|
|
@ -27,6 +27,7 @@ import androidx.appcompat.view.menu.SubMenuBuilder;
|
|||
import androidx.appcompat.widget.ActionMenuView;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import androidx.core.view.ActionProvider;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import java.util.ArrayList;
|
||||
public class ActionMenuPresenter extends BaseMenuPresenter implements ActionProvider.SubUiVisibilityListener {
|
||||
private static final String TAG = "ActionMenuPresenter";
|
||||
|
@ -192,7 +193,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter implements ActionProv
|
|||
public class OverflowPopup extends MenuPopupHelper {
|
||||
public OverflowPopup(Context context, MenuBuilder menuBuilder, View view, boolean z2) {
|
||||
super(context, menuBuilder, view, z2, R.attr.actionOverflowMenuStyle);
|
||||
setGravity(8388613);
|
||||
setGravity(GravityCompat.END);
|
||||
setPresenterCallback(ActionMenuPresenter.this.mPopupPresenterCallback);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ import androidx.appcompat.view.menu.MenuItemImpl;
|
|||
import androidx.appcompat.view.menu.MenuPresenter;
|
||||
import androidx.appcompat.view.menu.MenuView;
|
||||
import androidx.appcompat.widget.LinearLayoutCompat;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.ItemInvoker, MenuView {
|
||||
public static final int GENERATED_ITEM_PADDING = 4;
|
||||
public static final int MIN_CELL_SIZE = 56;
|
||||
|
@ -155,7 +156,7 @@ public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.It
|
|||
}
|
||||
layoutParams.expandable = z2;
|
||||
layoutParams.cellsUsed = i5;
|
||||
view.measure(View.MeasureSpec.makeMeasureSpec(i * i5, 1073741824), makeMeasureSpec);
|
||||
view.measure(View.MeasureSpec.makeMeasureSpec(i * i5, BasicMeasure.EXACTLY), makeMeasureSpec);
|
||||
return i5;
|
||||
}
|
||||
|
||||
|
@ -362,7 +363,7 @@ public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.It
|
|||
View childAt4 = getChildAt(i33);
|
||||
LayoutParams layoutParams5 = (LayoutParams) childAt4.getLayoutParams();
|
||||
if (layoutParams5.expanded) {
|
||||
childAt4.measure(View.MeasureSpec.makeMeasureSpec((layoutParams5.cellsUsed * i12) + layoutParams5.extraPixels, 1073741824), childMeasureSpec);
|
||||
childAt4.measure(View.MeasureSpec.makeMeasureSpec((layoutParams5.cellsUsed * i12) + layoutParams5.extraPixels, BasicMeasure.EXACTLY), childMeasureSpec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,8 @@ import android.os.AsyncTask;
|
|||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.util.Xml;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import com.adjust.sdk.Constants;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
|
@ -85,12 +86,12 @@ public class ActivityChooserModel extends DataSetObservable {
|
|||
|
||||
@Override // java.lang.Object
|
||||
public String toString() {
|
||||
StringBuilder P = a.P("[", "resolveInfo:");
|
||||
P.append(this.resolveInfo.toString());
|
||||
P.append("; weight:");
|
||||
P.append(new BigDecimal((double) this.weight));
|
||||
P.append("]");
|
||||
return P.toString();
|
||||
StringBuilder V = a.V("[", "resolveInfo:");
|
||||
V.append(this.resolveInfo.toString());
|
||||
V.append("; weight:");
|
||||
V.append(new BigDecimal((double) this.weight));
|
||||
V.append("]");
|
||||
return V.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,7 +120,7 @@ public class ActivityChooserModel extends DataSetObservable {
|
|||
ActivityResolveInfo activityResolveInfo2 = map.get(historicalRecord.activity);
|
||||
if (activityResolveInfo2 != null) {
|
||||
activityResolveInfo2.weight = (historicalRecord.weight * f) + activityResolveInfo2.weight;
|
||||
f *= 0.95f;
|
||||
f *= WEIGHT_DECAY_COEFFICIENT;
|
||||
}
|
||||
}
|
||||
Collections.sort(list);
|
||||
|
@ -168,14 +169,14 @@ public class ActivityChooserModel extends DataSetObservable {
|
|||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder P = a.P("[", "; activity:");
|
||||
P.append(this.activity);
|
||||
P.append("; time:");
|
||||
P.append(this.time);
|
||||
P.append("; weight:");
|
||||
P.append(new BigDecimal((double) this.weight));
|
||||
P.append("]");
|
||||
return P.toString();
|
||||
StringBuilder V = a.V("[", "; activity:");
|
||||
V.append(this.activity);
|
||||
V.append("; time:");
|
||||
V.append(this.time);
|
||||
V.append("; weight:");
|
||||
V.append(new BigDecimal((double) this.weight));
|
||||
V.append("]");
|
||||
return V.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,18 +212,18 @@ public class ActivityChooserModel extends DataSetObservable {
|
|||
XmlSerializer newSerializer = Xml.newSerializer();
|
||||
try {
|
||||
newSerializer.setOutput(openFileOutput, null);
|
||||
newSerializer.startDocument("UTF-8", Boolean.TRUE);
|
||||
newSerializer.startTag(null, "historical-records");
|
||||
newSerializer.startDocument(Constants.ENCODING, Boolean.TRUE);
|
||||
newSerializer.startTag(null, ActivityChooserModel.TAG_HISTORICAL_RECORDS);
|
||||
int size = list.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
HistoricalRecord historicalRecord = (HistoricalRecord) list.remove(0);
|
||||
newSerializer.startTag(null, "historical-record");
|
||||
newSerializer.attribute(null, "activity", historicalRecord.activity.flattenToString());
|
||||
newSerializer.startTag(null, ActivityChooserModel.TAG_HISTORICAL_RECORD);
|
||||
newSerializer.attribute(null, ActivityChooserModel.ATTRIBUTE_ACTIVITY, historicalRecord.activity.flattenToString());
|
||||
newSerializer.attribute(null, "time", String.valueOf(historicalRecord.time));
|
||||
newSerializer.attribute(null, "weight", String.valueOf(historicalRecord.weight));
|
||||
newSerializer.endTag(null, "historical-record");
|
||||
newSerializer.attribute(null, ActivityChooserModel.ATTRIBUTE_WEIGHT, String.valueOf(historicalRecord.weight));
|
||||
newSerializer.endTag(null, ActivityChooserModel.TAG_HISTORICAL_RECORD);
|
||||
}
|
||||
newSerializer.endTag(null, "historical-records");
|
||||
newSerializer.endTag(null, ActivityChooserModel.TAG_HISTORICAL_RECORDS);
|
||||
newSerializer.endDocument();
|
||||
ActivityChooserModel.this.mCanReadHistoricalData = true;
|
||||
} catch (IllegalArgumentException e) {
|
||||
|
@ -258,10 +259,10 @@ public class ActivityChooserModel extends DataSetObservable {
|
|||
|
||||
private ActivityChooserModel(Context context, String str) {
|
||||
this.mContext = context.getApplicationContext();
|
||||
if (TextUtils.isEmpty(str) || str.endsWith(".xml")) {
|
||||
if (TextUtils.isEmpty(str) || str.endsWith(HISTORY_FILE_EXTENSION)) {
|
||||
this.mHistoryFileName = str;
|
||||
} else {
|
||||
this.mHistoryFileName = a.u(str, ".xml");
|
||||
this.mHistoryFileName = a.v(str, HISTORY_FILE_EXTENSION);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -349,12 +350,12 @@ public class ActivityChooserModel extends DataSetObservable {
|
|||
FileInputStream openFileInput = this.mContext.openFileInput(this.mHistoryFileName);
|
||||
try {
|
||||
XmlPullParser newPullParser = Xml.newPullParser();
|
||||
newPullParser.setInput(openFileInput, "UTF-8");
|
||||
newPullParser.setInput(openFileInput, Constants.ENCODING);
|
||||
int i = 0;
|
||||
while (i != 1 && i != 2) {
|
||||
i = newPullParser.next();
|
||||
}
|
||||
if ("historical-records".equals(newPullParser.getName())) {
|
||||
if (TAG_HISTORICAL_RECORDS.equals(newPullParser.getName())) {
|
||||
List<HistoricalRecord> list = this.mHistoricalRecords;
|
||||
list.clear();
|
||||
while (true) {
|
||||
|
@ -364,8 +365,8 @@ public class ActivityChooserModel extends DataSetObservable {
|
|||
return;
|
||||
}
|
||||
} else if (!(next == 3 || next == 4)) {
|
||||
if ("historical-record".equals(newPullParser.getName())) {
|
||||
list.add(new HistoricalRecord(newPullParser.getAttributeValue(null, "activity"), Long.parseLong(newPullParser.getAttributeValue(null, "time")), Float.parseFloat(newPullParser.getAttributeValue(null, "weight"))));
|
||||
if (TAG_HISTORICAL_RECORD.equals(newPullParser.getName())) {
|
||||
list.add(new HistoricalRecord(newPullParser.getAttributeValue(null, ATTRIBUTE_ACTIVITY), Long.parseLong(newPullParser.getAttributeValue(null, "time")), Float.parseFloat(newPullParser.getAttributeValue(null, ATTRIBUTE_WEIGHT))));
|
||||
} else {
|
||||
throw new XmlPullParserException("Share records file not well-formed.");
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import androidx.annotation.RestrictTo;
|
|||
import androidx.appcompat.R;
|
||||
import androidx.appcompat.view.menu.ShowableListMenu;
|
||||
import androidx.appcompat.widget.ActivityChooserModel;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
import androidx.core.view.ActionProvider;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
|
||||
|
@ -505,7 +506,7 @@ public class ActivityChooserView extends ViewGroup implements ActivityChooserMod
|
|||
public void onMeasure(int i, int i2) {
|
||||
View view = this.mActivityChooserContent;
|
||||
if (this.mDefaultActivityButton.getVisibility() != 0) {
|
||||
i2 = View.MeasureSpec.makeMeasureSpec(View.MeasureSpec.getSize(i2), 1073741824);
|
||||
i2 = View.MeasureSpec.makeMeasureSpec(View.MeasureSpec.getSize(i2), BasicMeasure.EXACTLY);
|
||||
}
|
||||
measureChild(view, i, i2);
|
||||
setMeasuredDimension(view.getMeasuredWidth(), view.getMeasuredHeight());
|
||||
|
|
|
@ -9,6 +9,7 @@ import androidx.annotation.Nullable;
|
|||
import androidx.annotation.RestrictTo;
|
||||
import androidx.appcompat.R;
|
||||
import androidx.appcompat.widget.LinearLayoutCompat;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
|
||||
|
@ -22,7 +23,7 @@ public class AlertDialogLayout extends LinearLayoutCompat {
|
|||
}
|
||||
|
||||
private void forceUniformWidth(int i, int i2) {
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), 1073741824);
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), BasicMeasure.EXACTLY);
|
||||
for (int i3 = 0; i3 < i; i3++) {
|
||||
View childAt = getChildAt(i3);
|
||||
if (childAt.getVisibility() != 8) {
|
||||
|
@ -116,7 +117,7 @@ public class AlertDialogLayout extends LinearLayoutCompat {
|
|||
i8 -= min;
|
||||
i5 += min;
|
||||
}
|
||||
view2.measure(i, View.MeasureSpec.makeMeasureSpec(i5, 1073741824));
|
||||
view2.measure(i, View.MeasureSpec.makeMeasureSpec(i5, BasicMeasure.EXACTLY));
|
||||
paddingBottom = i9 + view2.getMeasuredHeight();
|
||||
i3 = View.combineMeasuredStates(i3, view2.getMeasuredState());
|
||||
}
|
||||
|
@ -154,7 +155,7 @@ public class AlertDialogLayout extends LinearLayoutCompat {
|
|||
int childCount = getChildCount();
|
||||
int gravity = getGravity();
|
||||
int i9 = gravity & 112;
|
||||
int i10 = gravity & 8388615;
|
||||
int i10 = gravity & GravityCompat.RELATIVE_HORIZONTAL_GRAVITY_MASK;
|
||||
int paddingTop = i9 != 16 ? i9 != 80 ? getPaddingTop() : ((getPaddingTop() + i4) - i2) - measuredHeight : (((i4 - i2) - measuredHeight) / 2) + getPaddingTop();
|
||||
Drawable dividerDrawable = getDividerDrawable();
|
||||
int intrinsicHeight = dividerDrawable == null ? 0 : dividerDrawable.getIntrinsicHeight();
|
||||
|
|
|
@ -167,17 +167,17 @@ public class AppCompatSpinner extends Spinner implements TintableBackgroundView
|
|||
|
||||
@Override // androidx.appcompat.widget.AppCompatSpinner.SpinnerPopup
|
||||
public void setBackgroundDrawable(Drawable drawable) {
|
||||
Log.e("AppCompatSpinner", "Cannot set popup background for MODE_DIALOG, ignoring");
|
||||
Log.e(AppCompatSpinner.TAG, "Cannot set popup background for MODE_DIALOG, ignoring");
|
||||
}
|
||||
|
||||
@Override // androidx.appcompat.widget.AppCompatSpinner.SpinnerPopup
|
||||
public void setHorizontalOffset(int i) {
|
||||
Log.e("AppCompatSpinner", "Cannot set horizontal offset for MODE_DIALOG, ignoring");
|
||||
Log.e(AppCompatSpinner.TAG, "Cannot set horizontal offset for MODE_DIALOG, ignoring");
|
||||
}
|
||||
|
||||
@Override // androidx.appcompat.widget.AppCompatSpinner.SpinnerPopup
|
||||
public void setHorizontalOriginalOffset(int i) {
|
||||
Log.e("AppCompatSpinner", "Cannot set horizontal (original) offset for MODE_DIALOG, ignoring");
|
||||
Log.e(AppCompatSpinner.TAG, "Cannot set horizontal (original) offset for MODE_DIALOG, ignoring");
|
||||
}
|
||||
|
||||
@Override // androidx.appcompat.widget.AppCompatSpinner.SpinnerPopup
|
||||
|
@ -187,7 +187,7 @@ public class AppCompatSpinner extends Spinner implements TintableBackgroundView
|
|||
|
||||
@Override // androidx.appcompat.widget.AppCompatSpinner.SpinnerPopup
|
||||
public void setVerticalOffset(int i) {
|
||||
Log.e("AppCompatSpinner", "Cannot set vertical offset for MODE_DIALOG, ignoring");
|
||||
Log.e(AppCompatSpinner.TAG, "Cannot set vertical offset for MODE_DIALOG, ignoring");
|
||||
}
|
||||
|
||||
@Override // androidx.appcompat.widget.AppCompatSpinner.SpinnerPopup
|
||||
|
@ -603,7 +603,7 @@ public class AppCompatSpinner extends Spinner implements TintableBackgroundView
|
|||
} catch (Exception e2) {
|
||||
e = e2;
|
||||
try {
|
||||
Log.i("AppCompatSpinner", "Could not read android:spinnerMode", e);
|
||||
Log.i(TAG, "Could not read android:spinnerMode", e);
|
||||
} catch (Throwable th2) {
|
||||
th = th2;
|
||||
typedArray2 = typedArray;
|
||||
|
@ -616,7 +616,7 @@ public class AppCompatSpinner extends Spinner implements TintableBackgroundView
|
|||
} catch (Exception e3) {
|
||||
e = e3;
|
||||
typedArray = null;
|
||||
Log.i("AppCompatSpinner", "Could not read android:spinnerMode", e);
|
||||
Log.i(TAG, "Could not read android:spinnerMode", e);
|
||||
} catch (Throwable th3) {
|
||||
th = th3;
|
||||
if (typedArray2 != null) {
|
||||
|
|
|
@ -23,7 +23,7 @@ import androidx.annotation.RestrictTo;
|
|||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.appcompat.R;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
|
@ -101,7 +101,7 @@ public class AppCompatTextViewAutoSizeHelper {
|
|||
Field textViewField = getTextViewField(str);
|
||||
return textViewField == null ? t : (T) textViewField.get(obj);
|
||||
} catch (IllegalAccessException e) {
|
||||
Log.w("ACTVAutoSizeHelper", "Failed to access TextView#" + str + " member", e);
|
||||
Log.w(TAG, "Failed to access TextView#" + str + " member", e);
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ public class AppCompatTextViewAutoSizeHelper {
|
|||
try {
|
||||
this.mImpl.computeAndSetTextDirection(obtain, this.mTextView);
|
||||
} catch (ClassCastException unused) {
|
||||
Log.w("ACTVAutoSizeHelper", "Failed to obtain TextDirectionHeuristic, auto size may be incorrect");
|
||||
Log.w(TAG, "Failed to obtain TextDirectionHeuristic, auto size may be incorrect");
|
||||
}
|
||||
return obtain.build();
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ public class AppCompatTextViewAutoSizeHelper {
|
|||
}
|
||||
return field;
|
||||
} catch (NoSuchFieldException e) {
|
||||
Log.w("ACTVAutoSizeHelper", "Failed to access TextView#" + str + " member", e);
|
||||
Log.w(TAG, "Failed to access TextView#" + str + " member", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ public class AppCompatTextViewAutoSizeHelper {
|
|||
}
|
||||
return method;
|
||||
} catch (Exception e) {
|
||||
Log.w("ACTVAutoSizeHelper", "Failed to retrieve TextView#" + str + "() method", e);
|
||||
Log.w(TAG, "Failed to retrieve TextView#" + str + "() method", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ public class AppCompatTextViewAutoSizeHelper {
|
|||
try {
|
||||
return (T) getTextViewMethod(str).invoke(obj, new Object[0]);
|
||||
} catch (Exception e) {
|
||||
Log.w("ACTVAutoSizeHelper", "Failed to invoke TextView#" + str + "() method", e);
|
||||
Log.w(TAG, "Failed to invoke TextView#" + str + "() method", e);
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ public class AppCompatTextViewAutoSizeHelper {
|
|||
textViewMethod.invoke(this.mTextView, new Object[0]);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.w("ACTVAutoSizeHelper", "Failed to invoke TextView#nullLayouts() method", e);
|
||||
Log.w(TAG, "Failed to invoke TextView#nullLayouts() method", e);
|
||||
}
|
||||
if (!isInLayout) {
|
||||
this.mTextView.requestLayout();
|
||||
|
@ -471,9 +471,9 @@ public class AppCompatTextViewAutoSizeHelper {
|
|||
}
|
||||
this.mAutoSizeTextSizesInPx = cleanupAutoSizePresetSizes(iArr2);
|
||||
if (!setupAutoSizeUniformPresetSizesConfiguration()) {
|
||||
StringBuilder L = a.L("None of the preset sizes is valid: ");
|
||||
L.append(Arrays.toString(iArr));
|
||||
throw new IllegalArgumentException(L.toString());
|
||||
StringBuilder R = a.R("None of the preset sizes is valid: ");
|
||||
R.append(Arrays.toString(iArr));
|
||||
throw new IllegalArgumentException(R.toString());
|
||||
}
|
||||
} else {
|
||||
this.mHasPresetAutoSizeValues = false;
|
||||
|
@ -498,7 +498,7 @@ public class AppCompatTextViewAutoSizeHelper {
|
|||
autoSizeText();
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException(a.l("Unknown auto-size text type: ", i));
|
||||
throw new IllegalArgumentException(a.p("Unknown auto-size text type: ", i));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ public class ButtonBarLayout extends LinearLayout {
|
|||
}
|
||||
super.onMeasure(i3, i2);
|
||||
if (this.mAllowStacking && !isStacked()) {
|
||||
if ((getMeasuredWidthAndState() & -16777216) == 16777216) {
|
||||
if ((getMeasuredWidthAndState() & ViewCompat.MEASURED_STATE_MASK) == 16777216) {
|
||||
setStacked(true);
|
||||
z2 = true;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import android.widget.FrameLayout;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RestrictTo;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
import androidx.core.view.ViewCompat;
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
||||
public class ContentFrameLayout extends FrameLayout {
|
||||
|
@ -147,7 +148,7 @@ public class ContentFrameLayout extends FrameLayout {
|
|||
i8 = 0;
|
||||
if (i8 > 0) {
|
||||
Rect rect = this.mDecorPadding;
|
||||
i = View.MeasureSpec.makeMeasureSpec(Math.min(i8 - (rect.left + rect.right), View.MeasureSpec.getSize(i)), 1073741824);
|
||||
i = View.MeasureSpec.makeMeasureSpec(Math.min(i8 - (rect.left + rect.right), View.MeasureSpec.getSize(i)), BasicMeasure.EXACTLY);
|
||||
z2 = true;
|
||||
if (mode2 == Integer.MIN_VALUE) {
|
||||
TypedValue typedValue2 = z4 ? this.mFixedHeightMajor : this.mFixedHeightMinor;
|
||||
|
@ -161,7 +162,7 @@ public class ContentFrameLayout extends FrameLayout {
|
|||
i6 = 0;
|
||||
if (i6 > 0) {
|
||||
Rect rect2 = this.mDecorPadding;
|
||||
i2 = View.MeasureSpec.makeMeasureSpec(Math.min(i6 - (rect2.top + rect2.bottom), View.MeasureSpec.getSize(i2)), 1073741824);
|
||||
i2 = View.MeasureSpec.makeMeasureSpec(Math.min(i6 - (rect2.top + rect2.bottom), View.MeasureSpec.getSize(i2)), BasicMeasure.EXACTLY);
|
||||
}
|
||||
}
|
||||
i6 = (int) fraction2;
|
||||
|
@ -171,7 +172,7 @@ public class ContentFrameLayout extends FrameLayout {
|
|||
}
|
||||
super.onMeasure(i, i2);
|
||||
measuredWidth = getMeasuredWidth();
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(measuredWidth, 1073741824);
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(measuredWidth, BasicMeasure.EXACTLY);
|
||||
if (!z2 && mode == Integer.MIN_VALUE) {
|
||||
TypedValue typedValue3 = !z4 ? this.mMinWidthMinor : this.mMinWidthMajor;
|
||||
if (!(typedValue3 == null || (i3 = typedValue3.type) == 0)) {
|
||||
|
@ -187,7 +188,7 @@ public class ContentFrameLayout extends FrameLayout {
|
|||
i4 -= rect3.left + rect3.right;
|
||||
}
|
||||
if (measuredWidth < i4) {
|
||||
makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(i4, 1073741824);
|
||||
makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(i4, BasicMeasure.EXACTLY);
|
||||
if (z3) {
|
||||
super.onMeasure(makeMeasureSpec, i2);
|
||||
return;
|
||||
|
@ -217,7 +218,7 @@ public class ContentFrameLayout extends FrameLayout {
|
|||
}
|
||||
super.onMeasure(i, i2);
|
||||
measuredWidth = getMeasuredWidth();
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(measuredWidth, 1073741824);
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(measuredWidth, BasicMeasure.EXACTLY);
|
||||
if (!z4) {
|
||||
}
|
||||
if (i3 != 5) {
|
||||
|
|
|
@ -61,7 +61,7 @@ public class DrawableUtils {
|
|||
}
|
||||
|
||||
public static void fixDrawable(@NonNull Drawable drawable) {
|
||||
if (Build.VERSION.SDK_INT == 21 && "android.graphics.drawable.VectorDrawable".equals(drawable.getClass().getName())) {
|
||||
if (Build.VERSION.SDK_INT == 21 && VECTOR_DRAWABLE_CLAZZ_NAME.equals(drawable.getClass().getName())) {
|
||||
fixVectorDrawableTinting(drawable);
|
||||
}
|
||||
}
|
||||
|
@ -95,47 +95,47 @@ public class DrawableUtils {
|
|||
Field[] fields = sInsetsClazz.getFields();
|
||||
for (Field field : fields) {
|
||||
String name = field.getName();
|
||||
char c2 = 65535;
|
||||
char c = 65535;
|
||||
switch (name.hashCode()) {
|
||||
case -1383228885:
|
||||
if (name.equals("bottom")) {
|
||||
c2 = 3;
|
||||
c = 3;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 115029:
|
||||
if (name.equals("top")) {
|
||||
c2 = 1;
|
||||
c = 1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3317767:
|
||||
if (name.equals("left")) {
|
||||
c2 = 0;
|
||||
c = 0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 108511772:
|
||||
if (name.equals("right")) {
|
||||
c2 = 2;
|
||||
c = 2;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (c2 == 0) {
|
||||
if (c == 0) {
|
||||
rect2.left = field.getInt(invoke);
|
||||
} else if (c2 == 1) {
|
||||
} else if (c == 1) {
|
||||
rect2.top = field.getInt(invoke);
|
||||
} else if (c2 == 2) {
|
||||
} else if (c == 2) {
|
||||
rect2.right = field.getInt(invoke);
|
||||
} else if (c2 == 3) {
|
||||
} else if (c == 3) {
|
||||
rect2.bottom = field.getInt(invoke);
|
||||
}
|
||||
}
|
||||
return rect2;
|
||||
}
|
||||
} catch (Exception unused) {
|
||||
Log.e("DrawableUtils", "Couldn't obtain the optical insets. Ignoring.");
|
||||
Log.e(TAG, "Couldn't obtain the optical insets. Ignoring.");
|
||||
}
|
||||
}
|
||||
return INSETS_NONE;
|
||||
|
|
|
@ -14,6 +14,7 @@ import android.widget.ListView;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.R;
|
||||
import androidx.appcompat.graphics.drawable.DrawableWrapper;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import androidx.core.view.ViewPropertyAnimatorCompat;
|
||||
import androidx.core.widget.ListViewAutoScrollHelper;
|
||||
|
@ -329,7 +330,7 @@ public class DropDownListView extends ListView {
|
|||
view.setLayoutParams(layoutParams);
|
||||
}
|
||||
int i10 = layoutParams.height;
|
||||
view.measure(i, i10 > 0 ? View.MeasureSpec.makeMeasureSpec(i10, 1073741824) : View.MeasureSpec.makeMeasureSpec(0, 0));
|
||||
view.measure(i, i10 > 0 ? View.MeasureSpec.makeMeasureSpec(i10, BasicMeasure.EXACTLY) : View.MeasureSpec.makeMeasureSpec(0, 0));
|
||||
view.forceLayout();
|
||||
if (i7 > 0) {
|
||||
i6 += dividerHeight;
|
||||
|
|
|
@ -13,9 +13,12 @@ import androidx.annotation.NonNull;
|
|||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RestrictTo;
|
||||
import androidx.appcompat.R;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.core.view.InputDeviceCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import com.google.android.material.badge.BadgeDrawable;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
public class LinearLayoutCompat extends ViewGroup {
|
||||
|
@ -113,7 +116,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
this.mBaselineAligned = true;
|
||||
this.mBaselineAlignedChildIndex = -1;
|
||||
this.mBaselineChildTop = 0;
|
||||
this.mGravity = 8388659;
|
||||
this.mGravity = BadgeDrawable.TOP_START;
|
||||
int[] iArr = R.styleable.LinearLayoutCompat;
|
||||
TintTypedArray obtainStyledAttributes = TintTypedArray.obtainStyledAttributes(context, attributeSet, iArr, i, 0);
|
||||
ViewCompat.saveAttributeDataForStyleable(this, context, iArr, attributeSet, obtainStyledAttributes.getWrappedTypeArray(), i, 0);
|
||||
|
@ -139,7 +142,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
}
|
||||
|
||||
private void forceUniformHeight(int i, int i2) {
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredHeight(), 1073741824);
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredHeight(), BasicMeasure.EXACTLY);
|
||||
for (int i3 = 0; i3 < i; i3++) {
|
||||
View virtualChildAt = getVirtualChildAt(i3);
|
||||
if (virtualChildAt.getVisibility() != 8) {
|
||||
|
@ -155,7 +158,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
}
|
||||
|
||||
private void forceUniformWidth(int i, int i2) {
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), 1073741824);
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), BasicMeasure.EXACTLY);
|
||||
for (int i3 = 0; i3 < i; i3++) {
|
||||
View virtualChildAt = getVirtualChildAt(i3);
|
||||
if (virtualChildAt.getVisibility() != 8) {
|
||||
|
@ -499,7 +502,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
int virtualChildCount = getVirtualChildCount();
|
||||
int i9 = this.mGravity;
|
||||
int i10 = i9 & 112;
|
||||
int i11 = i9 & 8388615;
|
||||
int i11 = i9 & GravityCompat.RELATIVE_HORIZONTAL_GRAVITY_MASK;
|
||||
int paddingTop = i10 != 16 ? i10 != 80 ? getPaddingTop() : ((getPaddingTop() + i4) - i2) - this.mTotalLength : getPaddingTop() + (((i4 - i2) - this.mTotalLength) / 2);
|
||||
int i12 = 0;
|
||||
while (i12 < virtualChildCount) {
|
||||
|
@ -598,7 +601,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
iArr2[0] = -1;
|
||||
boolean z6 = this.mBaselineAligned;
|
||||
boolean z7 = this.mUseLargestChild;
|
||||
int i20 = 1073741824;
|
||||
int i20 = BasicMeasure.EXACTLY;
|
||||
boolean z8 = mode == 1073741824;
|
||||
float f2 = 0.0f;
|
||||
int i21 = 0;
|
||||
|
@ -642,7 +645,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
z4 = z7;
|
||||
z3 = z6;
|
||||
view = virtualChildAt;
|
||||
i17 = 1073741824;
|
||||
i17 = BasicMeasure.EXACTLY;
|
||||
z9 = true;
|
||||
if (mode2 == i17 && ((ViewGroup.MarginLayoutParams) layoutParams).height == -1) {
|
||||
z5 = true;
|
||||
|
@ -682,7 +685,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
iArr2 = iArr2;
|
||||
z7 = z4;
|
||||
z6 = z3;
|
||||
i20 = 1073741824;
|
||||
i20 = BasicMeasure.EXACTLY;
|
||||
}
|
||||
} else {
|
||||
if (((ViewGroup.MarginLayoutParams) layoutParams).width != 0 || f3 <= 0.0f) {
|
||||
|
@ -711,7 +714,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
i22 = Math.max(measuredWidth, i22);
|
||||
}
|
||||
}
|
||||
i17 = 1073741824;
|
||||
i17 = BasicMeasure.EXACTLY;
|
||||
if (mode2 == i17) {
|
||||
}
|
||||
z5 = false;
|
||||
|
@ -735,7 +738,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
iArr2 = iArr2;
|
||||
z7 = z4;
|
||||
z6 = z3;
|
||||
i20 = 1073741824;
|
||||
i20 = BasicMeasure.EXACTLY;
|
||||
}
|
||||
i15 = i21;
|
||||
z4 = z7;
|
||||
|
@ -744,7 +747,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
iArr2 = iArr2;
|
||||
z7 = z4;
|
||||
z6 = z3;
|
||||
i20 = 1073741824;
|
||||
i20 = BasicMeasure.EXACTLY;
|
||||
}
|
||||
if (this.mTotalLength > 0 && hasDividerBeforeChildAt(virtualChildCount)) {
|
||||
this.mTotalLength += this.mDividerWidth;
|
||||
|
@ -819,25 +822,25 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
i9 = virtualChildCount;
|
||||
int childMeasureSpec = ViewGroup.getChildMeasureSpec(i2, getPaddingBottom() + getPaddingTop() + ((ViewGroup.MarginLayoutParams) layoutParams3).topMargin + ((ViewGroup.MarginLayoutParams) layoutParams3).bottomMargin, ((ViewGroup.MarginLayoutParams) layoutParams3).height);
|
||||
if (((ViewGroup.MarginLayoutParams) layoutParams3).width == 0) {
|
||||
i13 = 1073741824;
|
||||
i13 = BasicMeasure.EXACTLY;
|
||||
if (mode == 1073741824) {
|
||||
if (i38 <= 0) {
|
||||
i38 = 0;
|
||||
}
|
||||
virtualChildAt3.measure(View.MeasureSpec.makeMeasureSpec(i38, 1073741824), childMeasureSpec);
|
||||
i35 = View.combineMeasuredStates(i35, virtualChildAt3.getMeasuredState() & -16777216);
|
||||
virtualChildAt3.measure(View.MeasureSpec.makeMeasureSpec(i38, BasicMeasure.EXACTLY), childMeasureSpec);
|
||||
i35 = View.combineMeasuredStates(i35, virtualChildAt3.getMeasuredState() & ViewCompat.MEASURED_STATE_MASK);
|
||||
f2 = f7;
|
||||
i10 = i39;
|
||||
}
|
||||
} else {
|
||||
i13 = 1073741824;
|
||||
i13 = BasicMeasure.EXACTLY;
|
||||
}
|
||||
int measuredWidth2 = virtualChildAt3.getMeasuredWidth() + i38;
|
||||
if (measuredWidth2 < 0) {
|
||||
measuredWidth2 = 0;
|
||||
}
|
||||
virtualChildAt3.measure(View.MeasureSpec.makeMeasureSpec(measuredWidth2, i13), childMeasureSpec);
|
||||
i35 = View.combineMeasuredStates(i35, virtualChildAt3.getMeasuredState() & -16777216);
|
||||
i35 = View.combineMeasuredStates(i35, virtualChildAt3.getMeasuredState() & ViewCompat.MEASURED_STATE_MASK);
|
||||
f2 = f7;
|
||||
i10 = i39;
|
||||
} else {
|
||||
|
@ -907,7 +910,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
for (int i43 = 0; i43 < virtualChildCount; i43++) {
|
||||
View virtualChildAt4 = getVirtualChildAt(i43);
|
||||
if (!(virtualChildAt4 == null || virtualChildAt4.getVisibility() == 8 || ((LayoutParams) virtualChildAt4.getLayoutParams()).weight <= 0.0f)) {
|
||||
virtualChildAt4.measure(View.MeasureSpec.makeMeasureSpec(i22, 1073741824), View.MeasureSpec.makeMeasureSpec(virtualChildAt4.getMeasuredHeight(), 1073741824));
|
||||
virtualChildAt4.measure(View.MeasureSpec.makeMeasureSpec(i22, BasicMeasure.EXACTLY), View.MeasureSpec.makeMeasureSpec(virtualChildAt4.getMeasuredHeight(), BasicMeasure.EXACTLY));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -918,7 +921,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
if (z10 || mode2 == 1073741824) {
|
||||
i8 = i6;
|
||||
}
|
||||
setMeasuredDimension(resolveSizeAndState | (i3 & -16777216), View.resolveSizeAndState(Math.max(getPaddingBottom() + getPaddingTop() + i8, getSuggestedMinimumHeight()), i7, i3 << 16));
|
||||
setMeasuredDimension(resolveSizeAndState | (i3 & ViewCompat.MEASURED_STATE_MASK), View.resolveSizeAndState(Math.max(getPaddingBottom() + getPaddingTop() + i8, getSuggestedMinimumHeight()), i7, i3 << 16));
|
||||
if (z11) {
|
||||
forceUniformHeight(i5, i);
|
||||
}
|
||||
|
@ -1122,24 +1125,24 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
i7 = i36 - i39;
|
||||
int childMeasureSpec = ViewGroup.getChildMeasureSpec(i, getPaddingRight() + getPaddingLeft() + ((ViewGroup.MarginLayoutParams) layoutParams3).leftMargin + ((ViewGroup.MarginLayoutParams) layoutParams3).rightMargin, ((ViewGroup.MarginLayoutParams) layoutParams3).width);
|
||||
if (((ViewGroup.MarginLayoutParams) layoutParams3).height == 0) {
|
||||
i10 = 1073741824;
|
||||
i10 = BasicMeasure.EXACTLY;
|
||||
if (mode2 == 1073741824) {
|
||||
if (i39 <= 0) {
|
||||
i39 = 0;
|
||||
}
|
||||
virtualChildAt3.measure(childMeasureSpec, View.MeasureSpec.makeMeasureSpec(i39, 1073741824));
|
||||
i5 = View.combineMeasuredStates(i5, virtualChildAt3.getMeasuredState() & -256);
|
||||
virtualChildAt3.measure(childMeasureSpec, View.MeasureSpec.makeMeasureSpec(i39, BasicMeasure.EXACTLY));
|
||||
i5 = View.combineMeasuredStates(i5, virtualChildAt3.getMeasuredState() & InputDeviceCompat.SOURCE_ANY);
|
||||
f = f6;
|
||||
}
|
||||
} else {
|
||||
i10 = 1073741824;
|
||||
i10 = BasicMeasure.EXACTLY;
|
||||
}
|
||||
int measuredHeight2 = virtualChildAt3.getMeasuredHeight() + i39;
|
||||
if (measuredHeight2 < 0) {
|
||||
measuredHeight2 = 0;
|
||||
}
|
||||
virtualChildAt3.measure(childMeasureSpec, View.MeasureSpec.makeMeasureSpec(measuredHeight2, i10));
|
||||
i5 = View.combineMeasuredStates(i5, virtualChildAt3.getMeasuredState() & -256);
|
||||
i5 = View.combineMeasuredStates(i5, virtualChildAt3.getMeasuredState() & InputDeviceCompat.SOURCE_ANY);
|
||||
f = f6;
|
||||
} else {
|
||||
i7 = i36;
|
||||
|
@ -1193,7 +1196,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
for (int i42 = 0; i42 < i3; i42++) {
|
||||
View virtualChildAt4 = getVirtualChildAt(i42);
|
||||
if (!(virtualChildAt4 == null || virtualChildAt4.getVisibility() == 8 || ((LayoutParams) virtualChildAt4.getLayoutParams()).weight <= 0.0f)) {
|
||||
virtualChildAt4.measure(View.MeasureSpec.makeMeasureSpec(virtualChildAt4.getMeasuredWidth(), 1073741824), View.MeasureSpec.makeMeasureSpec(i24, 1073741824));
|
||||
virtualChildAt4.measure(View.MeasureSpec.makeMeasureSpec(virtualChildAt4.getMeasuredWidth(), BasicMeasure.EXACTLY), View.MeasureSpec.makeMeasureSpec(i24, BasicMeasure.EXACTLY));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1227,13 +1230,13 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
@Override // android.view.View
|
||||
public void onInitializeAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
|
||||
super.onInitializeAccessibilityEvent(accessibilityEvent);
|
||||
accessibilityEvent.setClassName("androidx.appcompat.widget.LinearLayoutCompat");
|
||||
accessibilityEvent.setClassName(ACCESSIBILITY_CLASS_NAME);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
|
||||
super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
|
||||
accessibilityNodeInfo.setClassName("androidx.appcompat.widget.LinearLayoutCompat");
|
||||
accessibilityNodeInfo.setClassName(ACCESSIBILITY_CLASS_NAME);
|
||||
}
|
||||
|
||||
@Override // android.view.ViewGroup, android.view.View
|
||||
|
@ -1260,10 +1263,10 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
|
||||
public void setBaselineAlignedChildIndex(int i) {
|
||||
if (i < 0 || i >= getChildCount()) {
|
||||
StringBuilder L = a.L("base aligned child index out of range (0, ");
|
||||
L.append(getChildCount());
|
||||
L.append(")");
|
||||
throw new IllegalArgumentException(L.toString());
|
||||
StringBuilder R = a.R("base aligned child index out of range (0, ");
|
||||
R.append(getChildCount());
|
||||
R.append(")");
|
||||
throw new IllegalArgumentException(R.toString());
|
||||
}
|
||||
this.mBaselineAlignedChildIndex = i;
|
||||
}
|
||||
|
@ -1294,7 +1297,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
public void setGravity(int i) {
|
||||
if (this.mGravity != i) {
|
||||
if ((8388615 & i) == 0) {
|
||||
i |= 8388611;
|
||||
i |= GravityCompat.START;
|
||||
}
|
||||
if ((i & 112) == 0) {
|
||||
i |= 48;
|
||||
|
@ -1305,7 +1308,7 @@ public class LinearLayoutCompat extends ViewGroup {
|
|||
}
|
||||
|
||||
public void setHorizontalGravity(int i) {
|
||||
int i2 = i & 8388615;
|
||||
int i2 = i & GravityCompat.RELATIVE_HORIZONTAL_GRAVITY_MASK;
|
||||
int i3 = this.mGravity;
|
||||
if ((8388615 & i3) != i2) {
|
||||
this.mGravity = i2 | (-8388616 & i3);
|
||||
|
|
|
@ -27,9 +27,11 @@ import androidx.annotation.RestrictTo;
|
|||
import androidx.annotation.StyleRes;
|
||||
import androidx.appcompat.R;
|
||||
import androidx.appcompat.view.menu.ShowableListMenu;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
import androidx.core.view.PointerIconCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.widget.PopupWindowCompat;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import java.lang.reflect.Method;
|
||||
public class ListPopupWindow implements ShowableListMenu {
|
||||
private static final boolean DEBUG = false;
|
||||
|
@ -214,19 +216,19 @@ public class ListPopupWindow implements ShowableListMenu {
|
|||
try {
|
||||
sSetClipToWindowEnabledMethod = PopupWindow.class.getDeclaredMethod("setClipToScreenEnabled", Boolean.TYPE);
|
||||
} catch (NoSuchMethodException unused) {
|
||||
Log.i("ListPopupWindow", "Could not find method setClipToScreenEnabled() on PopupWindow. Oh well.");
|
||||
Log.i(TAG, "Could not find method setClipToScreenEnabled() on PopupWindow. Oh well.");
|
||||
}
|
||||
try {
|
||||
sSetEpicenterBoundsMethod = PopupWindow.class.getDeclaredMethod("setEpicenterBounds", Rect.class);
|
||||
} catch (NoSuchMethodException unused2) {
|
||||
Log.i("ListPopupWindow", "Could not find method setEpicenterBounds(Rect) on PopupWindow. Oh well.");
|
||||
Log.i(TAG, "Could not find method setEpicenterBounds(Rect) on PopupWindow. Oh well.");
|
||||
}
|
||||
}
|
||||
if (Build.VERSION.SDK_INT <= 23) {
|
||||
try {
|
||||
sGetMaxAvailableHeightMethod = PopupWindow.class.getDeclaredMethod("getMaxAvailableHeight", View.class, Integer.TYPE, Boolean.TYPE);
|
||||
} catch (NoSuchMethodException unused3) {
|
||||
Log.i("ListPopupWindow", "Could not find method getMaxAvailableHeight(View, int, boolean) on PopupWindow. Oh well.");
|
||||
Log.i(TAG, "Could not find method getMaxAvailableHeight(View, int, boolean) on PopupWindow. Oh well.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -246,7 +248,7 @@ public class ListPopupWindow implements ShowableListMenu {
|
|||
public ListPopupWindow(@NonNull Context context, @Nullable AttributeSet attributeSet, @AttrRes int i, @StyleRes int i2) {
|
||||
this.mDropDownHeight = -2;
|
||||
this.mDropDownWidth = -2;
|
||||
this.mDropDownWindowLayoutType = 1002;
|
||||
this.mDropDownWindowLayoutType = PointerIconCompat.TYPE_HAND;
|
||||
this.mDropDownGravity = 0;
|
||||
this.mDropDownAlwaysVisible = false;
|
||||
this.mForceIgnoreOutsideTouch = false;
|
||||
|
@ -310,9 +312,9 @@ public class ListPopupWindow implements ShowableListMenu {
|
|||
linearLayout.addView(view);
|
||||
linearLayout.addView(dropDownListView, layoutParams);
|
||||
} else if (i5 != 1) {
|
||||
StringBuilder L = a.L("Invalid hint position ");
|
||||
L.append(this.mPromptPosition);
|
||||
Log.e("ListPopupWindow", L.toString());
|
||||
StringBuilder R = a.R("Invalid hint position ");
|
||||
R.append(this.mPromptPosition);
|
||||
Log.e(TAG, R.toString());
|
||||
} else {
|
||||
linearLayout.addView(dropDownListView, layoutParams);
|
||||
linearLayout.addView(view);
|
||||
|
@ -368,11 +370,11 @@ public class ListPopupWindow implements ShowableListMenu {
|
|||
Rect rect2 = this.mTempRect;
|
||||
i3 = View.MeasureSpec.makeMeasureSpec(i9 - (rect2.left + rect2.right), Integer.MIN_VALUE);
|
||||
} else if (i8 != -1) {
|
||||
i3 = View.MeasureSpec.makeMeasureSpec(i8, 1073741824);
|
||||
i3 = View.MeasureSpec.makeMeasureSpec(i8, BasicMeasure.EXACTLY);
|
||||
} else {
|
||||
int i10 = this.mContext.getResources().getDisplayMetrics().widthPixels;
|
||||
Rect rect3 = this.mTempRect;
|
||||
i3 = View.MeasureSpec.makeMeasureSpec(i10 - (rect3.left + rect3.right), 1073741824);
|
||||
i3 = View.MeasureSpec.makeMeasureSpec(i10 - (rect3.left + rect3.right), BasicMeasure.EXACTLY);
|
||||
}
|
||||
int measureHeightOfChildrenCompat = this.mDropDownList.measureHeightOfChildrenCompat(i3, 0, -1, maxAvailableHeight - i, -1);
|
||||
if (measureHeightOfChildrenCompat > 0) {
|
||||
|
@ -390,7 +392,7 @@ public class ListPopupWindow implements ShowableListMenu {
|
|||
try {
|
||||
return ((Integer) method.invoke(this.mPopup, view, Integer.valueOf(i), Boolean.valueOf(z2))).intValue();
|
||||
} catch (Exception unused) {
|
||||
Log.i("ListPopupWindow", "Could not call getMaxAvailableHeightMethod(View, int, boolean) on PopupWindow. Using the public version.");
|
||||
Log.i(TAG, "Could not call getMaxAvailableHeightMethod(View, int, boolean) on PopupWindow. Using the public version.");
|
||||
}
|
||||
}
|
||||
return this.mPopup.getMaxAvailableHeight(view, i);
|
||||
|
@ -417,7 +419,7 @@ public class ListPopupWindow implements ShowableListMenu {
|
|||
try {
|
||||
method.invoke(this.mPopup, Boolean.valueOf(z2));
|
||||
} catch (Exception unused) {
|
||||
Log.i("ListPopupWindow", "Could not call setClipToScreenEnabled() on PopupWindow. Oh well.");
|
||||
Log.i(TAG, "Could not call setClipToScreenEnabled() on PopupWindow. Oh well.");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -837,7 +839,7 @@ public class ListPopupWindow implements ShowableListMenu {
|
|||
try {
|
||||
method.invoke(this.mPopup, this.mEpicenterBounds);
|
||||
} catch (Exception e) {
|
||||
Log.e("ListPopupWindow", "Could not invoke setEpicenterBounds on PopupWindow", e);
|
||||
Log.e(TAG, "Could not invoke setEpicenterBounds on PopupWindow", e);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -156,7 +156,7 @@ public class MenuPopupWindow extends ListPopupWindow implements MenuItemHoverLis
|
|||
sSetTouchModalMethod = PopupWindow.class.getDeclaredMethod("setTouchModal", Boolean.TYPE);
|
||||
}
|
||||
} catch (NoSuchMethodException unused) {
|
||||
Log.i("MenuPopupWindow", "Could not find method setTouchModal() on PopupWindow. Oh well.");
|
||||
Log.i(TAG, "Could not find method setTouchModal() on PopupWindow. Oh well.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ public class MenuPopupWindow extends ListPopupWindow implements MenuItemHoverLis
|
|||
try {
|
||||
method.invoke(this.mPopup, Boolean.valueOf(z2));
|
||||
} catch (Exception unused) {
|
||||
Log.i("MenuPopupWindow", "Could not invoke setTouchModal() on PopupWindow. Oh well.");
|
||||
Log.i(TAG, "Could not invoke setTouchModal() on PopupWindow. Oh well.");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -255,7 +255,7 @@ public final class ResourceManagerInternal {
|
|||
}
|
||||
|
||||
private static boolean isVectorDrawable(@NonNull Drawable drawable) {
|
||||
return (drawable instanceof VectorDrawableCompat) || "android.graphics.drawable.VectorDrawable".equals(drawable.getClass().getName());
|
||||
return (drawable instanceof VectorDrawableCompat) || PLATFORM_VD_CLAZZ.equals(drawable.getClass().getName());
|
||||
}
|
||||
|
||||
private Drawable loadDrawableFromDelegates(@NonNull Context context, @DrawableRes int i) {
|
||||
|
@ -268,7 +268,7 @@ public final class ResourceManagerInternal {
|
|||
SparseArrayCompat<String> sparseArrayCompat = this.mKnownDrawableIdTags;
|
||||
if (sparseArrayCompat != null) {
|
||||
String str = sparseArrayCompat.get(i);
|
||||
if ("appcompat_skip_skip".equals(str) || (str != null && this.mDelegates.get(str) == null)) {
|
||||
if (SKIP_DRAWABLE_TAG.equals(str) || (str != null && this.mDelegates.get(str) == null)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
@ -305,7 +305,7 @@ public final class ResourceManagerInternal {
|
|||
throw new XmlPullParserException("No start tag found");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("ResourceManagerInternal", "Exception while inflating drawable", e);
|
||||
Log.e(TAG, "Exception while inflating drawable", e);
|
||||
}
|
||||
while (true) {
|
||||
next = xml.next();
|
||||
|
@ -315,7 +315,7 @@ public final class ResourceManagerInternal {
|
|||
}
|
||||
}
|
||||
if (cachedDrawable == null) {
|
||||
this.mKnownDrawableIdTags.append(i, "appcompat_skip_skip");
|
||||
this.mKnownDrawableIdTags.append(i, SKIP_DRAWABLE_TAG);
|
||||
}
|
||||
return cachedDrawable;
|
||||
}
|
||||
|
@ -356,7 +356,7 @@ public final class ResourceManagerInternal {
|
|||
}
|
||||
return;
|
||||
}
|
||||
Log.d("ResourceManagerInternal", "Mutated drawable is not the same instance as the input.");
|
||||
Log.d(TAG, "Mutated drawable is not the same instance as the input.");
|
||||
}
|
||||
|
||||
public synchronized Drawable getDrawable(@NonNull Context context, @DrawableRes int i) {
|
||||
|
|
|
@ -29,6 +29,7 @@ import androidx.appcompat.R;
|
|||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.view.ActionBarPolicy;
|
||||
import androidx.appcompat.widget.LinearLayoutCompat;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
|
||||
public class ScrollingTabContainerView extends HorizontalScrollView implements AdapterView.OnItemSelectedListener {
|
||||
private static final int FADE_DURATION = 200;
|
||||
|
@ -143,13 +144,13 @@ public class ScrollingTabContainerView extends HorizontalScrollView implements A
|
|||
@Override // android.view.View
|
||||
public void onInitializeAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
|
||||
super.onInitializeAccessibilityEvent(accessibilityEvent);
|
||||
accessibilityEvent.setClassName("androidx.appcompat.app.ActionBar$Tab");
|
||||
accessibilityEvent.setClassName(ACCESSIBILITY_CLASS_NAME);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
|
||||
super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
|
||||
accessibilityNodeInfo.setClassName("androidx.appcompat.app.ActionBar$Tab");
|
||||
accessibilityNodeInfo.setClassName(ACCESSIBILITY_CLASS_NAME);
|
||||
}
|
||||
|
||||
@Override // android.widget.LinearLayout, android.view.View
|
||||
|
@ -157,7 +158,7 @@ public class ScrollingTabContainerView extends HorizontalScrollView implements A
|
|||
int i3;
|
||||
super.onMeasure(i, i2);
|
||||
if (ScrollingTabContainerView.this.mMaxTabWidth > 0 && getMeasuredWidth() > (i3 = ScrollingTabContainerView.this.mMaxTabWidth)) {
|
||||
super.onMeasure(View.MeasureSpec.makeMeasureSpec(i3, 1073741824), i2);
|
||||
super.onMeasure(View.MeasureSpec.makeMeasureSpec(i3, BasicMeasure.EXACTLY), i2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -472,7 +473,7 @@ public class ScrollingTabContainerView extends HorizontalScrollView implements A
|
|||
}
|
||||
this.mMaxTabWidth = Math.min(this.mMaxTabWidth, this.mStackedTabMaxWidth);
|
||||
}
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(this.mContentHeight, 1073741824);
|
||||
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(this.mContentHeight, BasicMeasure.EXACTLY);
|
||||
if (z3 || !this.mAllowCollapse) {
|
||||
z2 = false;
|
||||
}
|
||||
|
|
|
@ -44,10 +44,12 @@ import androidx.annotation.Nullable;
|
|||
import androidx.annotation.RestrictTo;
|
||||
import androidx.appcompat.R;
|
||||
import androidx.appcompat.view.CollapsibleActionView;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.cursoradapter.widget.CursorAdapter;
|
||||
import androidx.customview.view.AbsSavedState;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import com.discord.widgets.chat.input.autocomplete.AutocompleteViewModel;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.WeakHashMap;
|
||||
public class SearchView extends LinearLayoutCompat implements CollapsibleActionView {
|
||||
|
@ -377,10 +379,10 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
|
|||
|
||||
@Override // java.lang.Object
|
||||
public String toString() {
|
||||
StringBuilder L = a.L("SearchView.SavedState{");
|
||||
L.append(Integer.toHexString(System.identityHashCode(this)));
|
||||
L.append(" isIconified=");
|
||||
return a.G(L, this.isIconified, "}");
|
||||
StringBuilder R = a.R("SearchView.SavedState{");
|
||||
R.append(Integer.toHexString(System.identityHashCode(this)));
|
||||
R.append(" isIconified=");
|
||||
return a.M(R, this.isIconified, "}");
|
||||
}
|
||||
|
||||
@Override // androidx.customview.view.AbsSavedState, android.os.Parcelable
|
||||
|
@ -775,7 +777,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
|
|||
columnString3 = this.mSearchable.getSuggestIntentData();
|
||||
}
|
||||
if (!(columnString3 == null || (columnString = SuggestionsAdapter.getColumnString(cursor, "suggest_intent_data_id")) == null)) {
|
||||
columnString3 = columnString3 + "/" + Uri.encode(columnString);
|
||||
columnString3 = columnString3 + AutocompleteViewModel.COMMAND_DISCOVER_TOKEN + Uri.encode(columnString);
|
||||
}
|
||||
return createIntent(columnString2, columnString3 == null ? null : Uri.parse(columnString3), SuggestionsAdapter.getColumnString(cursor, "suggest_intent_extra_data"), SuggestionsAdapter.getColumnString(cursor, "suggest_intent_query"), i, str);
|
||||
} catch (RuntimeException e) {
|
||||
|
@ -784,7 +786,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
|
|||
} catch (RuntimeException unused) {
|
||||
i2 = -1;
|
||||
}
|
||||
Log.w("SearchView", "Search suggestions cursor at row " + i2 + " returned exception.", e);
|
||||
Log.w(LOG_TAG, "Search suggestions cursor at row " + i2 + " returned exception.", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -793,7 +795,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
|
|||
ComponentName searchActivity = searchableInfo.getSearchActivity();
|
||||
Intent intent2 = new Intent("android.intent.action.SEARCH");
|
||||
intent2.setComponent(searchActivity);
|
||||
PendingIntent activity = PendingIntent.getActivity(getContext(), 0, intent2, 1073741824);
|
||||
PendingIntent activity = PendingIntent.getActivity(getContext(), 0, intent2, BasicMeasure.EXACTLY);
|
||||
Bundle bundle = new Bundle();
|
||||
Bundle bundle2 = this.mAppSearchData;
|
||||
if (bundle2 != null) {
|
||||
|
@ -891,7 +893,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
|
|||
try {
|
||||
getContext().startActivity(intent);
|
||||
} catch (RuntimeException e) {
|
||||
Log.e("SearchView", "Failed launch activity: " + intent, e);
|
||||
Log.e(LOG_TAG, "Failed launch activity: " + intent, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1218,7 +1220,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
|
|||
} else if (mode2 == 0) {
|
||||
size2 = getPreferredHeight();
|
||||
}
|
||||
super.onMeasure(View.MeasureSpec.makeMeasureSpec(size, 1073741824), View.MeasureSpec.makeMeasureSpec(size2, 1073741824));
|
||||
super.onMeasure(View.MeasureSpec.makeMeasureSpec(size, BasicMeasure.EXACTLY), View.MeasureSpec.makeMeasureSpec(size2, BasicMeasure.EXACTLY));
|
||||
}
|
||||
|
||||
public void onQueryRefine(CharSequence charSequence) {
|
||||
|
@ -1318,7 +1320,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
|
|||
getContext().startActivity(createVoiceAppSearchIntent(this.mVoiceAppSearchIntent, searchableInfo));
|
||||
}
|
||||
} catch (ActivityNotFoundException unused) {
|
||||
Log.w("SearchView", "Could not find voice search activity");
|
||||
Log.w(LOG_TAG, "Could not find voice search activity");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1432,7 +1434,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
|
|||
boolean hasVoiceSearch = hasVoiceSearch();
|
||||
this.mVoiceButtonEnabled = hasVoiceSearch;
|
||||
if (hasVoiceSearch) {
|
||||
this.mSearchSrcTextView.setPrivateImeOptions("nm");
|
||||
this.mSearchSrcTextView.setPrivateImeOptions(IME_OPTION_NO_MICROPHONE);
|
||||
}
|
||||
updateViewsVisibility(isIconified());
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ public class ShareActionProvider extends ActionProvider {
|
|||
private ActivityChooserModel.OnChooseActivityListener mOnChooseActivityListener;
|
||||
private final ShareMenuItemOnMenuItemClickListener mOnMenuItemClickListener = new ShareMenuItemOnMenuItemClickListener();
|
||||
public OnShareTargetSelectedListener mOnShareTargetSelectedListener;
|
||||
public String mShareHistoryFileName = "share_history.xml";
|
||||
public String mShareHistoryFileName = DEFAULT_SHARE_HISTORY_FILE_NAME;
|
||||
|
||||
public interface OnShareTargetSelectedListener {
|
||||
boolean onShareTargetSelected(ShareActionProvider shareActionProvider, Intent intent);
|
||||
|
|
|
@ -24,7 +24,8 @@ import android.widget.TextView;
|
|||
import androidx.appcompat.R;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.cursoradapter.widget.ResourceCursorAdapter;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import com.discord.widgets.chat.input.autocomplete.AutocompleteViewModel;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -110,12 +111,12 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
|
|||
if (drawable != null) {
|
||||
return drawable;
|
||||
}
|
||||
StringBuilder M = a.M("Invalid icon resource ", iconResource, " for ");
|
||||
M.append(componentName.flattenToShortString());
|
||||
Log.w("SuggestionsAdapter", M.toString());
|
||||
StringBuilder S = a.S("Invalid icon resource ", iconResource, " for ");
|
||||
S.append(componentName.flattenToShortString());
|
||||
Log.w(LOG_TAG, S.toString());
|
||||
return null;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.w("SuggestionsAdapter", e.toString());
|
||||
Log.w(LOG_TAG, e.toString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -162,14 +163,14 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
|
|||
Drawable createFromStream = Drawable.createFromStream(openInputStream, null);
|
||||
try {
|
||||
} catch (IOException e) {
|
||||
Log.e("SuggestionsAdapter", "Error closing icon stream for " + uri, e);
|
||||
Log.e(LOG_TAG, "Error closing icon stream for " + uri, e);
|
||||
}
|
||||
return createFromStream;
|
||||
} finally {
|
||||
try {
|
||||
openInputStream.close();
|
||||
} catch (IOException e2) {
|
||||
Log.e("SuggestionsAdapter", "Error closing icon stream for " + uri, e2);
|
||||
Log.e(LOG_TAG, "Error closing icon stream for " + uri, e2);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -177,7 +178,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
|
|||
}
|
||||
}
|
||||
} catch (FileNotFoundException e3) {
|
||||
Log.w("SuggestionsAdapter", "Icon not found: " + uri + ", " + e3.getMessage());
|
||||
Log.w(LOG_TAG, "Icon not found: " + uri + ", " + e3.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +189,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
|
|||
}
|
||||
try {
|
||||
int parseInt = Integer.parseInt(str);
|
||||
String str2 = "android.resource://" + this.mProviderContext.getPackageName() + "/" + parseInt;
|
||||
String str2 = "android.resource://" + this.mProviderContext.getPackageName() + AutocompleteViewModel.COMMAND_DISCOVER_TOKEN + parseInt;
|
||||
Drawable checkIconCache = checkIconCache(str2);
|
||||
if (checkIconCache != null) {
|
||||
return checkIconCache;
|
||||
|
@ -205,7 +206,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
|
|||
storeInIconCache(str, drawable2);
|
||||
return drawable2;
|
||||
} catch (Resources.NotFoundException unused2) {
|
||||
a.h0("Icon resource not found: ", str, "SuggestionsAdapter");
|
||||
Log.w(LOG_TAG, "Icon resource not found: " + str);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -234,7 +235,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
|
|||
try {
|
||||
return cursor.getString(i);
|
||||
} catch (Exception e) {
|
||||
Log.e("SuggestionsAdapter", "unexpected error retrieving valid column from cursor, did the remote process die?", e);
|
||||
Log.e(LOG_TAG, "unexpected error retrieving valid column from cursor, did the remote process die?", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -318,7 +319,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
|
|||
@Override // androidx.cursoradapter.widget.CursorAdapter, androidx.cursoradapter.widget.CursorFilter.CursorFilterClient
|
||||
public void changeCursor(Cursor cursor) {
|
||||
if (this.mClosed) {
|
||||
Log.w("SuggestionsAdapter", "Tried to change cursor after adapter was closed.");
|
||||
Log.w(LOG_TAG, "Tried to change cursor after adapter was closed.");
|
||||
if (cursor != null) {
|
||||
cursor.close();
|
||||
return;
|
||||
|
@ -336,7 +337,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
|
|||
this.mFlagsCol = cursor.getColumnIndex("suggest_flags");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("SuggestionsAdapter", "error changing cursor and caching columns", e);
|
||||
Log.e(LOG_TAG, "error changing cursor and caching columns", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -404,7 +405,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
|
|||
try {
|
||||
return super.getDropDownView(i, view, viewGroup);
|
||||
} catch (RuntimeException e) {
|
||||
Log.w("SuggestionsAdapter", "Search suggestions cursor threw exception.", e);
|
||||
Log.w(LOG_TAG, "Search suggestions cursor threw exception.", e);
|
||||
View newDropDownView = newDropDownView(this.mContext, this.mCursor, viewGroup);
|
||||
if (newDropDownView != null) {
|
||||
((ChildViewCache) newDropDownView.getTag()).mText1.setText(e.toString());
|
||||
|
@ -446,7 +447,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
|
|||
try {
|
||||
return super.getView(i, view, viewGroup);
|
||||
} catch (RuntimeException e) {
|
||||
Log.w("SuggestionsAdapter", "Search suggestions cursor threw exception.", e);
|
||||
Log.w(LOG_TAG, "Search suggestions cursor threw exception.", e);
|
||||
View newView = newView(this.mContext, this.mCursor, viewGroup);
|
||||
if (newView != null) {
|
||||
((ChildViewCache) newView.getTag()).mText1.setText(e.toString());
|
||||
|
@ -499,7 +500,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
|
|||
return searchManagerSuggestions;
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
Log.w("SuggestionsAdapter", "Search suggestions query threw an exception.", e);
|
||||
Log.w(LOG_TAG, "Search suggestions query threw an exception.", e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -563,13 +563,13 @@ public class SwitchCompat extends CompoundButton {
|
|||
@Override // android.view.View
|
||||
public void onInitializeAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
|
||||
super.onInitializeAccessibilityEvent(accessibilityEvent);
|
||||
accessibilityEvent.setClassName("android.widget.Switch");
|
||||
accessibilityEvent.setClassName(ACCESSIBILITY_EVENT_CLASS_NAME);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
|
||||
super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
|
||||
accessibilityNodeInfo.setClassName("android.widget.Switch");
|
||||
accessibilityNodeInfo.setClassName(ACCESSIBILITY_EVENT_CLASS_NAME);
|
||||
CharSequence charSequence = isChecked() ? this.mTextOn : this.mTextOff;
|
||||
if (!TextUtils.isEmpty(charSequence)) {
|
||||
CharSequence text = accessibilityNodeInfo.getText();
|
||||
|
|
|
@ -34,7 +34,7 @@ public class ThemeUtils {
|
|||
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(R.styleable.AppCompatTheme);
|
||||
try {
|
||||
if (!obtainStyledAttributes.hasValue(R.styleable.AppCompatTheme_windowActionBar)) {
|
||||
Log.e("ThemeUtils", "View " + view.getClass() + " is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).");
|
||||
Log.e(TAG, "View " + view.getClass() + " is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).");
|
||||
}
|
||||
} finally {
|
||||
obtainStyledAttributes.recycle();
|
||||
|
|
|
@ -38,6 +38,7 @@ import androidx.appcompat.view.menu.MenuPresenter;
|
|||
import androidx.appcompat.view.menu.MenuView;
|
||||
import androidx.appcompat.view.menu.SubMenuBuilder;
|
||||
import androidx.appcompat.widget.ActionMenuView;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.core.view.MarginLayoutParamsCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
|
@ -675,7 +676,7 @@ public class Toolbar extends ViewGroup {
|
|||
if (mode != 0) {
|
||||
i5 = Math.min(View.MeasureSpec.getSize(childMeasureSpec2), i5);
|
||||
}
|
||||
childMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(i5, 1073741824);
|
||||
childMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(i5, BasicMeasure.EXACTLY);
|
||||
}
|
||||
view.measure(childMeasureSpec, childMeasureSpec2);
|
||||
}
|
||||
|
@ -1306,8 +1307,8 @@ public class Toolbar extends ViewGroup {
|
|||
|
||||
@Override // android.view.View
|
||||
public void onMeasure(int i, int i2) {
|
||||
char c;
|
||||
char c2;
|
||||
char c3;
|
||||
int i3;
|
||||
int i4;
|
||||
int i5;
|
||||
|
@ -1318,11 +1319,11 @@ public class Toolbar extends ViewGroup {
|
|||
int[] iArr = this.mTempMargins;
|
||||
int i10 = 0;
|
||||
if (ViewUtils.isLayoutRtl(this)) {
|
||||
c3 = 1;
|
||||
c2 = 0;
|
||||
} else {
|
||||
c3 = 0;
|
||||
c2 = 1;
|
||||
c = 0;
|
||||
} else {
|
||||
c2 = 0;
|
||||
c = 1;
|
||||
}
|
||||
if (shouldLayout(this.mNavButtonView)) {
|
||||
measureChildConstrained(this.mNavButtonView, i, 0, i2, 0, this.mMaxButtonHeight);
|
||||
|
@ -1342,7 +1343,7 @@ public class Toolbar extends ViewGroup {
|
|||
}
|
||||
int currentContentInsetStart = getCurrentContentInsetStart();
|
||||
int max = Math.max(currentContentInsetStart, i5) + 0;
|
||||
iArr[c3] = Math.max(0, currentContentInsetStart - i5);
|
||||
iArr[c2] = Math.max(0, currentContentInsetStart - i5);
|
||||
if (shouldLayout(this.mMenuView)) {
|
||||
measureChildConstrained(this.mMenuView, i, max, i2, 0, this.mMaxButtonHeight);
|
||||
i6 = this.mMenuView.getMeasuredWidth() + getHorizontalMargins(this.mMenuView);
|
||||
|
@ -1353,7 +1354,7 @@ public class Toolbar extends ViewGroup {
|
|||
}
|
||||
int currentContentInsetEnd = getCurrentContentInsetEnd();
|
||||
int max2 = Math.max(currentContentInsetEnd, i6) + max;
|
||||
iArr[c2] = Math.max(0, currentContentInsetEnd - i6);
|
||||
iArr[c] = Math.max(0, currentContentInsetEnd - i6);
|
||||
if (shouldLayout(this.mExpandedActionView)) {
|
||||
max2 += measureChildCollapseMargins(this.mExpandedActionView, i, max2, i2, 0, iArr);
|
||||
i4 = Math.max(i4, this.mExpandedActionView.getMeasuredHeight() + getVerticalMargins(this.mExpandedActionView));
|
||||
|
|
|
@ -24,7 +24,8 @@ import androidx.appcompat.widget.Toolbar;
|
|||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.ViewPropertyAnimatorCompat;
|
||||
import androidx.core.view.ViewPropertyAnimatorListenerAdapter;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import com.google.android.material.badge.BadgeDrawable;
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
|
||||
public class ToolbarWidgetWrapper implements DecorToolbar {
|
||||
private static final int AFFECTS_LOGO_MASK = 3;
|
||||
|
@ -233,7 +234,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
|
|||
|
||||
@Override // androidx.appcompat.widget.DecorToolbar
|
||||
public void animateToVisibility(int i) {
|
||||
ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = setupAnimatorToVisibility(i, 200);
|
||||
ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = setupAnimatorToVisibility(i, DEFAULT_FADE_DURATION_MS);
|
||||
if (viewPropertyAnimatorCompat != null) {
|
||||
viewPropertyAnimatorCompat.start();
|
||||
}
|
||||
|
@ -349,12 +350,12 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
|
|||
|
||||
@Override // androidx.appcompat.widget.DecorToolbar
|
||||
public void initIndeterminateProgress() {
|
||||
Log.i("ToolbarWidgetWrapper", "Progress display unsupported");
|
||||
Log.i(TAG, "Progress display unsupported");
|
||||
}
|
||||
|
||||
@Override // androidx.appcompat.widget.DecorToolbar
|
||||
public void initProgress() {
|
||||
Log.i("ToolbarWidgetWrapper", "Progress display unsupported");
|
||||
Log.i(TAG, "Progress display unsupported");
|
||||
}
|
||||
|
||||
@Override // androidx.appcompat.widget.DecorToolbar
|
||||
|
@ -486,7 +487,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
|
|||
Toolbar.LayoutParams layoutParams = (Toolbar.LayoutParams) this.mTabView.getLayoutParams();
|
||||
((ViewGroup.MarginLayoutParams) layoutParams).width = -2;
|
||||
((ViewGroup.MarginLayoutParams) layoutParams).height = -2;
|
||||
layoutParams.gravity = 8388691;
|
||||
layoutParams.gravity = BadgeDrawable.BOTTOM_START;
|
||||
scrollingTabContainerView.setAllowCollapse(true);
|
||||
}
|
||||
}
|
||||
|
@ -589,10 +590,10 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
|
|||
Toolbar.LayoutParams layoutParams = (Toolbar.LayoutParams) this.mTabView.getLayoutParams();
|
||||
((ViewGroup.MarginLayoutParams) layoutParams).width = -2;
|
||||
((ViewGroup.MarginLayoutParams) layoutParams).height = -2;
|
||||
layoutParams.gravity = 8388691;
|
||||
layoutParams.gravity = BadgeDrawable.BOTTOM_START;
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException(a.l("Invalid navigation mode ", i));
|
||||
throw new IllegalArgumentException(a.p("Invalid navigation mode ", i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ public class TooltipCompatHandler implements View.OnLongClickListener, View.OnHo
|
|||
clearAnchorPos();
|
||||
this.mAnchor.removeOnAttachStateChangeListener(this);
|
||||
} else {
|
||||
Log.e("TooltipCompatHandler", "sActiveHandler.mPopup == null");
|
||||
Log.e(TAG, "sActiveHandler.mPopup == null");
|
||||
}
|
||||
}
|
||||
if (sPendingHandler == this) {
|
||||
|
@ -185,13 +185,13 @@ public class TooltipCompatHandler implements View.OnLongClickListener, View.OnHo
|
|||
tooltipPopup.show(this.mAnchor, this.mAnchorX, this.mAnchorY, this.mFromTouch, this.mTooltipText);
|
||||
this.mAnchor.addOnAttachStateChangeListener(this);
|
||||
if (this.mFromTouch) {
|
||||
j = 2500;
|
||||
j = LONG_CLICK_HIDE_TIMEOUT_MS;
|
||||
} else {
|
||||
if ((ViewCompat.getWindowSystemUiVisibility(this.mAnchor) & 1) == 1) {
|
||||
j2 = 3000;
|
||||
j2 = HOVER_HIDE_TIMEOUT_SHORT_MS;
|
||||
i = ViewConfiguration.getLongPressTimeout();
|
||||
} else {
|
||||
j2 = 15000;
|
||||
j2 = HOVER_HIDE_TIMEOUT_MS;
|
||||
i = ViewConfiguration.getLongPressTimeout();
|
||||
}
|
||||
j = j2 - ((long) i);
|
||||
|
|
|
@ -15,6 +15,7 @@ import android.widget.TextView;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RestrictTo;
|
||||
import androidx.appcompat.R;
|
||||
import androidx.core.view.PointerIconCompat;
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
|
||||
public class TooltipPopup {
|
||||
private static final String TAG = "TooltipPopup";
|
||||
|
@ -35,7 +36,7 @@ public class TooltipPopup {
|
|||
this.mMessageView = (TextView) inflate.findViewById(R.id.message);
|
||||
layoutParams.setTitle(getClass().getSimpleName());
|
||||
layoutParams.packageName = context.getPackageName();
|
||||
layoutParams.type = 1002;
|
||||
layoutParams.type = PointerIconCompat.TYPE_HAND;
|
||||
layoutParams.width = -2;
|
||||
layoutParams.height = -2;
|
||||
layoutParams.format = -3;
|
||||
|
@ -63,7 +64,7 @@ public class TooltipPopup {
|
|||
int dimensionPixelOffset3 = this.mContext.getResources().getDimensionPixelOffset(z2 ? R.dimen.tooltip_y_offset_touch : R.dimen.tooltip_y_offset_non_touch);
|
||||
View appRootView = getAppRootView(view);
|
||||
if (appRootView == null) {
|
||||
Log.e("TooltipPopup", "Cannot find app view");
|
||||
Log.e(TAG, "Cannot find app view");
|
||||
return;
|
||||
}
|
||||
appRootView.getWindowVisibleDisplayFrame(this.mTmpDisplayFrame);
|
||||
|
|
|
@ -20,7 +20,7 @@ public class ViewUtils {
|
|||
sComputeFitSystemWindowsMethod.setAccessible(true);
|
||||
}
|
||||
} catch (NoSuchMethodException unused) {
|
||||
Log.d("ViewUtils", "Could not find method computeFitSystemWindows. Oh well.");
|
||||
Log.d(TAG, "Could not find method computeFitSystemWindows. Oh well.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ public class ViewUtils {
|
|||
try {
|
||||
method.invoke(view, rect, rect2);
|
||||
} catch (Exception e) {
|
||||
Log.d("ViewUtils", "Could not invoke computeFitSystemWindows", e);
|
||||
Log.d(TAG, "Could not invoke computeFitSystemWindows", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -50,11 +50,11 @@ public class ViewUtils {
|
|||
}
|
||||
method.invoke(view, new Object[0]);
|
||||
} catch (NoSuchMethodException unused) {
|
||||
Log.d("ViewUtils", "Could not find method makeOptionalFitsSystemWindows. Oh well...");
|
||||
Log.d(TAG, "Could not find method makeOptionalFitsSystemWindows. Oh well...");
|
||||
} catch (InvocationTargetException e) {
|
||||
Log.d("ViewUtils", "Could not invoke makeOptionalFitsSystemWindows", e);
|
||||
Log.d(TAG, "Could not invoke makeOptionalFitsSystemWindows", e);
|
||||
} catch (IllegalAccessException e2) {
|
||||
Log.d("ViewUtils", "Could not invoke makeOptionalFitsSystemWindows", e2);
|
||||
Log.d(TAG, "Could not invoke makeOptionalFitsSystemWindows", e2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public class DefaultTaskExecutor extends TaskExecutor {
|
|||
@Override // java.util.concurrent.ThreadFactory
|
||||
public Thread newThread(Runnable runnable) {
|
||||
Thread thread = new Thread(runnable);
|
||||
thread.setName(String.format("arch_disk_io_%d", Integer.valueOf(this.mThreadId.getAndIncrement())));
|
||||
thread.setName(String.format(THREAD_NAME_STEM, Integer.valueOf(this.mThreadId.getAndIncrement())));
|
||||
return thread;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package androidx.arch.core.internal;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RestrictTo;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
|
@ -319,15 +319,15 @@ public class SafeIterableMap<K, V> implements Iterable<Map.Entry<K, V>> {
|
|||
|
||||
@Override // java.lang.Object
|
||||
public String toString() {
|
||||
StringBuilder L = a.L("[");
|
||||
StringBuilder R = a.R("[");
|
||||
Iterator<Map.Entry<K, V>> it = iterator();
|
||||
while (it.hasNext()) {
|
||||
L.append(it.next().toString());
|
||||
R.append(it.next().toString());
|
||||
if (it.hasNext()) {
|
||||
L.append(", ");
|
||||
R.append(", ");
|
||||
}
|
||||
}
|
||||
L.append("]");
|
||||
return L.toString();
|
||||
R.append("]");
|
||||
return R.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,11 +127,11 @@ public final class AsyncLayoutInflater {
|
|||
try {
|
||||
take.view = take.inflater.mInflater.inflate(take.resid, take.parent, false);
|
||||
} catch (RuntimeException e) {
|
||||
Log.w("AsyncLayoutInflater", "Failed to inflate resource in the background! Retrying on the UI thread", e);
|
||||
Log.w(AsyncLayoutInflater.TAG, "Failed to inflate resource in the background! Retrying on the UI thread", e);
|
||||
}
|
||||
Message.obtain(take.inflater.mHandler, 0, take).sendToTarget();
|
||||
} catch (InterruptedException e2) {
|
||||
Log.w("AsyncLayoutInflater", e2);
|
||||
Log.w(AsyncLayoutInflater.TAG, e2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import android.widget.TextView;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.browser.R;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import c.i.b.d.a.a;
|
||||
import b.i.b.d.a.a;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Executor;
|
||||
|
|
|
@ -45,7 +45,7 @@ public class BrowserActionsFallbackMenuDialog extends Dialog {
|
|||
if (z2) {
|
||||
f = 1.0f;
|
||||
}
|
||||
long j = z2 ? 250 : 150;
|
||||
long j = z2 ? ENTER_ANIMATION_DURATION_MS : 150;
|
||||
this.mContentView.setScaleX(f2);
|
||||
this.mContentView.setScaleY(f2);
|
||||
this.mContentView.animate().scaleX(f).scaleY(f).setDuration(j).setInterpolator(new LinearOutSlowInInterpolator()).setListener(new AnonymousClass1(z2)).start();
|
||||
|
|
|
@ -23,6 +23,7 @@ import androidx.annotation.RestrictTo;
|
|||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.browser.R;
|
||||
import androidx.core.widget.TextViewCompat;
|
||||
import com.discord.restapi.RestAPIBuilder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@Deprecated
|
||||
|
@ -60,7 +61,7 @@ public class BrowserActionsFallbackMenuUi implements AdapterView.OnItemClickList
|
|||
public void onShow(DialogInterface dialogInterface) {
|
||||
BrowserActionsFallMenuUiListener browserActionsFallMenuUiListener = BrowserActionsFallbackMenuUi.this.mMenuUiListener;
|
||||
if (browserActionsFallMenuUiListener == null) {
|
||||
Log.e("BrowserActionskMenuUi", "Cannot trigger menu item listener, it is null");
|
||||
Log.e(BrowserActionsFallbackMenuUi.TAG, "Cannot trigger menu item listener, it is null");
|
||||
} else {
|
||||
browserActionsFallMenuUiListener.onMenuShown(this.val$view);
|
||||
}
|
||||
|
@ -120,7 +121,7 @@ public class BrowserActionsFallbackMenuUi implements AdapterView.OnItemClickList
|
|||
private PendingIntent buildShareAction() {
|
||||
Intent intent = new Intent("android.intent.action.SEND");
|
||||
intent.putExtra("android.intent.extra.TEXT", this.mUri.toString());
|
||||
intent.setType("text/plain");
|
||||
intent.setType(RestAPIBuilder.CONTENT_TYPE_TEXT);
|
||||
return PendingIntent.getActivity(this.mContext, 0, intent, 0);
|
||||
}
|
||||
|
||||
|
@ -153,14 +154,14 @@ public class BrowserActionsFallbackMenuUi implements AdapterView.OnItemClickList
|
|||
try {
|
||||
browserActionItem.getAction().send();
|
||||
} catch (PendingIntent.CanceledException e) {
|
||||
Log.e("BrowserActionskMenuUi", "Failed to send custom item action", e);
|
||||
Log.e(TAG, "Failed to send custom item action", e);
|
||||
}
|
||||
} else if (browserActionItem.getRunnableAction() != null) {
|
||||
browserActionItem.getRunnableAction().run();
|
||||
}
|
||||
BrowserActionsFallbackMenuDialog browserActionsFallbackMenuDialog = this.mBrowserActionsDialog;
|
||||
if (browserActionsFallbackMenuDialog == null) {
|
||||
Log.e("BrowserActionskMenuUi", "Cannot dismiss dialog, it has already been dismissed.");
|
||||
Log.e(TAG, "Cannot dismiss dialog, it has already been dismissed.");
|
||||
} else {
|
||||
browserActionsFallbackMenuDialog.dismiss();
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.widget.LinearLayout;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RestrictTo;
|
||||
import androidx.browser.R;
|
||||
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
|
||||
@Deprecated
|
||||
public class BrowserActionsFallbackMenuView extends LinearLayout {
|
||||
|
@ -19,6 +20,6 @@ public class BrowserActionsFallbackMenuView extends LinearLayout {
|
|||
|
||||
@Override // android.widget.LinearLayout, android.view.View
|
||||
public void onMeasure(int i, int i2) {
|
||||
super.onMeasure(View.MeasureSpec.makeMeasureSpec(Math.min(getResources().getDisplayMetrics().widthPixels - (this.mBrowserActionsMenuMinPaddingPx * 2), this.mBrowserActionsMenuMaxWidthPx), 1073741824), i2);
|
||||
super.onMeasure(View.MeasureSpec.makeMeasureSpec(Math.min(getResources().getDisplayMetrics().widthPixels - (this.mBrowserActionsMenuMinPaddingPx * 2), this.mBrowserActionsMenuMaxWidthPx), BasicMeasure.EXACTLY), i2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ public class BrowserActionsIntent {
|
|||
public static final class Builder {
|
||||
private Context mContext;
|
||||
private List<Uri> mImageUris = new ArrayList();
|
||||
private final Intent mIntent = new Intent("androidx.browser.browseractions.browser_action_open");
|
||||
private final Intent mIntent = new Intent(BrowserActionsIntent.ACTION_BROWSER_ACTIONS_OPEN);
|
||||
private ArrayList<Bundle> mMenuItems = new ArrayList<>();
|
||||
@Nullable
|
||||
private PendingIntent mOnItemSelectedPendingIntent = null;
|
||||
|
@ -84,13 +84,13 @@ public class BrowserActionsIntent {
|
|||
@NonNull
|
||||
private Bundle getBundleFromItem(@NonNull BrowserActionItem browserActionItem) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("androidx.browser.browseractions.TITLE", browserActionItem.getTitle());
|
||||
bundle.putParcelable("androidx.browser.browseractions.ACTION", browserActionItem.getAction());
|
||||
bundle.putString(BrowserActionsIntent.KEY_TITLE, browserActionItem.getTitle());
|
||||
bundle.putParcelable(BrowserActionsIntent.KEY_ACTION, browserActionItem.getAction());
|
||||
if (browserActionItem.getIconId() != 0) {
|
||||
bundle.putInt("androidx.browser.browseractions.ICON_ID", browserActionItem.getIconId());
|
||||
bundle.putInt(BrowserActionsIntent.KEY_ICON_ID, browserActionItem.getIconId());
|
||||
}
|
||||
if (browserActionItem.getIconUri() != null) {
|
||||
bundle.putParcelable("androidx.browser.browseractions.ICON_URI", browserActionItem.getIconUri());
|
||||
bundle.putParcelable(BrowserActionsIntent.KEY_ICON_URI, browserActionItem.getIconUri());
|
||||
}
|
||||
return bundle;
|
||||
}
|
||||
|
@ -98,12 +98,12 @@ public class BrowserActionsIntent {
|
|||
@NonNull
|
||||
public BrowserActionsIntent build() {
|
||||
this.mIntent.setData(this.mUri);
|
||||
this.mIntent.putExtra("androidx.browser.browseractions.extra.TYPE", this.mType);
|
||||
this.mIntent.putParcelableArrayListExtra("androidx.browser.browseractions.extra.MENU_ITEMS", this.mMenuItems);
|
||||
this.mIntent.putExtra("androidx.browser.browseractions.APP_ID", PendingIntent.getActivity(this.mContext, 0, new Intent(), 0));
|
||||
this.mIntent.putExtra(BrowserActionsIntent.EXTRA_TYPE, this.mType);
|
||||
this.mIntent.putParcelableArrayListExtra(BrowserActionsIntent.EXTRA_MENU_ITEMS, this.mMenuItems);
|
||||
this.mIntent.putExtra(BrowserActionsIntent.EXTRA_APP_ID, PendingIntent.getActivity(this.mContext, 0, new Intent(), 0));
|
||||
PendingIntent pendingIntent = this.mOnItemSelectedPendingIntent;
|
||||
if (pendingIntent != null) {
|
||||
this.mIntent.putExtra("androidx.browser.browseractions.extra.SELECTED_ACTION_PENDING_INTENT", pendingIntent);
|
||||
this.mIntent.putExtra(BrowserActionsIntent.EXTRA_SELECTED_ACTION_PENDING_INTENT, pendingIntent);
|
||||
}
|
||||
BrowserServiceFileProvider.grantReadPermission(this.mIntent, this.mImageUris, this.mContext);
|
||||
return new BrowserActionsIntent(this.mIntent);
|
||||
|
@ -151,7 +151,7 @@ public class BrowserActionsIntent {
|
|||
@NonNull
|
||||
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
||||
public static List<ResolveInfo> getBrowserActionsIntentHandlers(@NonNull Context context) {
|
||||
return context.getPackageManager().queryIntentActivities(new Intent("androidx.browser.browseractions.browser_action_open", Uri.parse("https://www.example.com")), 131072);
|
||||
return context.getPackageManager().queryIntentActivities(new Intent(ACTION_BROWSER_ACTIONS_OPEN, Uri.parse(TEST_URL)), 131072);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -162,7 +162,7 @@ public class BrowserActionsIntent {
|
|||
|
||||
@Nullable
|
||||
public static String getUntrustedCreatorPackageName(@NonNull Intent intent) {
|
||||
PendingIntent pendingIntent = (PendingIntent) intent.getParcelableExtra("androidx.browser.browseractions.APP_ID");
|
||||
PendingIntent pendingIntent = (PendingIntent) intent.getParcelableExtra(EXTRA_APP_ID);
|
||||
if (pendingIntent != null) {
|
||||
return pendingIntent.getCreatorPackage();
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ public class BrowserActionsIntent {
|
|||
if (list.size() == 1) {
|
||||
intent.setPackage(list.get(0).activityInfo.packageName);
|
||||
} else {
|
||||
ResolveInfo resolveActivity = context.getPackageManager().resolveActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://www.example.com")), 65536);
|
||||
ResolveInfo resolveActivity = context.getPackageManager().resolveActivity(new Intent("android.intent.action.VIEW", Uri.parse(TEST_URL)), 65536);
|
||||
if (resolveActivity != null) {
|
||||
String str = resolveActivity.activityInfo.packageName;
|
||||
while (true) {
|
||||
|
@ -212,7 +212,7 @@ public class BrowserActionsIntent {
|
|||
|
||||
private static void openFallbackBrowserActionsMenu(Context context, Intent intent) {
|
||||
Uri data = intent.getData();
|
||||
ArrayList parcelableArrayListExtra = intent.getParcelableArrayListExtra("androidx.browser.browseractions.extra.MENU_ITEMS");
|
||||
ArrayList parcelableArrayListExtra = intent.getParcelableArrayListExtra(EXTRA_MENU_ITEMS);
|
||||
openFallbackBrowserActionsMenu(context, data, parcelableArrayListExtra != null ? parseBrowserActionItems(parcelableArrayListExtra) : null);
|
||||
}
|
||||
|
||||
|
@ -229,10 +229,10 @@ public class BrowserActionsIntent {
|
|||
ArrayList arrayList2 = new ArrayList();
|
||||
for (int i = 0; i < arrayList.size(); i++) {
|
||||
Bundle bundle = arrayList.get(i);
|
||||
String string = bundle.getString("androidx.browser.browseractions.TITLE");
|
||||
PendingIntent pendingIntent = (PendingIntent) bundle.getParcelable("androidx.browser.browseractions.ACTION");
|
||||
int i2 = bundle.getInt("androidx.browser.browseractions.ICON_ID");
|
||||
Uri uri = (Uri) bundle.getParcelable("androidx.browser.browseractions.ICON_URI");
|
||||
String string = bundle.getString(KEY_TITLE);
|
||||
PendingIntent pendingIntent = (PendingIntent) bundle.getParcelable(KEY_ACTION);
|
||||
int i2 = bundle.getInt(KEY_ICON_ID);
|
||||
Uri uri = (Uri) bundle.getParcelable(KEY_ICON_URI);
|
||||
if (TextUtils.isEmpty(string) || pendingIntent == null) {
|
||||
throw new IllegalArgumentException("Custom item should contain a non-empty title and non-null intent.");
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import androidx.annotation.UiThread;
|
|||
import androidx.concurrent.futures.ResolvableFuture;
|
||||
import androidx.core.content.FileProvider;
|
||||
import androidx.core.util.AtomicFile;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
|
@ -94,16 +94,16 @@ public final class BrowserServiceFileProvider extends FileProvider {
|
|||
}
|
||||
|
||||
private static boolean shouldCleanUp(SharedPreferences sharedPreferences) {
|
||||
return System.currentTimeMillis() > sharedPreferences.getLong("last_cleanup_time", System.currentTimeMillis()) + CLEANUP_REQUIRED_TIME_SPAN;
|
||||
return System.currentTimeMillis() > sharedPreferences.getLong(BrowserServiceFileProvider.LAST_CLEANUP_TIME_KEY, System.currentTimeMillis()) + CLEANUP_REQUIRED_TIME_SPAN;
|
||||
}
|
||||
|
||||
public Void doInBackground(Void... voidArr) {
|
||||
SharedPreferences sharedPreferences = this.mAppContext.getSharedPreferences(this.mAppContext.getPackageName() + ".image_provider", 0);
|
||||
SharedPreferences sharedPreferences = this.mAppContext.getSharedPreferences(this.mAppContext.getPackageName() + BrowserServiceFileProvider.AUTHORITY_SUFFIX, 0);
|
||||
if (!shouldCleanUp(sharedPreferences)) {
|
||||
return null;
|
||||
}
|
||||
synchronized (BrowserServiceFileProvider.sFileCleanupLock) {
|
||||
File file = new File(this.mAppContext.getFilesDir(), "image_provider");
|
||||
File file = new File(this.mAppContext.getFilesDir(), BrowserServiceFileProvider.FILE_SUB_DIR);
|
||||
if (!file.exists()) {
|
||||
return null;
|
||||
}
|
||||
|
@ -113,14 +113,14 @@ public final class BrowserServiceFileProvider extends FileProvider {
|
|||
for (File file2 : listFiles) {
|
||||
if (isImageFile(file2)) {
|
||||
if (file2.lastModified() < currentTimeMillis && !file2.delete()) {
|
||||
Log.e("BrowserServiceFP", "Fail to delete image: " + file2.getAbsoluteFile());
|
||||
Log.e(BrowserServiceFileProvider.TAG, "Fail to delete image: " + file2.getAbsoluteFile());
|
||||
z2 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
long currentTimeMillis2 = z2 ? System.currentTimeMillis() : (System.currentTimeMillis() - CLEANUP_REQUIRED_TIME_SPAN) + DELETION_FAILED_REATTEMPT_DURATION;
|
||||
SharedPreferences.Editor edit = sharedPreferences.edit();
|
||||
edit.putLong("last_cleanup_time", currentTimeMillis2);
|
||||
edit.putLong(BrowserServiceFileProvider.LAST_CLEANUP_TIME_KEY, currentTimeMillis2);
|
||||
edit.apply();
|
||||
return null;
|
||||
}
|
||||
|
@ -176,10 +176,10 @@ public final class BrowserServiceFileProvider extends FileProvider {
|
|||
}
|
||||
|
||||
private void saveFileIfNeededBlocking() {
|
||||
File file = new File(this.mAppContext.getFilesDir(), "image_provider");
|
||||
File file = new File(this.mAppContext.getFilesDir(), BrowserServiceFileProvider.FILE_SUB_DIR);
|
||||
synchronized (BrowserServiceFileProvider.sFileCleanupLock) {
|
||||
if (file.exists() || file.mkdir()) {
|
||||
File file2 = new File(file, this.mFilename + ".png");
|
||||
File file2 = new File(file, this.mFilename + BrowserServiceFileProvider.FILE_EXTENSION);
|
||||
if (file2.exists()) {
|
||||
this.mResultFuture.set(this.mFileUri);
|
||||
} else {
|
||||
|
@ -203,16 +203,16 @@ public final class BrowserServiceFileProvider extends FileProvider {
|
|||
}
|
||||
|
||||
private static Uri generateUri(Context context, String str) {
|
||||
String v = a.v("image_provider_images/", str, ".png");
|
||||
Uri.Builder scheme = new Uri.Builder().scheme("content");
|
||||
return scheme.authority(context.getPackageName() + ".image_provider").path(v).build();
|
||||
String w = a.w(FILE_SUB_DIR_NAME, str, FILE_EXTENSION);
|
||||
Uri.Builder scheme = new Uri.Builder().scheme(CONTENT_SCHEME);
|
||||
return scheme.authority(context.getPackageName() + AUTHORITY_SUFFIX).path(w).build();
|
||||
}
|
||||
|
||||
public static void grantReadPermission(@NonNull Intent intent, @Nullable List<Uri> list, @NonNull Context context) {
|
||||
if (!(list == null || list.size() == 0)) {
|
||||
ContentResolver contentResolver = context.getContentResolver();
|
||||
intent.addFlags(1);
|
||||
ClipData newUri = ClipData.newUri(contentResolver, "image_provider_uris", list.get(0));
|
||||
ClipData newUri = ClipData.newUri(contentResolver, CLIP_DATA_LABEL, list.get(0));
|
||||
for (int i = 1; i < list.size(); i++) {
|
||||
newUri.addItem(new ClipData.Item(list.get(i)));
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ public final class BrowserServiceFileProvider extends FileProvider {
|
|||
}
|
||||
|
||||
@NonNull
|
||||
public static c.i.b.d.a.a<Bitmap> loadBitmap(@NonNull ContentResolver contentResolver, @NonNull Uri uri) {
|
||||
public static b.i.b.d.a.a<Bitmap> loadBitmap(@NonNull ContentResolver contentResolver, @NonNull Uri uri) {
|
||||
ResolvableFuture create = ResolvableFuture.create();
|
||||
AsyncTask.THREAD_POOL_EXECUTOR.execute(new AnonymousClass1(contentResolver, uri, create));
|
||||
return create;
|
||||
|
@ -230,9 +230,9 @@ public final class BrowserServiceFileProvider extends FileProvider {
|
|||
@NonNull
|
||||
@UiThread
|
||||
public static ResolvableFuture<Uri> saveBitmap(@NonNull Context context, @NonNull Bitmap bitmap, @NonNull String str, int i) {
|
||||
StringBuilder P = a.P(str, "_");
|
||||
P.append(Integer.toString(i));
|
||||
String sb = P.toString();
|
||||
StringBuilder V = a.V(str, "_");
|
||||
V.append(Integer.toString(i));
|
||||
String sb = V.toString();
|
||||
Uri generateUri = generateUri(context, sb);
|
||||
ResolvableFuture<Uri> create = ResolvableFuture.create();
|
||||
new FileSaveTask(context, sb, bitmap, generateUri, create).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new String[0]);
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.os.Bundle;
|
|||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.view.ViewCompat;
|
||||
public final class CustomTabColorSchemeParams {
|
||||
@Nullable
|
||||
@ColorInt
|
||||
|
@ -39,7 +40,7 @@ public final class CustomTabColorSchemeParams {
|
|||
|
||||
@NonNull
|
||||
public Builder setNavigationBarColor(@ColorInt int i) {
|
||||
this.mNavigationBarColor = Integer.valueOf(i | -16777216);
|
||||
this.mNavigationBarColor = Integer.valueOf(i | ViewCompat.MEASURED_STATE_MASK);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -57,7 +58,7 @@ public final class CustomTabColorSchemeParams {
|
|||
|
||||
@NonNull
|
||||
public Builder setToolbarColor(@ColorInt int i) {
|
||||
this.mToolbarColor = Integer.valueOf(i | -16777216);
|
||||
this.mToolbarColor = Integer.valueOf(i | ViewCompat.MEASURED_STATE_MASK);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +75,7 @@ public final class CustomTabColorSchemeParams {
|
|||
if (bundle == null) {
|
||||
bundle = new Bundle(0);
|
||||
}
|
||||
return new CustomTabColorSchemeParams((Integer) bundle.get("android.support.customtabs.extra.TOOLBAR_COLOR"), (Integer) bundle.get("android.support.customtabs.extra.SECONDARY_TOOLBAR_COLOR"), (Integer) bundle.get("androidx.browser.customtabs.extra.NAVIGATION_BAR_COLOR"), (Integer) bundle.get("androidx.browser.customtabs.extra.NAVIGATION_BAR_DIVIDER_COLOR"));
|
||||
return new CustomTabColorSchemeParams((Integer) bundle.get(CustomTabsIntent.EXTRA_TOOLBAR_COLOR), (Integer) bundle.get(CustomTabsIntent.EXTRA_SECONDARY_TOOLBAR_COLOR), (Integer) bundle.get(CustomTabsIntent.EXTRA_NAVIGATION_BAR_COLOR), (Integer) bundle.get(CustomTabsIntent.EXTRA_NAVIGATION_BAR_DIVIDER_COLOR));
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
@ -82,19 +83,19 @@ public final class CustomTabColorSchemeParams {
|
|||
Bundle bundle = new Bundle();
|
||||
Integer num = this.toolbarColor;
|
||||
if (num != null) {
|
||||
bundle.putInt("android.support.customtabs.extra.TOOLBAR_COLOR", num.intValue());
|
||||
bundle.putInt(CustomTabsIntent.EXTRA_TOOLBAR_COLOR, num.intValue());
|
||||
}
|
||||
Integer num2 = this.secondaryToolbarColor;
|
||||
if (num2 != null) {
|
||||
bundle.putInt("android.support.customtabs.extra.SECONDARY_TOOLBAR_COLOR", num2.intValue());
|
||||
bundle.putInt(CustomTabsIntent.EXTRA_SECONDARY_TOOLBAR_COLOR, num2.intValue());
|
||||
}
|
||||
Integer num3 = this.navigationBarColor;
|
||||
if (num3 != null) {
|
||||
bundle.putInt("androidx.browser.customtabs.extra.NAVIGATION_BAR_COLOR", num3.intValue());
|
||||
bundle.putInt(CustomTabsIntent.EXTRA_NAVIGATION_BAR_COLOR, num3.intValue());
|
||||
}
|
||||
Integer num4 = this.navigationBarDividerColor;
|
||||
if (num4 != null) {
|
||||
bundle.putInt("androidx.browser.customtabs.extra.NAVIGATION_BAR_DIVIDER_COLOR", num4.intValue());
|
||||
bundle.putInt(CustomTabsIntent.EXTRA_NAVIGATION_BAR_DIVIDER_COLOR, num4.intValue());
|
||||
}
|
||||
return bundle;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public class CustomTabsClient {
|
|||
}
|
||||
|
||||
/* renamed from: androidx.browser.customtabs.CustomTabsClient$2 reason: invalid class name */
|
||||
public class AnonymousClass2 extends a.AbstractBinderC0344a {
|
||||
public class AnonymousClass2 extends a.AbstractBinderC0347a {
|
||||
private Handler mHandler = new Handler(Looper.getMainLooper());
|
||||
public final /* synthetic */ CustomTabsCallback val$callback;
|
||||
|
||||
|
@ -191,7 +191,7 @@ public class CustomTabsClient {
|
|||
|
||||
public static boolean bindCustomTabsService(@NonNull Context context, @Nullable String str, @NonNull CustomTabsServiceConnection customTabsServiceConnection) {
|
||||
customTabsServiceConnection.setApplicationContext(context.getApplicationContext());
|
||||
Intent intent = new Intent("android.support.customtabs.action.CustomTabsService");
|
||||
Intent intent = new Intent(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION);
|
||||
if (!TextUtils.isEmpty(str)) {
|
||||
intent.setPackage(str);
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ public class CustomTabsClient {
|
|||
|
||||
public static boolean bindCustomTabsServicePreservePriority(@NonNull Context context, @Nullable String str, @NonNull CustomTabsServiceConnection customTabsServiceConnection) {
|
||||
customTabsServiceConnection.setApplicationContext(context.getApplicationContext());
|
||||
Intent intent = new Intent("android.support.customtabs.action.CustomTabsService");
|
||||
Intent intent = new Intent(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION);
|
||||
if (!TextUtils.isEmpty(str)) {
|
||||
intent.setPackage(str);
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ public class CustomTabsClient {
|
|||
}
|
||||
}
|
||||
|
||||
private a.AbstractBinderC0344a createCallbackWrapper(@Nullable CustomTabsCallback customTabsCallback) {
|
||||
private a.AbstractBinderC0347a createCallbackWrapper(@Nullable CustomTabsCallback customTabsCallback) {
|
||||
return new AnonymousClass2(customTabsCallback);
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ public class CustomTabsClient {
|
|||
}
|
||||
arrayList = arrayList2;
|
||||
}
|
||||
Intent intent2 = new Intent("android.support.customtabs.action.CustomTabsService");
|
||||
Intent intent2 = new Intent(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION);
|
||||
for (String str2 : arrayList) {
|
||||
intent2.setPackage(str2);
|
||||
if (packageManager.resolveService(intent2, 0) != null) {
|
||||
|
@ -257,7 +257,7 @@ public class CustomTabsClient {
|
|||
if (Build.VERSION.SDK_INT < 30) {
|
||||
return null;
|
||||
}
|
||||
Log.w("CustomTabsClient", "Unable to find any Custom Tabs packages, you may need to add a <queries> element to your manifest. See the docs for CustomTabsClient#getPackageName.");
|
||||
Log.w(TAG, "Unable to find any Custom Tabs packages, you may need to add a <queries> element to your manifest. See the docs for CustomTabsClient#getPackageName.");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -270,11 +270,11 @@ public class CustomTabsClient {
|
|||
@Nullable
|
||||
private CustomTabsSession newSessionInternal(@Nullable CustomTabsCallback customTabsCallback, @Nullable PendingIntent pendingIntent) {
|
||||
boolean z2;
|
||||
a.AbstractBinderC0344a createCallbackWrapper = createCallbackWrapper(customTabsCallback);
|
||||
a.AbstractBinderC0347a createCallbackWrapper = createCallbackWrapper(customTabsCallback);
|
||||
if (pendingIntent != null) {
|
||||
try {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putParcelable("android.support.customtabs.extra.SESSION_ID", pendingIntent);
|
||||
bundle.putParcelable(CustomTabsIntent.EXTRA_SESSION_ID, pendingIntent);
|
||||
z2 = this.mService.newSessionWithExtras(createCallbackWrapper, bundle);
|
||||
} catch (RemoteException unused) {
|
||||
return null;
|
||||
|
|
|
@ -19,7 +19,7 @@ import androidx.browser.customtabs.CustomTabsSession;
|
|||
import androidx.core.app.ActivityOptionsCompat;
|
||||
import androidx.core.app.BundleCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import c.d.b.a.a;
|
||||
import b.d.b.a.a;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.ArrayList;
|
||||
|
@ -99,9 +99,9 @@ public final class CustomTabsIntent {
|
|||
|
||||
private void setSessionParameters(@Nullable IBinder iBinder, @Nullable PendingIntent pendingIntent) {
|
||||
Bundle bundle = new Bundle();
|
||||
BundleCompat.putBinder(bundle, "android.support.customtabs.extra.SESSION", iBinder);
|
||||
BundleCompat.putBinder(bundle, CustomTabsIntent.EXTRA_SESSION, iBinder);
|
||||
if (pendingIntent != null) {
|
||||
bundle.putParcelable("android.support.customtabs.extra.SESSION_ID", pendingIntent);
|
||||
bundle.putParcelable(CustomTabsIntent.EXTRA_SESSION_ID, pendingIntent);
|
||||
}
|
||||
this.mIntent.putExtras(bundle);
|
||||
}
|
||||
|
@ -119,8 +119,8 @@ public final class CustomTabsIntent {
|
|||
this.mMenuItems = new ArrayList<>();
|
||||
}
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("android.support.customtabs.customaction.MENU_ITEM_TITLE", str);
|
||||
bundle.putParcelable("android.support.customtabs.customaction.PENDING_INTENT", pendingIntent);
|
||||
bundle.putString(CustomTabsIntent.KEY_MENU_ITEM_TITLE, str);
|
||||
bundle.putParcelable(CustomTabsIntent.KEY_PENDING_INTENT, pendingIntent);
|
||||
this.mMenuItems.add(bundle);
|
||||
return this;
|
||||
}
|
||||
|
@ -133,10 +133,10 @@ public final class CustomTabsIntent {
|
|||
}
|
||||
if (this.mActionButtons.size() < 5) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("android.support.customtabs.customaction.ID", i);
|
||||
bundle.putParcelable("android.support.customtabs.customaction.ICON", bitmap);
|
||||
bundle.putString("android.support.customtabs.customaction.DESCRIPTION", str);
|
||||
bundle.putParcelable("android.support.customtabs.customaction.PENDING_INTENT", pendingIntent);
|
||||
bundle.putInt(CustomTabsIntent.KEY_ID, i);
|
||||
bundle.putParcelable(CustomTabsIntent.KEY_ICON, bitmap);
|
||||
bundle.putString(CustomTabsIntent.KEY_DESCRIPTION, str);
|
||||
bundle.putParcelable(CustomTabsIntent.KEY_PENDING_INTENT, pendingIntent);
|
||||
this.mActionButtons.add(bundle);
|
||||
return this;
|
||||
}
|
||||
|
@ -145,18 +145,18 @@ public final class CustomTabsIntent {
|
|||
|
||||
@NonNull
|
||||
public CustomTabsIntent build() {
|
||||
if (!this.mIntent.hasExtra("android.support.customtabs.extra.SESSION")) {
|
||||
if (!this.mIntent.hasExtra(CustomTabsIntent.EXTRA_SESSION)) {
|
||||
setSessionParameters(null, null);
|
||||
}
|
||||
ArrayList<Bundle> arrayList = this.mMenuItems;
|
||||
if (arrayList != null) {
|
||||
this.mIntent.putParcelableArrayListExtra("android.support.customtabs.extra.MENU_ITEMS", arrayList);
|
||||
this.mIntent.putParcelableArrayListExtra(CustomTabsIntent.EXTRA_MENU_ITEMS, arrayList);
|
||||
}
|
||||
ArrayList<Bundle> arrayList2 = this.mActionButtons;
|
||||
if (arrayList2 != null) {
|
||||
this.mIntent.putParcelableArrayListExtra("android.support.customtabs.extra.TOOLBAR_ITEMS", arrayList2);
|
||||
this.mIntent.putParcelableArrayListExtra(CustomTabsIntent.EXTRA_TOOLBAR_ITEMS, arrayList2);
|
||||
}
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS", this.mInstantAppsEnabled);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_ENABLE_INSTANT_APPS, this.mInstantAppsEnabled);
|
||||
this.mIntent.putExtras(this.mDefaultColorSchemeBuilder.build().toBundle());
|
||||
Bundle bundle = this.mDefaultColorSchemeBundle;
|
||||
if (bundle != null) {
|
||||
|
@ -164,17 +164,17 @@ public final class CustomTabsIntent {
|
|||
}
|
||||
if (this.mColorSchemeParamBundles != null) {
|
||||
Bundle bundle2 = new Bundle();
|
||||
bundle2.putSparseParcelableArray("androidx.browser.customtabs.extra.COLOR_SCHEME_PARAMS", this.mColorSchemeParamBundles);
|
||||
bundle2.putSparseParcelableArray(CustomTabsIntent.EXTRA_COLOR_SCHEME_PARAMS, this.mColorSchemeParamBundles);
|
||||
this.mIntent.putExtras(bundle2);
|
||||
}
|
||||
this.mIntent.putExtra("androidx.browser.customtabs.extra.SHARE_STATE", this.mShareState);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_SHARE_STATE, this.mShareState);
|
||||
return new CustomTabsIntent(this.mIntent, this.mStartAnimationBundle);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Deprecated
|
||||
public Builder enableUrlBarHiding() {
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.ENABLE_URLBAR_HIDING", true);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_ENABLE_URLBAR_HIDING, true);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -186,18 +186,18 @@ public final class CustomTabsIntent {
|
|||
@NonNull
|
||||
public Builder setActionButton(@NonNull Bitmap bitmap, @NonNull String str, @NonNull PendingIntent pendingIntent, boolean z2) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("android.support.customtabs.customaction.ID", 0);
|
||||
bundle.putParcelable("android.support.customtabs.customaction.ICON", bitmap);
|
||||
bundle.putString("android.support.customtabs.customaction.DESCRIPTION", str);
|
||||
bundle.putParcelable("android.support.customtabs.customaction.PENDING_INTENT", pendingIntent);
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.ACTION_BUTTON_BUNDLE", bundle);
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.TINT_ACTION_BUTTON", z2);
|
||||
bundle.putInt(CustomTabsIntent.KEY_ID, 0);
|
||||
bundle.putParcelable(CustomTabsIntent.KEY_ICON, bitmap);
|
||||
bundle.putString(CustomTabsIntent.KEY_DESCRIPTION, str);
|
||||
bundle.putParcelable(CustomTabsIntent.KEY_PENDING_INTENT, pendingIntent);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_ACTION_BUTTON_BUNDLE, bundle);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_TINT_ACTION_BUTTON, z2);
|
||||
return this;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public Builder setCloseButtonIcon(@NonNull Bitmap bitmap) {
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.CLOSE_BUTTON_ICON", bitmap);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_CLOSE_BUTTON_ICON, bitmap);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -206,14 +206,14 @@ public final class CustomTabsIntent {
|
|||
if (i < 0 || i > 2) {
|
||||
throw new IllegalArgumentException("Invalid value for the colorScheme argument");
|
||||
}
|
||||
this.mIntent.putExtra("androidx.browser.customtabs.extra.COLOR_SCHEME", i);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_COLOR_SCHEME, i);
|
||||
return this;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public Builder setColorSchemeParams(int i, @NonNull CustomTabColorSchemeParams customTabColorSchemeParams) {
|
||||
if (i < 0 || i > 2 || i == 0) {
|
||||
throw new IllegalArgumentException(a.l("Invalid colorScheme: ", i));
|
||||
throw new IllegalArgumentException(a.p("Invalid colorScheme: ", i));
|
||||
}
|
||||
if (this.mColorSchemeParamBundles == null) {
|
||||
this.mColorSchemeParamBundles = new SparseArray<>();
|
||||
|
@ -241,7 +241,7 @@ public final class CustomTabsIntent {
|
|||
|
||||
@NonNull
|
||||
public Builder setExitAnimations(@NonNull Context context, @AnimRes int i, @AnimRes int i2) {
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.EXIT_ANIMATION_BUNDLE", ActivityOptionsCompat.makeCustomAnimation(context, i, i2).toBundle());
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_EXIT_ANIMATION_BUNDLE, ActivityOptionsCompat.makeCustomAnimation(context, i, i2).toBundle());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -281,9 +281,9 @@ public final class CustomTabsIntent {
|
|||
|
||||
@NonNull
|
||||
public Builder setSecondaryToolbarViews(@NonNull RemoteViews remoteViews, @Nullable int[] iArr, @Nullable PendingIntent pendingIntent) {
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.EXTRA_REMOTEVIEWS", remoteViews);
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.EXTRA_REMOTEVIEWS_VIEW_IDS", iArr);
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.EXTRA_REMOTEVIEWS_PENDINGINTENT", pendingIntent);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_REMOTEVIEWS, remoteViews);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_REMOTEVIEWS_VIEW_IDS, iArr);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_REMOTEVIEWS_PENDINGINTENT, pendingIntent);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -301,18 +301,18 @@ public final class CustomTabsIntent {
|
|||
}
|
||||
this.mShareState = i;
|
||||
if (i == 1) {
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.SHARE_MENU_ITEM", true);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_DEFAULT_SHARE_MENU_ITEM, true);
|
||||
} else if (i == 2) {
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.SHARE_MENU_ITEM", false);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_DEFAULT_SHARE_MENU_ITEM, false);
|
||||
} else {
|
||||
this.mIntent.removeExtra("android.support.customtabs.extra.SHARE_MENU_ITEM");
|
||||
this.mIntent.removeExtra(CustomTabsIntent.EXTRA_DEFAULT_SHARE_MENU_ITEM);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public Builder setShowTitle(boolean z2) {
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.TITLE_VISIBILITY", z2 ? 1 : 0);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_TITLE_VISIBILITY_STATE, z2 ? 1 : 0);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -331,7 +331,7 @@ public final class CustomTabsIntent {
|
|||
|
||||
@NonNull
|
||||
public Builder setUrlBarHidingEnabled(boolean z2) {
|
||||
this.mIntent.putExtra("android.support.customtabs.extra.ENABLE_URLBAR_HIDING", z2);
|
||||
this.mIntent.putExtra(CustomTabsIntent.EXTRA_ENABLE_URLBAR_HIDING, z2);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -355,14 +355,14 @@ public final class CustomTabsIntent {
|
|||
public static CustomTabColorSchemeParams getColorSchemeParams(@NonNull Intent intent, int i) {
|
||||
Bundle bundle;
|
||||
if (i < 0 || i > 2 || i == 0) {
|
||||
throw new IllegalArgumentException(a.l("Invalid colorScheme: ", i));
|
||||
throw new IllegalArgumentException(a.p("Invalid colorScheme: ", i));
|
||||
}
|
||||
Bundle extras = intent.getExtras();
|
||||
if (extras == null) {
|
||||
return CustomTabColorSchemeParams.fromBundle(null);
|
||||
}
|
||||
CustomTabColorSchemeParams fromBundle = CustomTabColorSchemeParams.fromBundle(extras);
|
||||
SparseArray sparseParcelableArray = extras.getSparseParcelableArray("androidx.browser.customtabs.extra.COLOR_SCHEME_PARAMS");
|
||||
SparseArray sparseParcelableArray = extras.getSparseParcelableArray(EXTRA_COLOR_SCHEME_PARAMS);
|
||||
return (sparseParcelableArray == null || (bundle = (Bundle) sparseParcelableArray.get(i)) == null) ? fromBundle : CustomTabColorSchemeParams.fromBundle(bundle).withDefaults(fromBundle);
|
||||
}
|
||||
|
||||
|
@ -376,12 +376,12 @@ public final class CustomTabsIntent {
|
|||
intent = new Intent("android.intent.action.VIEW");
|
||||
}
|
||||
intent.addFlags(268435456);
|
||||
intent.putExtra("android.support.customtabs.extra.user_opt_out", true);
|
||||
intent.putExtra(EXTRA_USER_OPT_OUT_FROM_CUSTOM_TABS, true);
|
||||
return intent;
|
||||
}
|
||||
|
||||
public static boolean shouldAlwaysUseBrowserUI(@NonNull Intent intent) {
|
||||
return intent.getBooleanExtra("android.support.customtabs.extra.user_opt_out", false) && (intent.getFlags() & 268435456) != 0;
|
||||
return intent.getBooleanExtra(EXTRA_USER_OPT_OUT_FROM_CUSTOM_TABS, false) && (intent.getFlags() & 268435456) != 0;
|
||||
}
|
||||
|
||||
public void launchUrl(@NonNull Context context, @NonNull Uri uri) {
|
||||
|
|
|
@ -46,8 +46,8 @@ public abstract class CustomTabsService extends Service {
|
|||
if (bundle == null) {
|
||||
return null;
|
||||
}
|
||||
PendingIntent pendingIntent = (PendingIntent) bundle.getParcelable("android.support.customtabs.extra.SESSION_ID");
|
||||
bundle.remove("android.support.customtabs.extra.SESSION_ID");
|
||||
PendingIntent pendingIntent = (PendingIntent) bundle.getParcelable(CustomTabsIntent.EXTRA_SESSION_ID);
|
||||
bundle.remove(CustomTabsIntent.EXTRA_SESSION_ID);
|
||||
return pendingIntent;
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ public final class CustomTabsSession {
|
|||
private void addIdToBundle(Bundle bundle) {
|
||||
PendingIntent pendingIntent = this.mId;
|
||||
if (pendingIntent != null) {
|
||||
bundle.putParcelable("android.support.customtabs.extra.SESSION_ID", pendingIntent);
|
||||
bundle.putParcelable(CustomTabsIntent.EXTRA_SESSION_ID, pendingIntent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,10 +188,10 @@ public final class CustomTabsSession {
|
|||
|
||||
public boolean setActionButton(@NonNull Bitmap bitmap, @NonNull String str) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putParcelable("android.support.customtabs.customaction.ICON", bitmap);
|
||||
bundle.putString("android.support.customtabs.customaction.DESCRIPTION", str);
|
||||
bundle.putParcelable(CustomTabsIntent.KEY_ICON, bitmap);
|
||||
bundle.putString(CustomTabsIntent.KEY_DESCRIPTION, str);
|
||||
Bundle bundle2 = new Bundle();
|
||||
bundle2.putBundle("android.support.customtabs.extra.ACTION_BUTTON_BUNDLE", bundle);
|
||||
bundle2.putBundle(CustomTabsIntent.EXTRA_ACTION_BUTTON_BUNDLE, bundle);
|
||||
addIdToBundle(bundle);
|
||||
try {
|
||||
return this.mService.updateVisuals(this.mCallback, bundle2);
|
||||
|
@ -202,9 +202,9 @@ public final class CustomTabsSession {
|
|||
|
||||
public boolean setSecondaryToolbarViews(@Nullable RemoteViews remoteViews, @Nullable int[] iArr, @Nullable PendingIntent pendingIntent) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putParcelable("android.support.customtabs.extra.EXTRA_REMOTEVIEWS", remoteViews);
|
||||
bundle.putIntArray("android.support.customtabs.extra.EXTRA_REMOTEVIEWS_VIEW_IDS", iArr);
|
||||
bundle.putParcelable("android.support.customtabs.extra.EXTRA_REMOTEVIEWS_PENDINGINTENT", pendingIntent);
|
||||
bundle.putParcelable(CustomTabsIntent.EXTRA_REMOTEVIEWS, remoteViews);
|
||||
bundle.putIntArray(CustomTabsIntent.EXTRA_REMOTEVIEWS_VIEW_IDS, iArr);
|
||||
bundle.putParcelable(CustomTabsIntent.EXTRA_REMOTEVIEWS_PENDINGINTENT, pendingIntent);
|
||||
addIdToBundle(bundle);
|
||||
try {
|
||||
return this.mService.updateVisuals(this.mCallback, bundle);
|
||||
|
@ -216,11 +216,11 @@ public final class CustomTabsSession {
|
|||
@Deprecated
|
||||
public boolean setToolbarItem(int i, @NonNull Bitmap bitmap, @NonNull String str) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("android.support.customtabs.customaction.ID", i);
|
||||
bundle.putParcelable("android.support.customtabs.customaction.ICON", bitmap);
|
||||
bundle.putString("android.support.customtabs.customaction.DESCRIPTION", str);
|
||||
bundle.putInt(CustomTabsIntent.KEY_ID, i);
|
||||
bundle.putParcelable(CustomTabsIntent.KEY_ICON, bitmap);
|
||||
bundle.putString(CustomTabsIntent.KEY_DESCRIPTION, str);
|
||||
Bundle bundle2 = new Bundle();
|
||||
bundle2.putBundle("android.support.customtabs.extra.ACTION_BUTTON_BUNDLE", bundle);
|
||||
bundle2.putBundle(CustomTabsIntent.EXTRA_ACTION_BUTTON_BUNDLE, bundle);
|
||||
addIdToBundle(bundle2);
|
||||
try {
|
||||
return this.mService.updateVisuals(this.mCallback, bundle2);
|
||||
|
|