80.8 - Beta (80108)
							
								
								
									
										5
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
app/src/main/*
 | 
			
		||||
!app/src/main/AndroidManifest.xml
 | 
			
		||||
!app/src/main/assets
 | 
			
		||||
!app/src/main/java
 | 
			
		||||
!app/src/main/res
 | 
			
		||||
							
								
								
									
										38
									
								
								app/build.gradle
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,38 @@
 | 
			
		|||
plugins {
 | 
			
		||||
    id 'com.android.application'
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
android {
 | 
			
		||||
    compileSdkVersion 30
 | 
			
		||||
    buildToolsVersion "30.0.2"
 | 
			
		||||
 | 
			
		||||
    defaultConfig {
 | 
			
		||||
        applicationId 'com.discord'
 | 
			
		||||
        minSdkVersion 21
 | 
			
		||||
        targetSdkVersion 29
 | 
			
		||||
        versionCode 80108
 | 
			
		||||
        versionName "80.8 - Beta"
 | 
			
		||||
 | 
			
		||||
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    buildTypes {
 | 
			
		||||
        release {
 | 
			
		||||
            minifyEnabled false
 | 
			
		||||
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    compileOptions {
 | 
			
		||||
        sourceCompatibility JavaVersion.VERSION_1_8
 | 
			
		||||
        targetCompatibility JavaVersion.VERSION_1_8
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
        lintOptions {
 | 
			
		||||
            abortOnError false
 | 
			
		||||
        }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
dependencies {
 | 
			
		||||
    // some dependencies
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										273
									
								
								app/src/main/AndroidManifest.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,273 @@
 | 
			
		|||
<?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"/>
 | 
			
		||||
    <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"/>
 | 
			
		||||
    <uses-feature android:name="android.hardware.microphone" android:required="false"/>
 | 
			
		||||
    <uses-feature android:name="android.hardware.bluetooth" android:required="false"/>
 | 
			
		||||
    <uses-permission android:name="com.android.vending.BILLING"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.BLUETOOTH"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.BROADCAST_STICKY"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.INTERNET"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.CAMERA"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.VIBRATE"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
 | 
			
		||||
    <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
 | 
			
		||||
    <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>
 | 
			
		||||
        <package android:name="com.samsung.android.game.gametools"/>
 | 
			
		||||
        <package android:name="com.samsung.android.game.gamehome"/>
 | 
			
		||||
        <intent>
 | 
			
		||||
            <action android:name="android.support.customtabs.action.CustomTabsService"/>
 | 
			
		||||
        </intent>
 | 
			
		||||
    </queries>
 | 
			
		||||
    <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">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="android.intent.action.MAIN"/>
 | 
			
		||||
                <category android:name="android.intent.category.LAUNCHER"/>
 | 
			
		||||
            </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="https" android:host="*.discord.com" android:pathPattern="/app"/>
 | 
			
		||||
                <data android:scheme="https" android:host="discord.com" android:pathPattern="/app"/>
 | 
			
		||||
                <data android:scheme="https" android:host="*.discord.com" android:pathPattern="/gifts/.*"/>
 | 
			
		||||
                <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/.*"/>
 | 
			
		||||
                <data android:scheme="https" android:host="discord.com" android:pathPattern="/feature/.*"/>
 | 
			
		||||
                <data android:scheme="https" android:host="*.discord.com" android:pathPattern="/discovery"/>
 | 
			
		||||
                <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="*.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/.*"/>
 | 
			
		||||
            </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="/.*"/>
 | 
			
		||||
                <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"/>
 | 
			
		||||
                <category android:name="android.intent.category.DEFAULT"/>
 | 
			
		||||
                <category android:name="android.intent.category.BROWSABLE"/>
 | 
			
		||||
                <data android:scheme="discord" android:host="action" android:pathPattern="/oauth2/authorize"/>
 | 
			
		||||
                <data android:scheme="discord" android:host="action" android:pathPattern="/connect/authorize"/>
 | 
			
		||||
            </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="https" android:host="discord.com" android:pathPattern="/connect/authorize"/>
 | 
			
		||||
                <data android:scheme="https" android:host="*.discord.com" android:pathPattern="/connect/authorize"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
            <meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts"/>
 | 
			
		||||
        </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">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="com.discord.intent.action.SDK"/>
 | 
			
		||||
                <category android:name="android.intent.category.DEFAULT"/>
 | 
			
		||||
                <category android:name="android.intent.category.OPENABLE"/>
 | 
			
		||||
                <data android:scheme="discord" android:host="sdk" android:pathPattern="/.*"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="android.intent.action.SEND"/>
 | 
			
		||||
                <action android:name="android.intent.action.SEND_MULTIPLE"/>
 | 
			
		||||
                <category android:name="android.intent.category.DEFAULT"/>
 | 
			
		||||
                <category android:name="android.intent.category.OPENABLE"/>
 | 
			
		||||
                <data android:mimeType="*/*"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
            <meta-data android:name="android.service.chooser.chooser_target_service" android:value="androidx.sharetarget.ChooserTargetServiceCompat"/>
 | 
			
		||||
        </activity>
 | 
			
		||||
        <activity android:name="com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity" android:exported="true"/>
 | 
			
		||||
        <service android:name="com.discord.utilities.fcm.NotificationClient$FCMMessagingService" android:exported="false">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="com.google.firebase.MESSAGING_EVENT"/>
 | 
			
		||||
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </service>
 | 
			
		||||
        <service android:name="com.discord.app.DiscordConnectService" android:permission="com.discord.permission.CONNECT" android:exported="true">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="com.discord.intent.action.CONNECT"/>
 | 
			
		||||
                <data android:scheme="discord" android:host="app" android:pathPattern="/connect/.*"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </service>
 | 
			
		||||
        <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"/>
 | 
			
		||||
        <receiver android:name="com.discord.utilities.fcm.NotificationActions" android:exported="false">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="com.discord.intent.action.ENQUEUE_WORK"/>
 | 
			
		||||
                <action android:name="com.discord.intent.action.NOTIFICATION_DELETED"/>
 | 
			
		||||
                <action android:name="com.discord.intent.action.NOTIFICATION_CANCEL"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </receiver>
 | 
			
		||||
        <receiver android:name="com.discord.utilities.io.NetworkUtils$NetworkDownloadReceiver" android:exported="true">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </receiver>
 | 
			
		||||
        <service android:name="com.discord.utilities.voice.VoiceEngineForegroundService" android:foregroundServiceType="mediaProjection"/>
 | 
			
		||||
        <provider android:name="androidx.core.content.FileProvider" android:exported="false" android:authorities="com.discord.file-provider" android:grantUriPermissions="true">
 | 
			
		||||
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"/>
 | 
			
		||||
        </provider>
 | 
			
		||||
        <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"/>
 | 
			
		||||
        <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>
 | 
			
		||||
                <action android:name="android.service.chooser.ChooserTargetService"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </service>
 | 
			
		||||
        <receiver android:name="com.google.android.gms.analytics.AnalyticsReceiver" android:enabled="true" android:exported="false"/>
 | 
			
		||||
        <service android:name="com.google.android.gms.analytics.AnalyticsService" android:enabled="true" android:exported="false"/>
 | 
			
		||||
        <service android:name="com.google.android.gms.analytics.AnalyticsJobService" android:permission="android.permission.BIND_JOB_SERVICE" android:enabled="true" android:exported="false"/>
 | 
			
		||||
        <activity android:theme="@android:style/Theme.Translucent.NoTitleBar" android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity" android:exported="false" android:excludeFromRecents="true"/>
 | 
			
		||||
        <service android:name="com.google.android.gms.auth.api.signin.RevocationBoundService" android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" android:exported="true" android:visibleToInstantApps="true"/>
 | 
			
		||||
        <service android:name="com.google.firebase.components.ComponentDiscoveryService" android:exported="false" android:directBootAware="true">
 | 
			
		||||
            <meta-data android:name="com.google.firebase.components:com.google.firebase.dynamiclinks.internal.FirebaseDynamicLinkRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
 | 
			
		||||
            <meta-data android:name="com.google.firebase.components:com.google.firebase.messaging.ktx.FirebaseMessagingKtxRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
 | 
			
		||||
            <meta-data android:name="com.google.firebase.components:com.google.firebase.messaging.FirebaseMessagingRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
 | 
			
		||||
            <meta-data android:name="com.google.firebase.components:com.google.firebase.iid.Registrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
 | 
			
		||||
            <meta-data android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
 | 
			
		||||
            <meta-data android:name="com.google.firebase.components:com.google.firebase.crashlytics.ndk.CrashlyticsNdkRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
 | 
			
		||||
            <meta-data android:name="com.google.firebase.components:com.google.firebase.crashlytics.CrashlyticsRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
 | 
			
		||||
            <meta-data android:name="com.google.firebase.components:com.google.firebase.ktx.FirebaseCommonKtxRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
 | 
			
		||||
            <meta-data android:name="com.google.firebase.components:com.google.firebase.installations.FirebaseInstallationsRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
 | 
			
		||||
            <meta-data android:name="com.google.firebase.components:com.google.firebase.datatransport.TransportRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
 | 
			
		||||
        </service>
 | 
			
		||||
        <service android:name="com.google.firebase.messaging.FirebaseMessagingService" android:exported="false" android:directBootAware="true">
 | 
			
		||||
            <intent-filter android:priority="-500">
 | 
			
		||||
                <action android:name="com.google.firebase.MESSAGING_EVENT"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </service>
 | 
			
		||||
        <receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:permission="com.google.android.c2dm.permission.SEND" android:exported="true">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </receiver>
 | 
			
		||||
        <activity android:theme="@android:style/Theme.Translucent.NoTitleBar" android:name="com.google.android.gms.common.api.GoogleApiActivity" android:exported="false"/>
 | 
			
		||||
        <receiver android:name="com.google.android.gms.measurement.AppMeasurementReceiver" android:enabled="true" android:exported="false"/>
 | 
			
		||||
        <service android:name="com.google.android.gms.measurement.AppMeasurementService" android:enabled="true" android:exported="false"/>
 | 
			
		||||
        <service android:name="com.google.android.gms.measurement.AppMeasurementJobService" android:permission="android.permission.BIND_JOB_SERVICE" android:enabled="true" android:exported="false"/>
 | 
			
		||||
        <provider android:name="com.google.firebase.provider.FirebaseInitProvider" android:exported="false" android:authorities="com.discord.firebaseinitprovider" android:initOrder="100" android:directBootAware="true"/>
 | 
			
		||||
        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
 | 
			
		||||
        <provider android:name="androidx.work.impl.WorkManagerInitializer" android:exported="false" android:multiprocess="true" android:authorities="com.discord.workmanager-init" android:directBootAware="false"/>
 | 
			
		||||
        <service android:name="androidx.work.impl.background.systemalarm.SystemAlarmService" android:enabled="@bool/enable_system_alarm_service_default" android:exported="false" android:directBootAware="false"/>
 | 
			
		||||
        <service android:name="androidx.work.impl.background.systemjob.SystemJobService" android:permission="android.permission.BIND_JOB_SERVICE" android:enabled="@bool/enable_system_job_service_default" android:exported="true" android:directBootAware="false"/>
 | 
			
		||||
        <service android:name="androidx.work.impl.foreground.SystemForegroundService" android:enabled="@bool/enable_system_foreground_service_default" android:exported="false" android:directBootAware="false"/>
 | 
			
		||||
        <receiver android:name="androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver" android:enabled="true" android:exported="false" android:directBootAware="false"/>
 | 
			
		||||
        <receiver android:name="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy" android:enabled="false" android:exported="false" android:directBootAware="false">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
 | 
			
		||||
                <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </receiver>
 | 
			
		||||
        <receiver android:name="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy" android:enabled="false" android:exported="false" android:directBootAware="false">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="android.intent.action.BATTERY_OKAY"/>
 | 
			
		||||
                <action android:name="android.intent.action.BATTERY_LOW"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </receiver>
 | 
			
		||||
        <receiver android:name="androidx.work.impl.background.systemalarm.ConstraintProxy$StorageNotLowProxy" android:enabled="false" android:exported="false" android:directBootAware="false">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="android.intent.action.DEVICE_STORAGE_LOW"/>
 | 
			
		||||
                <action android:name="android.intent.action.DEVICE_STORAGE_OK"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </receiver>
 | 
			
		||||
        <receiver android:name="androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy" android:enabled="false" android:exported="false" android:directBootAware="false">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </receiver>
 | 
			
		||||
        <receiver android:name="androidx.work.impl.background.systemalarm.RescheduleReceiver" android:enabled="false" android:exported="false" android:directBootAware="false">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
 | 
			
		||||
                <action android:name="android.intent.action.TIME_SET"/>
 | 
			
		||||
                <action android:name="android.intent.action.TIMEZONE_CHANGED"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </receiver>
 | 
			
		||||
        <receiver android:name="androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver" android:enabled="@bool/enable_system_alarm_service_default" android:exported="false" android:directBootAware="false">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="androidx.work.impl.background.systemalarm.UpdateProxies"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </receiver>
 | 
			
		||||
        <receiver android:name="androidx.work.impl.diagnostics.DiagnosticsReceiver" android:permission="android.permission.DUMP" android:enabled="true" android:exported="true" android:directBootAware="false">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="androidx.work.diagnostics.REQUEST_DIAGNOSTICS"/>
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </receiver>
 | 
			
		||||
        <service android:name="com.google.android.datatransport.runtime.backends.TransportBackendDiscovery" android:exported="false">
 | 
			
		||||
            <meta-data android:name="backend:com.google.android.datatransport.cct.CctBackendFactory" android:value="cct"/>
 | 
			
		||||
        </service>
 | 
			
		||||
        <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"/>
 | 
			
		||||
        <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>
 | 
			
		||||
</manifest>
 | 
			
		||||
							
								
								
									
										1
									
								
								app/src/main/assets/animations/anim_boost_activated.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								app/src/main/assets/animations/anim_verify_by_email.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								app/src/main/assets/animations/anim_verify_by_phone.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								app/src/main/assets/data/canadian-provinces.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
[{"label":"Alberta","value":"AB"},{"label":"British Columbia","value":"BC"},{"label":"Manitoba","value":"MB"},{"label":"New Brunswick","value":"NB"},{"label":"Newfoundland and Labrador","value":"NL"},{"label":"Nova Scotia","value":"NS"},{"label":"Ontario","value":"ON"},{"label":"Prince Edward Island","value":"PE"},{"label":"Quebec","value":"QC"},{"label":"Saskatchewan","value":"SK"},{"label":"Northwest Territories","value":"NT"},{"label":"Nunavut","value":"NU"},{"label":"Yukon","value":"YT"}]
 | 
			
		||||
							
								
								
									
										1
									
								
								app/src/main/assets/data/country-codes.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										255
									
								
								app/src/main/assets/data/emoji-shortcuts.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,255 @@
 | 
			
		|||
[
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "angry",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ">:(",
 | 
			
		||||
      ">:-(",
 | 
			
		||||
      ">=(",
 | 
			
		||||
      ">=-("
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "blush",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":\")",
 | 
			
		||||
      ":-\")",
 | 
			
		||||
      "=\")",
 | 
			
		||||
      "=-\")"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "broken_heart",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      "</3",
 | 
			
		||||
      "<\\3"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "confused",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":-\\",
 | 
			
		||||
      ":-/",
 | 
			
		||||
      "=-\\",
 | 
			
		||||
      "=-/"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "cry",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":'(",
 | 
			
		||||
      ":'-(",
 | 
			
		||||
      ":,(",
 | 
			
		||||
      ":,-(",
 | 
			
		||||
      "='(",
 | 
			
		||||
      "='-(",
 | 
			
		||||
      "=,(",
 | 
			
		||||
      "=,-("
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "frowning",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":(",
 | 
			
		||||
      ":-(",
 | 
			
		||||
      "=(",
 | 
			
		||||
      "=-("
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "heart",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      "<3",
 | 
			
		||||
      "♡"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "imp",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      "]:(",
 | 
			
		||||
      "]:-(",
 | 
			
		||||
      "]=(",
 | 
			
		||||
      "]=-("
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "innocent",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      "o:)",
 | 
			
		||||
      "O:)",
 | 
			
		||||
      "o:-)",
 | 
			
		||||
      "O:-)",
 | 
			
		||||
      "0:)",
 | 
			
		||||
      "0:-)",
 | 
			
		||||
      "o=)",
 | 
			
		||||
      "O=)",
 | 
			
		||||
      "o=-)",
 | 
			
		||||
      "O=-)",
 | 
			
		||||
      "0=)",
 | 
			
		||||
      "0=-)"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "joy",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":')",
 | 
			
		||||
      ":'-)",
 | 
			
		||||
      ":,)",
 | 
			
		||||
      ":,-)",
 | 
			
		||||
      ":'D",
 | 
			
		||||
      ":'-D",
 | 
			
		||||
      ":,D",
 | 
			
		||||
      ":,-D",
 | 
			
		||||
      "=')",
 | 
			
		||||
      "='-)",
 | 
			
		||||
      "=,)",
 | 
			
		||||
      "=,-)",
 | 
			
		||||
      "='D",
 | 
			
		||||
      "='-D",
 | 
			
		||||
      "=,D",
 | 
			
		||||
      "=,-D"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "kissing",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":*",
 | 
			
		||||
      ":-*",
 | 
			
		||||
      "=*",
 | 
			
		||||
      "=-*"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "laughing",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      "x-)",
 | 
			
		||||
      "X-)"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "neutral_face",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":|",
 | 
			
		||||
      ":-|",
 | 
			
		||||
      "=|",
 | 
			
		||||
      "=-|"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "open_mouth",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":o",
 | 
			
		||||
      ":-o",
 | 
			
		||||
      ":O",
 | 
			
		||||
      ":-O",
 | 
			
		||||
      "=o",
 | 
			
		||||
      "=-o",
 | 
			
		||||
      "=O",
 | 
			
		||||
      "=-O"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "rage",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":@",
 | 
			
		||||
      ":-@",
 | 
			
		||||
      "=@",
 | 
			
		||||
      "=-@"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "smile",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":D",
 | 
			
		||||
      ":-D",
 | 
			
		||||
      "=D",
 | 
			
		||||
      "=-D"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "slight_smile",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":)",
 | 
			
		||||
      ":-)",
 | 
			
		||||
      "=)",
 | 
			
		||||
      "=-)"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "smiling_imp",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      "]:)",
 | 
			
		||||
      "]:-)",
 | 
			
		||||
      "]=)",
 | 
			
		||||
      "]=-)"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "sob",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":,'(",
 | 
			
		||||
      ":,'-(",
 | 
			
		||||
      ";(",
 | 
			
		||||
      ";-(",
 | 
			
		||||
      "=,'(",
 | 
			
		||||
      "=,'-("
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "stuck_out_tongue",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":P",
 | 
			
		||||
      ":-P",
 | 
			
		||||
      "=P",
 | 
			
		||||
      "=-P"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "sunglasses",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      "8-)",
 | 
			
		||||
      "B-)"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "sweat",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ",:(",
 | 
			
		||||
      ",:-(",
 | 
			
		||||
      ",=(",
 | 
			
		||||
      ",=-("
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "sweat_smile",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ",:)",
 | 
			
		||||
      ",:-)",
 | 
			
		||||
      ",=)",
 | 
			
		||||
      ",=-)"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "unamused",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ":s",
 | 
			
		||||
      ":-S",
 | 
			
		||||
      ":z",
 | 
			
		||||
      ":-Z",
 | 
			
		||||
      ":$",
 | 
			
		||||
      ":-$",
 | 
			
		||||
      "=s",
 | 
			
		||||
      "=-S",
 | 
			
		||||
      "=z",
 | 
			
		||||
      "=-Z",
 | 
			
		||||
      "=$",
 | 
			
		||||
      "=-$"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "emoji": "wink",
 | 
			
		||||
    "shortcuts": [
 | 
			
		||||
      ";)",
 | 
			
		||||
      ";-)"
 | 
			
		||||
    ]
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
							
								
								
									
										34453
									
								
								app/src/main/assets/data/emojis.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								app/src/main/assets/data/states.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
[{"label":"Alabama","value":"AL"},{"label":"Alaska","value":"AK"},{"label":"American Samoa","value":"AS"},{"label":"Arizona","value":"AZ"},{"label":"Arkansas","value":"AR"},{"label":"Armed Forces: Americas","value":"AA"},{"label":"Armed Forces: Europe","value":"AE"},{"label":"Armed Forces: Pacific","value":"AP"},{"label":"California","value":"CA"},{"label":"Colorado","value":"CO"},{"label":"Connecticut","value":"CT"},{"label":"Delaware","value":"DE"},{"label":"District Of Columbia","value":"DC"},{"label":"Federated States Of Micronesia","value":"FM"},{"label":"Florida","value":"FL"},{"label":"Georgia","value":"GA"},{"label":"Guam","value":"GU"},{"label":"Hawaii","value":"HI"},{"label":"Idaho","value":"ID"},{"label":"Illinois","value":"IL"},{"label":"Indiana","value":"IN"},{"label":"Iowa","value":"IA"},{"label":"Kansas","value":"KS"},{"label":"Kentucky","value":"KY"},{"label":"Louisiana","value":"LA"},{"label":"Maine","value":"ME"},{"label":"Marshall Islands","value":"MH"},{"label":"Maryland","value":"MD"},{"label":"Massachusetts","value":"MA"},{"label":"Michigan","value":"MI"},{"label":"Minnesota","value":"MN"},{"label":"Mississippi","value":"MS"},{"label":"Missouri","value":"MO"},{"label":"Montana","value":"MT"},{"label":"Nebraska","value":"NE"},{"label":"Nevada","value":"NV"},{"label":"New Hampshire","value":"NH"},{"label":"New Jersey","value":"NJ"},{"label":"New Mexico","value":"NM"},{"label":"New York","value":"NY"},{"label":"North Carolina","value":"NC"},{"label":"North Dakota","value":"ND"},{"label":"Northern Mariana Islands","value":"MP"},{"label":"Ohio","value":"OH"},{"label":"Oklahoma","value":"OK"},{"label":"Oregon","value":"OR"},{"label":"Palau","value":"PW"},{"label":"Pennsylvania","value":"PA"},{"label":"Puerto Rico","value":"PR"},{"label":"Rhode Island","value":"RI"},{"label":"South Carolina","value":"SC"},{"label":"South Dakota","value":"SD"},{"label":"Tennessee","value":"TN"},{"label":"Texas","value":"TX"},{"label":"Utah","value":"UT"},{"label":"Vermont","value":"VT"},{"label":"Virgin Islands","value":"VI"},{"label":"Virginia","value":"VA"},{"label":"Washington","value":"WA"},{"label":"West Virginia","value":"WV"},{"label":"Wisconsin","value":"WI"},{"label":"Wyoming","value":"WY"}]
 | 
			
		||||
							
								
								
									
										162
									
								
								app/src/main/assets/hcaptcha-form.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,162 @@
 | 
			
		|||
<html>
 | 
			
		||||
<head>
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
 | 
			
		||||
    <style>
 | 
			
		||||
        * {
 | 
			
		||||
            padding: 0;
 | 
			
		||||
            margin: 0;
 | 
			
		||||
        }
 | 
			
		||||
        body {
 | 
			
		||||
            display: table;
 | 
			
		||||
            width: 100%;
 | 
			
		||||
            height: 100%;
 | 
			
		||||
            text-align: center;
 | 
			
		||||
        }
 | 
			
		||||
        #hcaptcha-container {
 | 
			
		||||
            margin-top: 5px;
 | 
			
		||||
            display: table-cell;
 | 
			
		||||
            vertical-align: middle;
 | 
			
		||||
        }
 | 
			
		||||
        /* overwrite hCaptcha iframe overlay which adds a #FFF background with opacity 0.05 */
 | 
			
		||||
        div > div:nth-child(2) {
 | 
			
		||||
            opacity: 0 !important;
 | 
			
		||||
        }
 | 
			
		||||
    </style>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
 | 
			
		||||
<div id="hcaptcha-container"></div>
 | 
			
		||||
 | 
			
		||||
<script type="text/javascript">
 | 
			
		||||
    // Android will inject this bridge object as `JSInterface`
 | 
			
		||||
    // Browser is missing it so we mock it
 | 
			
		||||
    var BridgeObject = window.JSInterface || {
 | 
			
		||||
        getConfig: function getConfig() {
 | 
			
		||||
            return JSON.stringify({
 | 
			
		||||
                siteKey: '10000000-ffff-ffff-ffff-000000000001',
 | 
			
		||||
                locale: 'ro',
 | 
			
		||||
                size: 'compact',
 | 
			
		||||
                theme: 'dark',
 | 
			
		||||
                sentry: true,
 | 
			
		||||
                rqdata: null,
 | 
			
		||||
                apiEndpoint: 'https://hcaptcha.com/1/api.js',
 | 
			
		||||
                endpoint: null,
 | 
			
		||||
                assethost: null,
 | 
			
		||||
                imghost: null,
 | 
			
		||||
                reportapi: null
 | 
			
		||||
            });
 | 
			
		||||
        },
 | 
			
		||||
        onPass: function onPass(token) {
 | 
			
		||||
            return console.log("pass: token ".concat(token));
 | 
			
		||||
        },
 | 
			
		||||
        onError: function onError(errCode) {
 | 
			
		||||
            return console.log("error: code ".concat(errCode));
 | 
			
		||||
        },
 | 
			
		||||
        onLoaded: function onLoaded() {
 | 
			
		||||
            return console.log('cb: challenge or checkbox is visible');
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    var bridgeConfig = JSON.parse(BridgeObject.getConfig());
 | 
			
		||||
 | 
			
		||||
    function getRenderConfig() {
 | 
			
		||||
        return {
 | 
			
		||||
            sitekey: bridgeConfig.siteKey,
 | 
			
		||||
            size: bridgeConfig.size,
 | 
			
		||||
            theme: bridgeConfig.theme,
 | 
			
		||||
            'callback': function callback(token) {
 | 
			
		||||
                return BridgeObject.onPass(token);
 | 
			
		||||
            },
 | 
			
		||||
            'expired-callback': function expiredCallback() {
 | 
			
		||||
                return BridgeObject.onError(15);
 | 
			
		||||
            },
 | 
			
		||||
            'chalexpired-callback': function chalexpiredCallback() {
 | 
			
		||||
                return BridgeObject.onError(15);
 | 
			
		||||
            },
 | 
			
		||||
            'close-callback': function closeCallback() {
 | 
			
		||||
                return BridgeObject.onError(30);
 | 
			
		||||
            },
 | 
			
		||||
            'error-callback': function errorCallback() {
 | 
			
		||||
                return BridgeObject.onError(31);
 | 
			
		||||
            },
 | 
			
		||||
            'open-callback': function openCallback() {
 | 
			
		||||
                return BridgeObject.onLoaded();
 | 
			
		||||
            }
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    function onHcaptchaLoaded() {
 | 
			
		||||
        try {
 | 
			
		||||
            var renderConfig = getRenderConfig();
 | 
			
		||||
            var rqdata = bridgeConfig.rqdata;
 | 
			
		||||
            var hCaptchaID = hcaptcha.render('hcaptcha-container', renderConfig);
 | 
			
		||||
 | 
			
		||||
            if (rqdata) {
 | 
			
		||||
                hcaptcha.setData(hCaptchaID, {
 | 
			
		||||
                    rqdata: rqdata
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (renderConfig.size === 'invisible') {
 | 
			
		||||
                hcaptcha.execute(hCaptchaID);
 | 
			
		||||
            } else {
 | 
			
		||||
                BridgeObject.onLoaded();
 | 
			
		||||
            }
 | 
			
		||||
        } catch (e) {
 | 
			
		||||
            console.error(e);
 | 
			
		||||
            BridgeObject.onError(29);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    function addQueryParamIfDefined(url, queryName, queryValue) {
 | 
			
		||||
        if (queryValue !== undefined && queryValue !== null) {
 | 
			
		||||
            var link = url.indexOf('?') !== -1 ? '&' : '?';
 | 
			
		||||
            return url + link + queryName + '=' + encodeURIComponent(queryValue);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return url;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    function loadApi() {
 | 
			
		||||
        var siteKey = bridgeConfig.siteKey;
 | 
			
		||||
        var locale = bridgeConfig.locale;
 | 
			
		||||
        var sentry = bridgeConfig.sentry;
 | 
			
		||||
        var apiEndpoint = bridgeConfig.apiEndpoint;
 | 
			
		||||
        var endpoint = bridgeConfig.endpoint;
 | 
			
		||||
        var assethost = bridgeConfig.assethost;
 | 
			
		||||
        var imghost = bridgeConfig.imghost;
 | 
			
		||||
        var reportapi = bridgeConfig.reportapi;
 | 
			
		||||
        var host = siteKey + '.android-sdk.hcaptcha.com';
 | 
			
		||||
        var scriptSrc = apiEndpoint + '?render=explicit&onload=' + onHcaptchaLoaded.name;
 | 
			
		||||
        scriptSrc = addQueryParamIfDefined(scriptSrc, 'recaptchacompat', 'off');
 | 
			
		||||
        scriptSrc = addQueryParamIfDefined(scriptSrc, 'hl', locale);
 | 
			
		||||
        scriptSrc = addQueryParamIfDefined(scriptSrc, 'host', host);
 | 
			
		||||
        scriptSrc = addQueryParamIfDefined(scriptSrc, 'sentry', sentry);
 | 
			
		||||
        scriptSrc = addQueryParamIfDefined(scriptSrc, 'endpoint', endpoint);
 | 
			
		||||
        scriptSrc = addQueryParamIfDefined(scriptSrc, 'assethost', assethost);
 | 
			
		||||
        scriptSrc = addQueryParamIfDefined(scriptSrc, 'imghost', imghost);
 | 
			
		||||
        scriptSrc = addQueryParamIfDefined(scriptSrc, 'reportapi', reportapi);
 | 
			
		||||
        var script = document.createElement('script');
 | 
			
		||||
        script.async = true;
 | 
			
		||||
        script.src = scriptSrc;
 | 
			
		||||
 | 
			
		||||
        script.onerror = function () {
 | 
			
		||||
            // network issue
 | 
			
		||||
            BridgeObject.onError(7);
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        document.head.appendChild(script);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    document.body.onclick = function () {
 | 
			
		||||
        if (window.hcaptcha) {
 | 
			
		||||
            window.hcaptcha.close();
 | 
			
		||||
        } else {
 | 
			
		||||
            BridgeObject.onError(30);
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    loadApi();
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_avatar_0.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 14 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_avatar_1.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 9.8 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_avatar_2.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 13 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_avatar_3.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 15 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_avatar_4.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 15 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_avatar_5.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 14 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_avatar_new_0.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_avatar_new_1.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.8 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_avatar_new_2.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.8 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_avatar_new_3.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_avatar_new_4.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_avatar_new_5.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_hash.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 4.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_icon.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 12 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_icon_selected.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.4 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/default_mention.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 31 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/group_dm_icon_0.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/group_dm_icon_1.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/group_dm_icon_2.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/group_dm_icon_3.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.4 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/group_dm_icon_4.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/group_dm_icon_5.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.4 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/group_dm_icon_6.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/group_dm_icon_7.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/images/system_user_avatar.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/thz/Small_16k.thw
									
										
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/thz/Small_8k.thw
									
										
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								app/src/main/assets/thz/VAD_weight.thw
									
										
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								app/src/main/assets/where_did_the_cat_go.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
https://www.reddit.com/r/discordapp/comments/dlkvza/theres_a_cute_catdog_image_hidden_inside_the/
 | 
			
		||||
							
								
								
									
										7
									
								
								app/src/main/java/a0/a/a/a.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
package a0.a.a;
 | 
			
		||||
public /* synthetic */ class a {
 | 
			
		||||
    public static /* synthetic */ int a(double d) {
 | 
			
		||||
        long doubleToLongBits = Double.doubleToLongBits(d);
 | 
			
		||||
        return (int) (doubleToLongBits ^ (doubleToLongBits >>> 32));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										6
									
								
								app/src/main/java/a0/a/a/b.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
package a0.a.a;
 | 
			
		||||
public /* synthetic */ class b {
 | 
			
		||||
    public static /* synthetic */ int a(long j) {
 | 
			
		||||
        return (int) (j ^ (j >>> 32));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
package android.support.v4.app;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.RestrictTo;
 | 
			
		||||
import androidx.core.app.RemoteActionCompat;
 | 
			
		||||
import androidx.versionedparcelable.VersionedParcel;
 | 
			
		||||
@RestrictTo({RestrictTo.Scope.LIBRARY})
 | 
			
		||||
public final class RemoteActionCompatParcelizer extends androidx.core.app.RemoteActionCompatParcelizer {
 | 
			
		||||
    public static RemoteActionCompat read(VersionedParcel versionedParcel) {
 | 
			
		||||
        return androidx.core.app.RemoteActionCompatParcelizer.read(versionedParcel);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void write(RemoteActionCompat remoteActionCompat, VersionedParcel versionedParcel) {
 | 
			
		||||
        androidx.core.app.RemoteActionCompatParcelizer.write(remoteActionCompat, versionedParcel);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
package android.support.v4.graphics.drawable;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.RestrictTo;
 | 
			
		||||
import androidx.core.graphics.drawable.IconCompat;
 | 
			
		||||
import androidx.versionedparcelable.VersionedParcel;
 | 
			
		||||
@RestrictTo({RestrictTo.Scope.LIBRARY})
 | 
			
		||||
public final class IconCompatParcelizer extends androidx.core.graphics.drawable.IconCompatParcelizer {
 | 
			
		||||
    public static IconCompat read(VersionedParcel versionedParcel) {
 | 
			
		||||
        return androidx.core.graphics.drawable.IconCompatParcelizer.read(versionedParcel);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void write(IconCompat iconCompat, VersionedParcel versionedParcel) {
 | 
			
		||||
        androidx.core.graphics.drawable.IconCompatParcelizer.write(iconCompat, versionedParcel);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
package android.support.v4.media;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.RestrictTo;
 | 
			
		||||
import androidx.media.AudioAttributesCompat;
 | 
			
		||||
import androidx.versionedparcelable.VersionedParcel;
 | 
			
		||||
@RestrictTo({RestrictTo.Scope.LIBRARY})
 | 
			
		||||
public final class AudioAttributesCompatParcelizer extends androidx.media.AudioAttributesCompatParcelizer {
 | 
			
		||||
    public static AudioAttributesCompat read(VersionedParcel versionedParcel) {
 | 
			
		||||
        return androidx.media.AudioAttributesCompatParcelizer.read(versionedParcel);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void write(AudioAttributesCompat audioAttributesCompat, VersionedParcel versionedParcel) {
 | 
			
		||||
        androidx.media.AudioAttributesCompatParcelizer.write(audioAttributesCompat, versionedParcel);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
package android.support.v4.media;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.RestrictTo;
 | 
			
		||||
import androidx.media.AudioAttributesImplApi21;
 | 
			
		||||
import androidx.versionedparcelable.VersionedParcel;
 | 
			
		||||
@RestrictTo({RestrictTo.Scope.LIBRARY})
 | 
			
		||||
public final class AudioAttributesImplApi21Parcelizer extends androidx.media.AudioAttributesImplApi21Parcelizer {
 | 
			
		||||
    public static AudioAttributesImplApi21 read(VersionedParcel versionedParcel) {
 | 
			
		||||
        return androidx.media.AudioAttributesImplApi21Parcelizer.read(versionedParcel);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void write(AudioAttributesImplApi21 audioAttributesImplApi21, VersionedParcel versionedParcel) {
 | 
			
		||||
        androidx.media.AudioAttributesImplApi21Parcelizer.write(audioAttributesImplApi21, versionedParcel);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
package android.support.v4.media;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.RestrictTo;
 | 
			
		||||
import androidx.media.AudioAttributesImplApi26;
 | 
			
		||||
import androidx.versionedparcelable.VersionedParcel;
 | 
			
		||||
@RestrictTo({RestrictTo.Scope.LIBRARY})
 | 
			
		||||
public final class AudioAttributesImplApi26Parcelizer extends androidx.media.AudioAttributesImplApi26Parcelizer {
 | 
			
		||||
    public static AudioAttributesImplApi26 read(VersionedParcel versionedParcel) {
 | 
			
		||||
        return androidx.media.AudioAttributesImplApi26Parcelizer.read(versionedParcel);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void write(AudioAttributesImplApi26 audioAttributesImplApi26, VersionedParcel versionedParcel) {
 | 
			
		||||
        androidx.media.AudioAttributesImplApi26Parcelizer.write(audioAttributesImplApi26, versionedParcel);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
package android.support.v4.media;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.RestrictTo;
 | 
			
		||||
import androidx.media.AudioAttributesImplBase;
 | 
			
		||||
import androidx.versionedparcelable.VersionedParcel;
 | 
			
		||||
@RestrictTo({RestrictTo.Scope.LIBRARY})
 | 
			
		||||
public final class AudioAttributesImplBaseParcelizer extends androidx.media.AudioAttributesImplBaseParcelizer {
 | 
			
		||||
    public static AudioAttributesImplBase read(VersionedParcel versionedParcel) {
 | 
			
		||||
        return androidx.media.AudioAttributesImplBaseParcelizer.read(versionedParcel);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void write(AudioAttributesImplBase audioAttributesImplBase, VersionedParcel versionedParcel) {
 | 
			
		||||
        androidx.media.AudioAttributesImplBaseParcelizer.write(audioAttributesImplBase, versionedParcel);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,458 @@
 | 
			
		|||
package android.support.v4.media;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.content.ComponentName;
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.media.browse.MediaBrowser;
 | 
			
		||||
import android.os.BadParcelableException;
 | 
			
		||||
import android.os.Binder;
 | 
			
		||||
import android.os.Build;
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.os.Handler;
 | 
			
		||||
import android.os.IBinder;
 | 
			
		||||
import android.os.Message;
 | 
			
		||||
import android.os.Messenger;
 | 
			
		||||
import android.os.Parcel;
 | 
			
		||||
import android.os.Parcelable;
 | 
			
		||||
import android.os.Process;
 | 
			
		||||
import android.os.RemoteException;
 | 
			
		||||
import android.support.v4.media.session.MediaSessionCompat;
 | 
			
		||||
import android.support.v4.os.ResultReceiver;
 | 
			
		||||
import android.text.TextUtils;
 | 
			
		||||
import android.util.Log;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.annotation.RequiresApi;
 | 
			
		||||
import androidx.collection.ArrayMap;
 | 
			
		||||
import androidx.core.app.BundleCompat;
 | 
			
		||||
import androidx.media.MediaBrowserCompatUtils;
 | 
			
		||||
import java.lang.ref.WeakReference;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
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;
 | 
			
		||||
 | 
			
		||||
    public static class CustomActionResultReceiver extends ResultReceiver {
 | 
			
		||||
        @Override // android.support.v4.os.ResultReceiver
 | 
			
		||||
        public void a(int i, Bundle bundle) {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class ItemReceiver extends ResultReceiver {
 | 
			
		||||
        @Override // android.support.v4.os.ResultReceiver
 | 
			
		||||
        public void a(int i, Bundle bundle) {
 | 
			
		||||
            if (bundle != null) {
 | 
			
		||||
                bundle = MediaSessionCompat.b(bundle);
 | 
			
		||||
            }
 | 
			
		||||
            if (i != 0 || bundle == null || !bundle.containsKey("media_item")) {
 | 
			
		||||
                throw null;
 | 
			
		||||
            }
 | 
			
		||||
            Parcelable parcelable = bundle.getParcelable("media_item");
 | 
			
		||||
            if (parcelable == null || (parcelable instanceof MediaItem)) {
 | 
			
		||||
                MediaItem mediaItem = (MediaItem) parcelable;
 | 
			
		||||
                throw null;
 | 
			
		||||
            }
 | 
			
		||||
            throw null;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @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 class a implements Parcelable.Creator<MediaItem> {
 | 
			
		||||
            /* Return type fixed from 'java.lang.Object' to match base method */
 | 
			
		||||
            @Override // android.os.Parcelable.Creator
 | 
			
		||||
            public MediaItem createFromParcel(Parcel parcel) {
 | 
			
		||||
                return new MediaItem(parcel);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            /* Return type fixed from 'java.lang.Object[]' to match base method */
 | 
			
		||||
            @Override // android.os.Parcelable.Creator
 | 
			
		||||
            public MediaItem[] newArray(int i) {
 | 
			
		||||
                return new MediaItem[i];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public MediaItem(Parcel parcel) {
 | 
			
		||||
            this.i = parcel.readInt();
 | 
			
		||||
            this.j = 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 {
 | 
			
		||||
                throw new IllegalArgumentException("description must have a non-empty media id");
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static List<MediaItem> a(List<?> list) {
 | 
			
		||||
            MediaItem mediaItem;
 | 
			
		||||
            if (list == null) {
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
            ArrayList arrayList = new ArrayList(list.size());
 | 
			
		||||
            for (Object obj : list) {
 | 
			
		||||
                if (obj != null) {
 | 
			
		||||
                    MediaBrowser.MediaItem mediaItem2 = (MediaBrowser.MediaItem) obj;
 | 
			
		||||
                    mediaItem = new MediaItem(MediaDescriptionCompat.a(mediaItem2.getDescription()), mediaItem2.getFlags());
 | 
			
		||||
                } else {
 | 
			
		||||
                    mediaItem = null;
 | 
			
		||||
                }
 | 
			
		||||
                arrayList.add(mediaItem);
 | 
			
		||||
            }
 | 
			
		||||
            return arrayList;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.Parcelable
 | 
			
		||||
        public int describeContents() {
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // java.lang.Object
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public String toString() {
 | 
			
		||||
            return "MediaItem{mFlags=" + this.i + ", mDescription=" + this.j + '}';
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.Parcelable
 | 
			
		||||
        public void writeToParcel(Parcel parcel, int i) {
 | 
			
		||||
            parcel.writeInt(this.i);
 | 
			
		||||
            this.j.writeToParcel(parcel, i);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class SearchResultReceiver extends ResultReceiver {
 | 
			
		||||
        @Override // android.support.v4.os.ResultReceiver
 | 
			
		||||
        public void a(int i, Bundle bundle) {
 | 
			
		||||
            if (bundle != null) {
 | 
			
		||||
                bundle = MediaSessionCompat.b(bundle);
 | 
			
		||||
            }
 | 
			
		||||
            if (i != 0 || bundle == null || !bundle.containsKey("search_results")) {
 | 
			
		||||
                throw null;
 | 
			
		||||
            }
 | 
			
		||||
            Parcelable[] parcelableArray = bundle.getParcelableArray("search_results");
 | 
			
		||||
            Objects.requireNonNull(parcelableArray);
 | 
			
		||||
            ArrayList arrayList = new ArrayList();
 | 
			
		||||
            for (Parcelable parcelable : parcelableArray) {
 | 
			
		||||
                arrayList.add((MediaItem) parcelable);
 | 
			
		||||
            }
 | 
			
		||||
            throw null;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class a extends Handler {
 | 
			
		||||
        public final WeakReference<g> a;
 | 
			
		||||
        public WeakReference<Messenger> b;
 | 
			
		||||
 | 
			
		||||
        public a(g gVar) {
 | 
			
		||||
            this.a = new WeakReference<>(gVar);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void a(Messenger messenger) {
 | 
			
		||||
            this.b = new WeakReference<>(messenger);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.Handler
 | 
			
		||||
        public void handleMessage(@NonNull Message message) {
 | 
			
		||||
            WeakReference<Messenger> weakReference = this.b;
 | 
			
		||||
            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();
 | 
			
		||||
                try {
 | 
			
		||||
                    int i = message.what;
 | 
			
		||||
                    if (i == 1) {
 | 
			
		||||
                        Bundle bundle = data.getBundle("data_root_hints");
 | 
			
		||||
                        MediaSessionCompat.a(bundle);
 | 
			
		||||
                        gVar.a(messenger, data.getString("data_media_item_id"), (MediaSessionCompat.Token) data.getParcelable("data_media_session_token"), bundle);
 | 
			
		||||
                    } else if (i == 2) {
 | 
			
		||||
                        gVar.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");
 | 
			
		||||
                        MediaSessionCompat.a(bundle2);
 | 
			
		||||
                        Bundle bundle3 = data.getBundle("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);
 | 
			
		||||
                    }
 | 
			
		||||
                } catch (BadParcelableException unused) {
 | 
			
		||||
                    Log.e("MediaBrowserCompat", "Could not unparcel the data.");
 | 
			
		||||
                    if (message.what == 1) {
 | 
			
		||||
                        gVar.c(messenger);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class b {
 | 
			
		||||
        public final MediaBrowser.ConnectionCallback mConnectionCallbackFwk = new a();
 | 
			
		||||
        public AbstractC0000b mConnectionCallbackInternal;
 | 
			
		||||
 | 
			
		||||
        @RequiresApi(21)
 | 
			
		||||
        public class a extends MediaBrowser.ConnectionCallback {
 | 
			
		||||
            public a() {
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            @Override // android.media.browse.MediaBrowser.ConnectionCallback
 | 
			
		||||
            public void onConnected() {
 | 
			
		||||
                AbstractC0000b bVar = b.this.mConnectionCallbackInternal;
 | 
			
		||||
                if (bVar != null) {
 | 
			
		||||
                    d dVar = (d) bVar;
 | 
			
		||||
                    Objects.requireNonNull(dVar);
 | 
			
		||||
                    try {
 | 
			
		||||
                        Bundle extras = dVar.b.getExtras();
 | 
			
		||||
                        if (extras != null) {
 | 
			
		||||
                            extras.getInt("extra_service_version", 0);
 | 
			
		||||
                            IBinder binder = BundleCompat.getBinder(extras, "extra_messenger");
 | 
			
		||||
                            if (binder != null) {
 | 
			
		||||
                                dVar.f = new h(binder, dVar.f10c);
 | 
			
		||||
                                Messenger messenger = new Messenger(dVar.d);
 | 
			
		||||
                                dVar.g = messenger;
 | 
			
		||||
                                dVar.d.a(messenger);
 | 
			
		||||
                                try {
 | 
			
		||||
                                    h hVar = dVar.f;
 | 
			
		||||
                                    Context context = dVar.a;
 | 
			
		||||
                                    Messenger messenger2 = dVar.g;
 | 
			
		||||
                                    Objects.requireNonNull(hVar);
 | 
			
		||||
                                    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);
 | 
			
		||||
                                } 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);
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    } catch (IllegalStateException e2) {
 | 
			
		||||
                        Log.e("MediaBrowserCompat", "Unexpected IllegalStateException", e2);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                b.this.onConnected();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            @Override // android.media.browse.MediaBrowser.ConnectionCallback
 | 
			
		||||
            public void onConnectionFailed() {
 | 
			
		||||
                AbstractC0000b bVar = b.this.mConnectionCallbackInternal;
 | 
			
		||||
                if (bVar != null) {
 | 
			
		||||
                    Objects.requireNonNull((d) bVar);
 | 
			
		||||
                }
 | 
			
		||||
                b.this.onConnectionFailed();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            @Override // android.media.browse.MediaBrowser.ConnectionCallback
 | 
			
		||||
            public void onConnectionSuspended() {
 | 
			
		||||
                AbstractC0000b bVar = b.this.mConnectionCallbackInternal;
 | 
			
		||||
                if (bVar != null) {
 | 
			
		||||
                    d dVar = (d) bVar;
 | 
			
		||||
                    dVar.f = null;
 | 
			
		||||
                    dVar.g = null;
 | 
			
		||||
                    dVar.h = null;
 | 
			
		||||
                    dVar.d.a(null);
 | 
			
		||||
                }
 | 
			
		||||
                b.this.onConnectionSuspended();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* renamed from: android.support.v4.media.MediaBrowserCompat$b$b  reason: collision with other inner class name */
 | 
			
		||||
        public interface AbstractC0000b {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void onConnected() {
 | 
			
		||||
            throw null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void onConnectionFailed() {
 | 
			
		||||
            throw null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void onConnectionSuspended() {
 | 
			
		||||
            throw null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void setInternalConnectionCallback(AbstractC0000b bVar) {
 | 
			
		||||
            this.mConnectionCallbackInternal = bVar;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public interface c {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @RequiresApi(21)
 | 
			
		||||
    public static class d implements c, g, b.AbstractC0000b {
 | 
			
		||||
        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;
 | 
			
		||||
        public Messenger g;
 | 
			
		||||
        public MediaSessionCompat.Token h;
 | 
			
		||||
 | 
			
		||||
        public d(Context context, ComponentName componentName, b bVar, 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);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.support.v4.media.MediaBrowserCompat.g
 | 
			
		||||
        public void a(Messenger messenger, String str, MediaSessionCompat.Token token, Bundle bundle) {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.support.v4.media.MediaBrowserCompat.g
 | 
			
		||||
        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);
 | 
			
		||||
                } else if (MediaBrowserCompat.a) {
 | 
			
		||||
                    Log.d("MediaBrowserCompat", "onLoadChildren for id that isn't subscribed id=" + str);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.support.v4.media.MediaBrowserCompat.g
 | 
			
		||||
        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);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @RequiresApi(26)
 | 
			
		||||
    public static class f extends e {
 | 
			
		||||
        public f(Context context, ComponentName componentName, b bVar, Bundle bundle) {
 | 
			
		||||
            super(context, componentName, bVar, bundle);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public interface g {
 | 
			
		||||
        void a(Messenger messenger, String str, MediaSessionCompat.Token token, Bundle bundle);
 | 
			
		||||
 | 
			
		||||
        void b(Messenger messenger, String str, List<MediaItem> list, Bundle bundle, Bundle bundle2);
 | 
			
		||||
 | 
			
		||||
        void c(Messenger messenger);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class h {
 | 
			
		||||
        public Messenger a;
 | 
			
		||||
        public Bundle b;
 | 
			
		||||
 | 
			
		||||
        public h(IBinder iBinder, Bundle bundle) {
 | 
			
		||||
            this.a = new Messenger(iBinder);
 | 
			
		||||
            this.b = bundle;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public final void a(int i, Bundle bundle, Messenger messenger) throws RemoteException {
 | 
			
		||||
            Message obtain = Message.obtain();
 | 
			
		||||
            obtain.what = i;
 | 
			
		||||
            obtain.arg1 = 1;
 | 
			
		||||
            obtain.setData(bundle);
 | 
			
		||||
            obtain.replyTo = messenger;
 | 
			
		||||
            this.a.send(obtain);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class i {
 | 
			
		||||
        public final List<j> a = new ArrayList();
 | 
			
		||||
        public final List<Bundle> b = new ArrayList();
 | 
			
		||||
 | 
			
		||||
        public j a(Bundle bundle) {
 | 
			
		||||
            for (int i = 0; i < this.b.size(); i++) {
 | 
			
		||||
                if (MediaBrowserCompatUtils.areSameOptions(this.b.get(i), bundle)) {
 | 
			
		||||
                    return this.a.get(i);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static abstract class j {
 | 
			
		||||
        public final IBinder a = new Binder();
 | 
			
		||||
 | 
			
		||||
        @RequiresApi(21)
 | 
			
		||||
        public class a extends MediaBrowser.SubscriptionCallback {
 | 
			
		||||
            public a() {
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            @Override // android.media.browse.MediaBrowser.SubscriptionCallback
 | 
			
		||||
            public void onChildrenLoaded(@NonNull String str, List<MediaBrowser.MediaItem> list) {
 | 
			
		||||
                Objects.requireNonNull(j.this);
 | 
			
		||||
                j jVar = j.this;
 | 
			
		||||
                MediaItem.a(list);
 | 
			
		||||
                Objects.requireNonNull(jVar);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            @Override // android.media.browse.MediaBrowser.SubscriptionCallback
 | 
			
		||||
            public void onError(@NonNull String str) {
 | 
			
		||||
                Objects.requireNonNull(j.this);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @RequiresApi(26)
 | 
			
		||||
        public class b extends a {
 | 
			
		||||
            public b() {
 | 
			
		||||
                super();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            @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;
 | 
			
		||||
                MediaItem.a(list);
 | 
			
		||||
                Objects.requireNonNull(jVar);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            @Override // android.media.browse.MediaBrowser.SubscriptionCallback
 | 
			
		||||
            public void onError(@NonNull String str, @NonNull Bundle bundle) {
 | 
			
		||||
                MediaSessionCompat.a(bundle);
 | 
			
		||||
                Objects.requireNonNull(j.this);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public j() {
 | 
			
		||||
            if (Build.VERSION.SDK_INT >= 26) {
 | 
			
		||||
                new b();
 | 
			
		||||
            } else {
 | 
			
		||||
                new a();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public MediaBrowserCompat(Context context, ComponentName componentName, b bVar, Bundle bundle) {
 | 
			
		||||
        int i2 = Build.VERSION.SDK_INT;
 | 
			
		||||
        if (i2 >= 26) {
 | 
			
		||||
            this.b = new f(context, componentName, bVar, null);
 | 
			
		||||
        } else if (i2 >= 23) {
 | 
			
		||||
            this.b = new e(context, componentName, bVar, null);
 | 
			
		||||
        } else {
 | 
			
		||||
            this.b = new d(context, componentName, bVar, null);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,134 @@
 | 
			
		|||
package android.support.v4.media;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.graphics.Bitmap;
 | 
			
		||||
import android.media.MediaDescription;
 | 
			
		||||
import android.net.Uri;
 | 
			
		||||
import android.os.Build;
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.os.Parcel;
 | 
			
		||||
import android.os.Parcelable;
 | 
			
		||||
import android.support.v4.media.session.MediaSessionCompat;
 | 
			
		||||
@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 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 class a implements Parcelable.Creator<MediaDescriptionCompat> {
 | 
			
		||||
        /* Return type fixed from 'java.lang.Object' to match base method */
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public MediaDescriptionCompat createFromParcel(Parcel parcel) {
 | 
			
		||||
            return MediaDescriptionCompat.a(MediaDescription.CREATOR.createFromParcel(parcel));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* Return type fixed from 'java.lang.Object[]' to match base method */
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public MediaDescriptionCompat[] newArray(int i) {
 | 
			
		||||
            return new MediaDescriptionCompat[i];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* JADX WARNING: Removed duplicated region for block: B:18:0x0052  */
 | 
			
		||||
    public static MediaDescriptionCompat a(Object obj) {
 | 
			
		||||
        Bundle bundle;
 | 
			
		||||
        Uri uri = null;
 | 
			
		||||
        if (obj == null) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        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);
 | 
			
		||||
        }
 | 
			
		||||
        Uri uri2 = extras != null ? (Uri) extras.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");
 | 
			
		||||
            } else {
 | 
			
		||||
                bundle = null;
 | 
			
		||||
                if (uri2 == null) {
 | 
			
		||||
                    if (i >= 23) {
 | 
			
		||||
                        uri = mediaDescription.getMediaUri();
 | 
			
		||||
                    }
 | 
			
		||||
                    uri2 = uri;
 | 
			
		||||
                }
 | 
			
		||||
                MediaDescriptionCompat mediaDescriptionCompat = new MediaDescriptionCompat(mediaId, title, subtitle, description, iconBitmap, iconUri, bundle, uri2);
 | 
			
		||||
                mediaDescriptionCompat.q = mediaDescription;
 | 
			
		||||
                return mediaDescriptionCompat;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        bundle = extras;
 | 
			
		||||
        if (uri2 == null) {
 | 
			
		||||
        }
 | 
			
		||||
        MediaDescriptionCompat mediaDescriptionCompat = new MediaDescriptionCompat(mediaId, title, subtitle, description, iconBitmap, iconUri, bundle, uri2);
 | 
			
		||||
        mediaDescriptionCompat.q = mediaDescription;
 | 
			
		||||
        return mediaDescriptionCompat;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public int describeContents() {
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // java.lang.Object
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        return ((Object) this.j) + ", " + ((Object) this.k) + ", " + ((Object) this.l);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public void writeToParcel(Parcel parcel, int i) {
 | 
			
		||||
        int i2 = Build.VERSION.SDK_INT;
 | 
			
		||||
        MediaDescription mediaDescription = this.q;
 | 
			
		||||
        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) {
 | 
			
		||||
                    bundle = new Bundle();
 | 
			
		||||
                    bundle.putBoolean("android.support.v4.media.description.NULL_BUNDLE_FLAG", true);
 | 
			
		||||
                }
 | 
			
		||||
                bundle.putParcelable("android.support.v4.media.description.MEDIA_URI", this.p);
 | 
			
		||||
            }
 | 
			
		||||
            builder.setExtras(bundle);
 | 
			
		||||
            if (i2 >= 23) {
 | 
			
		||||
                builder.setMediaUri(this.p);
 | 
			
		||||
            }
 | 
			
		||||
            mediaDescription = builder.build();
 | 
			
		||||
            this.q = mediaDescription;
 | 
			
		||||
        }
 | 
			
		||||
        mediaDescription.writeToParcel(parcel, i);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,78 @@
 | 
			
		|||
package android.support.v4.media;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.os.Parcel;
 | 
			
		||||
import android.os.Parcelable;
 | 
			
		||||
import android.support.v4.media.session.MediaSessionCompat;
 | 
			
		||||
import androidx.collection.ArrayMap;
 | 
			
		||||
@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 class a implements Parcelable.Creator<MediaMetadataCompat> {
 | 
			
		||||
        /* Return type fixed from 'java.lang.Object' to match base method */
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public MediaMetadataCompat createFromParcel(Parcel parcel) {
 | 
			
		||||
            return new MediaMetadataCompat(parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* Return type fixed from 'java.lang.Object[]' to match base method */
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public MediaMetadataCompat[] newArray(int i) {
 | 
			
		||||
            return new MediaMetadataCompat[i];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static {
 | 
			
		||||
        ArrayMap<String, Integer> arrayMap = new ArrayMap<>();
 | 
			
		||||
        i = arrayMap;
 | 
			
		||||
        arrayMap.put("android.media.metadata.TITLE", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.ARTIST", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.DURATION", 0);
 | 
			
		||||
        arrayMap.put("android.media.metadata.ALBUM", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.AUTHOR", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.WRITER", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.COMPOSER", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.COMPILATION", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.DATE", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.YEAR", 0);
 | 
			
		||||
        arrayMap.put("android.media.metadata.GENRE", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.TRACK_NUMBER", 0);
 | 
			
		||||
        arrayMap.put("android.media.metadata.NUM_TRACKS", 0);
 | 
			
		||||
        arrayMap.put("android.media.metadata.DISC_NUMBER", 0);
 | 
			
		||||
        arrayMap.put("android.media.metadata.ALBUM_ARTIST", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.ART", 2);
 | 
			
		||||
        arrayMap.put("android.media.metadata.ART_URI", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.ALBUM_ART", 2);
 | 
			
		||||
        arrayMap.put("android.media.metadata.ALBUM_ART_URI", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.USER_RATING", 3);
 | 
			
		||||
        arrayMap.put("android.media.metadata.RATING", 3);
 | 
			
		||||
        arrayMap.put("android.media.metadata.DISPLAY_TITLE", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.DISPLAY_SUBTITLE", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.DISPLAY_DESCRIPTION", 1);
 | 
			
		||||
        arrayMap.put("android.media.metadata.DISPLAY_ICON", 2);
 | 
			
		||||
        arrayMap.put("android.media.metadata.DISPLAY_ICON_URI", 1);
 | 
			
		||||
        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("android.media.metadata.DOWNLOAD_STATUS", 0);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public MediaMetadataCompat(Parcel parcel) {
 | 
			
		||||
        this.j = parcel.readBundle(MediaSessionCompat.class.getClassLoader());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public int describeContents() {
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public void writeToParcel(Parcel parcel, int i2) {
 | 
			
		||||
        parcel.writeBundle(this.j);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										51
									
								
								app/src/main/java/android/support/v4/media/RatingCompat.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,51 @@
 | 
			
		|||
package android.support.v4.media;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.os.Parcel;
 | 
			
		||||
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 class a implements Parcelable.Creator<RatingCompat> {
 | 
			
		||||
        /* Return type fixed from 'java.lang.Object' to match base method */
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public RatingCompat createFromParcel(Parcel parcel) {
 | 
			
		||||
            return new RatingCompat(parcel.readInt(), parcel.readFloat());
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* Return type fixed from 'java.lang.Object[]' to match base method */
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public RatingCompat[] newArray(int i) {
 | 
			
		||||
            return new RatingCompat[i];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public RatingCompat(int i, float f) {
 | 
			
		||||
        this.i = i;
 | 
			
		||||
        this.j = f;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public int describeContents() {
 | 
			
		||||
        return this.i;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @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();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public void writeToParcel(Parcel parcel, int i) {
 | 
			
		||||
        parcel.writeInt(this.i);
 | 
			
		||||
        parcel.writeFloat(this.j);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,124 @@
 | 
			
		|||
package android.support.v4.media.session;
 | 
			
		||||
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.media.session.MediaController;
 | 
			
		||||
import android.media.session.MediaSession;
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.os.RemoteException;
 | 
			
		||||
import android.os.ResultReceiver;
 | 
			
		||||
import android.support.v4.media.MediaMetadataCompat;
 | 
			
		||||
import android.support.v4.media.session.MediaSessionCompat;
 | 
			
		||||
import android.util.Log;
 | 
			
		||||
import androidx.annotation.GuardedBy;
 | 
			
		||||
import androidx.annotation.RequiresApi;
 | 
			
		||||
import androidx.core.app.BundleCompat;
 | 
			
		||||
import androidx.versionedparcelable.ParcelUtils;
 | 
			
		||||
import androidx.versionedparcelable.VersionedParcelable;
 | 
			
		||||
import java.lang.ref.WeakReference;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import x.a.b.b.a.b;
 | 
			
		||||
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();
 | 
			
		||||
    public HashMap<c, a> d = new HashMap<>();
 | 
			
		||||
    public final MediaSessionCompat.Token e;
 | 
			
		||||
 | 
			
		||||
    public static class ExtraBinderRequestResultReceiver extends ResultReceiver {
 | 
			
		||||
        public WeakReference<MediaControllerCompat$MediaControllerImplApi21> i;
 | 
			
		||||
 | 
			
		||||
        public ExtraBinderRequestResultReceiver(MediaControllerCompat$MediaControllerImplApi21 mediaControllerCompat$MediaControllerImplApi21) {
 | 
			
		||||
            super(null);
 | 
			
		||||
            this.i = new WeakReference<>(mediaControllerCompat$MediaControllerImplApi21);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.ResultReceiver
 | 
			
		||||
        public void onReceiveResult(int i, Bundle bundle) {
 | 
			
		||||
            MediaControllerCompat$MediaControllerImplApi21 mediaControllerCompat$MediaControllerImplApi21 = this.i.get();
 | 
			
		||||
            if (mediaControllerCompat$MediaControllerImplApi21 != null && bundle != null) {
 | 
			
		||||
                synchronized (mediaControllerCompat$MediaControllerImplApi21.b) {
 | 
			
		||||
                    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;
 | 
			
		||||
                    }
 | 
			
		||||
                    MediaSessionCompat.Token token2 = mediaControllerCompat$MediaControllerImplApi21.e;
 | 
			
		||||
                    VersionedParcelable versionedParcelable = ParcelUtils.getVersionedParcelable(bundle, "android.support.v4.media.session.SESSION_TOKEN2");
 | 
			
		||||
                    synchronized (token2.i) {
 | 
			
		||||
                        token2.l = versionedParcelable;
 | 
			
		||||
                    }
 | 
			
		||||
                    mediaControllerCompat$MediaControllerImplApi21.a();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class a extends c.b {
 | 
			
		||||
        public a(c cVar) {
 | 
			
		||||
            super(cVar);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // x.a.b.b.a.c.b, x.a.b.b.a.a
 | 
			
		||||
        public void T(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 {
 | 
			
		||||
            throw new AssertionError();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // x.a.b.b.a.c.b, x.a.b.b.a.a
 | 
			
		||||
        public void V(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 {
 | 
			
		||||
            throw new AssertionError();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // x.a.b.b.a.c.b, x.a.b.b.a.a
 | 
			
		||||
        public void x0(ParcelableVolumeInfo parcelableVolumeInfo) 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 {
 | 
			
		||||
            throw new AssertionError();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public MediaControllerCompat$MediaControllerImplApi21(Context context, MediaSessionCompat.Token token) {
 | 
			
		||||
        this.e = token;
 | 
			
		||||
        MediaController mediaController = new MediaController(context, (MediaSession.Token) token.j);
 | 
			
		||||
        this.a = mediaController;
 | 
			
		||||
        if (token.b() == null) {
 | 
			
		||||
            mediaController.sendCommand("android.support.v4.media.session.command.GET_EXTRA_BINDER", null, new ExtraBinderRequestResultReceiver(this));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @GuardedBy("mLock")
 | 
			
		||||
    public void a() {
 | 
			
		||||
        if (this.e.b() != null) {
 | 
			
		||||
            for (c cVar : this.f11c) {
 | 
			
		||||
                a aVar = new a(cVar);
 | 
			
		||||
                this.d.put(cVar, aVar);
 | 
			
		||||
                cVar.a = aVar;
 | 
			
		||||
                try {
 | 
			
		||||
                    this.e.b().j(aVar);
 | 
			
		||||
                } catch (RemoteException e) {
 | 
			
		||||
                    Log.e("MediaControllerCompat", "Dead object in registerCallback.", e);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            this.f11c.clear();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,222 @@
 | 
			
		|||
package android.support.v4.media.session;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.media.session.MediaSession;
 | 
			
		||||
import android.os.BadParcelableException;
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.os.Parcel;
 | 
			
		||||
import android.os.Parcelable;
 | 
			
		||||
import android.os.ResultReceiver;
 | 
			
		||||
import android.support.v4.media.MediaDescriptionCompat;
 | 
			
		||||
import android.util.Log;
 | 
			
		||||
import androidx.annotation.GuardedBy;
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
import androidx.annotation.RestrictTo;
 | 
			
		||||
import androidx.versionedparcelable.VersionedParcelable;
 | 
			
		||||
import x.a.b.b.a.b;
 | 
			
		||||
public class MediaSessionCompat {
 | 
			
		||||
 | 
			
		||||
    @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 class a implements Parcelable.Creator<QueueItem> {
 | 
			
		||||
            /* Return type fixed from 'java.lang.Object' to match base method */
 | 
			
		||||
            @Override // android.os.Parcelable.Creator
 | 
			
		||||
            public QueueItem createFromParcel(Parcel parcel) {
 | 
			
		||||
                return new QueueItem(parcel);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            /* Return type fixed from 'java.lang.Object[]' to match base method */
 | 
			
		||||
            @Override // android.os.Parcelable.Creator
 | 
			
		||||
            public QueueItem[] newArray(int i) {
 | 
			
		||||
                return new QueueItem[i];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        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;
 | 
			
		||||
            } else {
 | 
			
		||||
                throw new IllegalArgumentException("Id cannot be QueueItem.UNKNOWN_ID");
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public QueueItem(Parcel parcel) {
 | 
			
		||||
            this.i = MediaDescriptionCompat.CREATOR.createFromParcel(parcel);
 | 
			
		||||
            this.j = parcel.readLong();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.Parcelable
 | 
			
		||||
        public int describeContents() {
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @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, " }");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.Parcelable
 | 
			
		||||
        public void writeToParcel(Parcel parcel, int i) {
 | 
			
		||||
            this.i.writeToParcel(parcel, i);
 | 
			
		||||
            parcel.writeLong(this.j);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressLint({"BanParcelableUsage"})
 | 
			
		||||
    public static final class ResultReceiverWrapper implements Parcelable {
 | 
			
		||||
        public static final Parcelable.Creator<ResultReceiverWrapper> CREATOR = new a();
 | 
			
		||||
        public ResultReceiver i;
 | 
			
		||||
 | 
			
		||||
        public class a implements Parcelable.Creator<ResultReceiverWrapper> {
 | 
			
		||||
            /* Return type fixed from 'java.lang.Object' to match base method */
 | 
			
		||||
            @Override // android.os.Parcelable.Creator
 | 
			
		||||
            public ResultReceiverWrapper createFromParcel(Parcel parcel) {
 | 
			
		||||
                return new ResultReceiverWrapper(parcel);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            /* Return type fixed from 'java.lang.Object[]' to match base method */
 | 
			
		||||
            @Override // android.os.Parcelable.Creator
 | 
			
		||||
            public ResultReceiverWrapper[] newArray(int i) {
 | 
			
		||||
                return new ResultReceiverWrapper[i];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public ResultReceiverWrapper(Parcel parcel) {
 | 
			
		||||
            this.i = (ResultReceiver) ResultReceiver.CREATOR.createFromParcel(parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.Parcelable
 | 
			
		||||
        public int describeContents() {
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.Parcelable
 | 
			
		||||
        public void writeToParcel(Parcel parcel, int i) {
 | 
			
		||||
            this.i.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;
 | 
			
		||||
        @GuardedBy("mLock")
 | 
			
		||||
        public b k;
 | 
			
		||||
        @GuardedBy("mLock")
 | 
			
		||||
        public VersionedParcelable l;
 | 
			
		||||
 | 
			
		||||
        public class a implements Parcelable.Creator<Token> {
 | 
			
		||||
            /* Return type fixed from 'java.lang.Object' to match base method */
 | 
			
		||||
            @Override // android.os.Parcelable.Creator
 | 
			
		||||
            public Token createFromParcel(Parcel parcel) {
 | 
			
		||||
                return new Token(parcel.readParcelable(null));
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            /* Return type fixed from 'java.lang.Object[]' to match base method */
 | 
			
		||||
            @Override // android.os.Parcelable.Creator
 | 
			
		||||
            public Token[] newArray(int i) {
 | 
			
		||||
                return new Token[i];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Token(Object obj) {
 | 
			
		||||
            this.j = obj;
 | 
			
		||||
            this.k = null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Token(Object obj, b bVar) {
 | 
			
		||||
            this.j = obj;
 | 
			
		||||
            this.k = bVar;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @RestrictTo({RestrictTo.Scope.LIBRARY})
 | 
			
		||||
        public static Token a(Object obj, b bVar) {
 | 
			
		||||
            if (obj == null) {
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
            if (obj instanceof MediaSession.Token) {
 | 
			
		||||
                return new Token(obj, bVar);
 | 
			
		||||
            }
 | 
			
		||||
            throw new IllegalArgumentException("token is not a valid MediaSession.Token object");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @RestrictTo({RestrictTo.Scope.LIBRARY})
 | 
			
		||||
        public b b() {
 | 
			
		||||
            b bVar;
 | 
			
		||||
            synchronized (this.i) {
 | 
			
		||||
                bVar = this.k;
 | 
			
		||||
            }
 | 
			
		||||
            return bVar;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.Parcelable
 | 
			
		||||
        public int describeContents() {
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // java.lang.Object
 | 
			
		||||
        public boolean equals(Object obj) {
 | 
			
		||||
            if (this == obj) {
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
            if (!(obj instanceof Token)) {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
            Token token = (Token) obj;
 | 
			
		||||
            Object obj2 = this.j;
 | 
			
		||||
            if (obj2 == null) {
 | 
			
		||||
                return token.j == null;
 | 
			
		||||
            }
 | 
			
		||||
            Object obj3 = token.j;
 | 
			
		||||
            if (obj3 == null) {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
            return obj2.equals(obj3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // java.lang.Object
 | 
			
		||||
        public int hashCode() {
 | 
			
		||||
            Object obj = this.j;
 | 
			
		||||
            if (obj == null) {
 | 
			
		||||
                return 0;
 | 
			
		||||
            }
 | 
			
		||||
            return obj.hashCode();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.Parcelable
 | 
			
		||||
        public void writeToParcel(Parcel parcel, int i) {
 | 
			
		||||
            parcel.writeParcelable((Parcelable) this.j, i);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @RestrictTo({RestrictTo.Scope.LIBRARY})
 | 
			
		||||
    public static void a(@Nullable Bundle bundle) {
 | 
			
		||||
        if (bundle != null) {
 | 
			
		||||
            bundle.setClassLoader(MediaSessionCompat.class.getClassLoader());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Nullable
 | 
			
		||||
    @RestrictTo({RestrictTo.Scope.LIBRARY})
 | 
			
		||||
    public static Bundle b(@Nullable Bundle bundle) {
 | 
			
		||||
        a(bundle);
 | 
			
		||||
        try {
 | 
			
		||||
            bundle.isEmpty();
 | 
			
		||||
            return bundle;
 | 
			
		||||
        } catch (BadParcelableException unused) {
 | 
			
		||||
            Log.e("MediaSessionCompat", "Could not unparcel the data.");
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,50 @@
 | 
			
		|||
package android.support.v4.media.session;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.os.Parcel;
 | 
			
		||||
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 class a implements Parcelable.Creator<ParcelableVolumeInfo> {
 | 
			
		||||
        /* Return type fixed from 'java.lang.Object' to match base method */
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public ParcelableVolumeInfo createFromParcel(Parcel parcel) {
 | 
			
		||||
            return new ParcelableVolumeInfo(parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* Return type fixed from 'java.lang.Object[]' to match base method */
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public ParcelableVolumeInfo[] newArray(int i) {
 | 
			
		||||
            return new ParcelableVolumeInfo[i];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public ParcelableVolumeInfo(Parcel parcel) {
 | 
			
		||||
        this.i = parcel.readInt();
 | 
			
		||||
        this.k = parcel.readInt();
 | 
			
		||||
        this.l = parcel.readInt();
 | 
			
		||||
        this.m = parcel.readInt();
 | 
			
		||||
        this.j = parcel.readInt();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public int describeContents() {
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public void writeToParcel(Parcel parcel, int i) {
 | 
			
		||||
        parcel.writeInt(this.i);
 | 
			
		||||
        parcel.writeInt(this.k);
 | 
			
		||||
        parcel.writeInt(this.l);
 | 
			
		||||
        parcel.writeInt(this.m);
 | 
			
		||||
        parcel.writeInt(this.j);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,173 @@
 | 
			
		|||
package android.support.v4.media.session;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.os.Parcel;
 | 
			
		||||
import android.os.Parcelable;
 | 
			
		||||
import android.text.TextUtils;
 | 
			
		||||
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 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;
 | 
			
		||||
 | 
			
		||||
    /* renamed from: s  reason: collision with root package name */
 | 
			
		||||
    public final Bundle f12s;
 | 
			
		||||
 | 
			
		||||
    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 class a implements Parcelable.Creator<CustomAction> {
 | 
			
		||||
            /* Return type fixed from 'java.lang.Object' to match base method */
 | 
			
		||||
            @Override // android.os.Parcelable.Creator
 | 
			
		||||
            public CustomAction createFromParcel(Parcel parcel) {
 | 
			
		||||
                return new CustomAction(parcel);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            /* Return type fixed from 'java.lang.Object[]' to match base method */
 | 
			
		||||
            @Override // android.os.Parcelable.Creator
 | 
			
		||||
            public CustomAction[] newArray(int i) {
 | 
			
		||||
                return new CustomAction[i];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        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());
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public CustomAction(String str, CharSequence charSequence, int i, Bundle bundle) {
 | 
			
		||||
            this.i = str;
 | 
			
		||||
            this.j = charSequence;
 | 
			
		||||
            this.k = i;
 | 
			
		||||
            this.l = bundle;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.Parcelable
 | 
			
		||||
        public int describeContents() {
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @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();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @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);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class a implements Parcelable.Creator<PlaybackStateCompat> {
 | 
			
		||||
        /* Return type fixed from 'java.lang.Object' to match base method */
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public PlaybackStateCompat createFromParcel(Parcel parcel) {
 | 
			
		||||
            return new PlaybackStateCompat(parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* Return type fixed from 'java.lang.Object[]' to match base method */
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public PlaybackStateCompat[] newArray(int i) {
 | 
			
		||||
            return new PlaybackStateCompat[i];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public PlaybackStateCompat(Parcel parcel) {
 | 
			
		||||
        this.i = parcel.readInt();
 | 
			
		||||
        this.j = parcel.readLong();
 | 
			
		||||
        this.l = parcel.readFloat();
 | 
			
		||||
        this.p = parcel.readLong();
 | 
			
		||||
        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();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public int describeContents() {
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // java.lang.Object
 | 
			
		||||
    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(this.k);
 | 
			
		||||
        sb.append(", speed=");
 | 
			
		||||
        sb.append(this.l);
 | 
			
		||||
        sb.append(", updated=");
 | 
			
		||||
        sb.append(this.p);
 | 
			
		||||
        sb.append(", actions=");
 | 
			
		||||
        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(this.q);
 | 
			
		||||
        sb.append(", active item id=");
 | 
			
		||||
        return c.d.b.a.a.A(sb, this.r, "}");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @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.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);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										84
									
								
								app/src/main/java/android/support/v4/os/ResultReceiver.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,84 @@
 | 
			
		|||
package android.support.v4.os;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.os.IBinder;
 | 
			
		||||
import android.os.IInterface;
 | 
			
		||||
import android.os.Parcel;
 | 
			
		||||
import android.os.Parcelable;
 | 
			
		||||
import android.os.RemoteException;
 | 
			
		||||
import androidx.annotation.RestrictTo;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
import x.a.b.c.a;
 | 
			
		||||
@SuppressLint({"BanParcelableUsage"})
 | 
			
		||||
@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 class a implements Parcelable.Creator<ResultReceiver> {
 | 
			
		||||
        /* Return type fixed from 'java.lang.Object' to match base method */
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public ResultReceiver createFromParcel(Parcel parcel) {
 | 
			
		||||
            return new ResultReceiver(parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* Return type fixed from 'java.lang.Object[]' to match base method */
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public ResultReceiver[] newArray(int i) {
 | 
			
		||||
            return new ResultReceiver[i];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class b extends a.AbstractBinderC0355a {
 | 
			
		||||
        public b() {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // x.a.b.c.a
 | 
			
		||||
        public void w0(int i, Bundle bundle) {
 | 
			
		||||
            Objects.requireNonNull(ResultReceiver.this);
 | 
			
		||||
            ResultReceiver.this.a(i, bundle);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public ResultReceiver(Parcel parcel) {
 | 
			
		||||
        x.a.b.c.a aVar;
 | 
			
		||||
        IBinder readStrongBinder = parcel.readStrongBinder();
 | 
			
		||||
        int i = a.AbstractBinderC0355a.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;
 | 
			
		||||
        }
 | 
			
		||||
        this.i = aVar;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void a(int i, Bundle bundle) {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void b(int i, Bundle bundle) {
 | 
			
		||||
        x.a.b.c.a aVar = this.i;
 | 
			
		||||
        if (aVar != null) {
 | 
			
		||||
            try {
 | 
			
		||||
                aVar.w0(i, bundle);
 | 
			
		||||
            } catch (RemoteException unused) {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public int describeContents() {
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public void writeToParcel(Parcel parcel, int i) {
 | 
			
		||||
        synchronized (this) {
 | 
			
		||||
            if (this.i == null) {
 | 
			
		||||
                this.i = new b();
 | 
			
		||||
            }
 | 
			
		||||
            parcel.writeStrongBinder(this.i.asBinder());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,24 @@
 | 
			
		|||
package androidx.activity;
 | 
			
		||||
 | 
			
		||||
import androidx.lifecycle.ViewModelStore;
 | 
			
		||||
import d0.z.d.m;
 | 
			
		||||
import d0.z.d.o;
 | 
			
		||||
import kotlin.jvm.functions.Function0;
 | 
			
		||||
/* compiled from: ActivityViewModelLazy.kt */
 | 
			
		||||
public final class ActivityViewModelLazyKt$viewModels$1 extends o implements Function0<ViewModelStore> {
 | 
			
		||||
    public final /* synthetic */ ComponentActivity $this_viewModels;
 | 
			
		||||
 | 
			
		||||
    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
 | 
			
		||||
    public ActivityViewModelLazyKt$viewModels$1(ComponentActivity componentActivity) {
 | 
			
		||||
        super(0);
 | 
			
		||||
        this.$this_viewModels = componentActivity;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // kotlin.jvm.functions.Function0
 | 
			
		||||
    /* renamed from: invoke */
 | 
			
		||||
    public final ViewModelStore mo1invoke() {
 | 
			
		||||
        ViewModelStore viewModelStore = this.$this_viewModels.getViewModelStore();
 | 
			
		||||
        m.checkNotNullExpressionValue(viewModelStore, "viewModelStore");
 | 
			
		||||
        return viewModelStore;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
package androidx.activity;
 | 
			
		||||
 | 
			
		||||
import androidx.lifecycle.ViewModelProvider;
 | 
			
		||||
import d0.z.d.o;
 | 
			
		||||
import kotlin.jvm.functions.Function0;
 | 
			
		||||
/* compiled from: ActivityViewModelLazy.kt */
 | 
			
		||||
public final class ActivityViewModelLazyKt$viewModels$factoryPromise$1 extends o implements Function0<ViewModelProvider.Factory> {
 | 
			
		||||
    public final /* synthetic */ ComponentActivity $this_viewModels;
 | 
			
		||||
 | 
			
		||||
    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
 | 
			
		||||
    public ActivityViewModelLazyKt$viewModels$factoryPromise$1(ComponentActivity componentActivity) {
 | 
			
		||||
        super(0);
 | 
			
		||||
        this.$this_viewModels = componentActivity;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // kotlin.jvm.functions.Function0
 | 
			
		||||
    /* renamed from: invoke */
 | 
			
		||||
    public final ViewModelProvider.Factory mo1invoke() {
 | 
			
		||||
        return this.$this_viewModels.getDefaultViewModelProviderFactory();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,34 @@
 | 
			
		|||
package androidx.activity;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.MainThread;
 | 
			
		||||
import androidx.lifecycle.ViewModel;
 | 
			
		||||
import androidx.lifecycle.ViewModelLazy;
 | 
			
		||||
import androidx.lifecycle.ViewModelProvider;
 | 
			
		||||
import d0.z.d.a0;
 | 
			
		||||
import d0.z.d.m;
 | 
			
		||||
import kotlin.Lazy;
 | 
			
		||||
import kotlin.jvm.functions.Function0;
 | 
			
		||||
/* compiled from: ActivityViewModelLazy.kt */
 | 
			
		||||
public final class ActivityViewModelLazyKt {
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public static final /* synthetic */ <VM extends ViewModel> Lazy<VM> viewModels(ComponentActivity componentActivity, Function0<? extends ViewModelProvider.Factory> function0) {
 | 
			
		||||
        m.checkNotNullParameter(componentActivity, "$this$viewModels");
 | 
			
		||||
        if (function0 == null) {
 | 
			
		||||
            function0 = new ActivityViewModelLazyKt$viewModels$factoryPromise$1(componentActivity);
 | 
			
		||||
        }
 | 
			
		||||
        m.reifiedOperationMarker(4, "VM");
 | 
			
		||||
        return new ViewModelLazy(a0.getOrCreateKotlinClass(ViewModel.class), new ActivityViewModelLazyKt$viewModels$1(componentActivity), function0);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static /* synthetic */ Lazy viewModels$default(ComponentActivity componentActivity, Function0 function0, int i, Object obj) {
 | 
			
		||||
        if ((i & 1) != 0) {
 | 
			
		||||
            function0 = null;
 | 
			
		||||
        }
 | 
			
		||||
        m.checkNotNullParameter(componentActivity, "$this$viewModels");
 | 
			
		||||
        if (function0 == null) {
 | 
			
		||||
            function0 = new ActivityViewModelLazyKt$viewModels$factoryPromise$1(componentActivity);
 | 
			
		||||
        }
 | 
			
		||||
        m.reifiedOperationMarker(4, "VM");
 | 
			
		||||
        return new ViewModelLazy(a0.getOrCreateKotlinClass(ViewModel.class), new ActivityViewModelLazyKt$viewModels$1(componentActivity), function0);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										4
									
								
								app/src/main/java/androidx/activity/Cancellable.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,4 @@
 | 
			
		|||
package androidx.activity;
 | 
			
		||||
public interface Cancellable {
 | 
			
		||||
    void cancel();
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										480
									
								
								app/src/main/java/androidx/activity/ComponentActivity.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,480 @@
 | 
			
		|||
package androidx.activity;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.content.IntentSender;
 | 
			
		||||
import android.os.Build;
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.os.Handler;
 | 
			
		||||
import android.os.Looper;
 | 
			
		||||
import android.os.Process;
 | 
			
		||||
import android.text.TextUtils;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.view.Window;
 | 
			
		||||
import androidx.activity.contextaware.ContextAware;
 | 
			
		||||
import androidx.activity.contextaware.ContextAwareHelper;
 | 
			
		||||
import androidx.activity.contextaware.OnContextAvailableListener;
 | 
			
		||||
import androidx.activity.result.ActivityResultCallback;
 | 
			
		||||
import androidx.activity.result.ActivityResultCaller;
 | 
			
		||||
import androidx.activity.result.ActivityResultLauncher;
 | 
			
		||||
import androidx.activity.result.ActivityResultRegistry;
 | 
			
		||||
import androidx.activity.result.ActivityResultRegistryOwner;
 | 
			
		||||
import androidx.activity.result.IntentSenderRequest;
 | 
			
		||||
import androidx.activity.result.contract.ActivityResultContract;
 | 
			
		||||
import androidx.annotation.CallSuper;
 | 
			
		||||
import androidx.annotation.ContentView;
 | 
			
		||||
import androidx.annotation.LayoutRes;
 | 
			
		||||
import androidx.annotation.MainThread;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
import androidx.core.app.ActivityCompat;
 | 
			
		||||
import androidx.core.app.ActivityOptionsCompat;
 | 
			
		||||
import androidx.lifecycle.HasDefaultViewModelProviderFactory;
 | 
			
		||||
import androidx.lifecycle.Lifecycle;
 | 
			
		||||
import androidx.lifecycle.LifecycleEventObserver;
 | 
			
		||||
import androidx.lifecycle.LifecycleOwner;
 | 
			
		||||
import androidx.lifecycle.LifecycleRegistry;
 | 
			
		||||
import androidx.lifecycle.ReportFragment;
 | 
			
		||||
import androidx.lifecycle.SavedStateViewModelFactory;
 | 
			
		||||
import androidx.lifecycle.ViewModelProvider;
 | 
			
		||||
import androidx.lifecycle.ViewModelStore;
 | 
			
		||||
import androidx.lifecycle.ViewModelStoreOwner;
 | 
			
		||||
import androidx.lifecycle.ViewTreeLifecycleOwner;
 | 
			
		||||
import androidx.lifecycle.ViewTreeViewModelStoreOwner;
 | 
			
		||||
import androidx.savedstate.SavedStateRegistry;
 | 
			
		||||
import androidx.savedstate.SavedStateRegistryController;
 | 
			
		||||
import androidx.savedstate.SavedStateRegistryOwner;
 | 
			
		||||
import androidx.savedstate.ViewTreeSavedStateRegistryOwner;
 | 
			
		||||
import androidx.tracing.Trace;
 | 
			
		||||
import c.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 {
 | 
			
		||||
    private ActivityResultRegistry mActivityResultRegistry;
 | 
			
		||||
    @LayoutRes
 | 
			
		||||
    private int mContentLayoutId;
 | 
			
		||||
    public final ContextAwareHelper mContextAwareHelper;
 | 
			
		||||
    private ViewModelProvider.Factory mDefaultFactory;
 | 
			
		||||
    private final LifecycleRegistry mLifecycleRegistry;
 | 
			
		||||
    private final AtomicInteger mNextLocalRequestCode;
 | 
			
		||||
    private final OnBackPressedDispatcher mOnBackPressedDispatcher;
 | 
			
		||||
    public final SavedStateRegistryController mSavedStateRegistryController;
 | 
			
		||||
    private ViewModelStore mViewModelStore;
 | 
			
		||||
 | 
			
		||||
    /* renamed from: androidx.activity.ComponentActivity$1  reason: invalid class name */
 | 
			
		||||
    public class AnonymousClass1 implements Runnable {
 | 
			
		||||
        public AnonymousClass1() {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // java.lang.Runnable
 | 
			
		||||
        public void run() {
 | 
			
		||||
            try {
 | 
			
		||||
                ComponentActivity.access$001(ComponentActivity.this);
 | 
			
		||||
            } catch (IllegalStateException e) {
 | 
			
		||||
                if (!TextUtils.equals(e.getMessage(), "Can not perform this action after onSaveInstanceState")) {
 | 
			
		||||
                    throw e;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* renamed from: androidx.activity.ComponentActivity$2  reason: invalid class name */
 | 
			
		||||
    public class AnonymousClass2 extends ActivityResultRegistry {
 | 
			
		||||
 | 
			
		||||
        /* renamed from: androidx.activity.ComponentActivity$2$1  reason: invalid class name */
 | 
			
		||||
        public class AnonymousClass1 implements Runnable {
 | 
			
		||||
            public final /* synthetic */ int val$requestCode;
 | 
			
		||||
            public final /* synthetic */ ActivityResultContract.SynchronousResult val$synchronousResult;
 | 
			
		||||
 | 
			
		||||
            public AnonymousClass1(int i, ActivityResultContract.SynchronousResult synchronousResult) {
 | 
			
		||||
                this.val$requestCode = i;
 | 
			
		||||
                this.val$synchronousResult = synchronousResult;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            @Override // java.lang.Runnable
 | 
			
		||||
            public void run() {
 | 
			
		||||
                AnonymousClass2.this.dispatchResult(this.val$requestCode, this.val$synchronousResult.getValue());
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* renamed from: androidx.activity.ComponentActivity$2$2  reason: invalid class name */
 | 
			
		||||
        public class AnonymousClass2 implements Runnable {
 | 
			
		||||
            public final /* synthetic */ IntentSender.SendIntentException val$e;
 | 
			
		||||
            public final /* synthetic */ int val$requestCode;
 | 
			
		||||
 | 
			
		||||
            public AnonymousClass2(int i, IntentSender.SendIntentException sendIntentException) {
 | 
			
		||||
                this.val$requestCode = i;
 | 
			
		||||
                this.val$e = sendIntentException;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            @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));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public AnonymousClass2() {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.ActivityResultRegistry
 | 
			
		||||
        public <I, O> void onLaunch(int i, @NonNull ActivityResultContract<I, O> activityResultContract, I i2, @Nullable ActivityOptionsCompat activityOptionsCompat) {
 | 
			
		||||
            ComponentActivity componentActivity = ComponentActivity.this;
 | 
			
		||||
            ActivityResultContract.SynchronousResult<O> synchronousResult = activityResultContract.getSynchronousResult(componentActivity, i2);
 | 
			
		||||
            if (synchronousResult != null) {
 | 
			
		||||
                new Handler(Looper.getMainLooper()).post(new AnonymousClass1(i, synchronousResult));
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            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");
 | 
			
		||||
            } 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 (stringArrayExtra != null) {
 | 
			
		||||
                    ArrayList arrayList = new ArrayList();
 | 
			
		||||
                    for (String str : stringArrayExtra) {
 | 
			
		||||
                        if (ComponentActivity.this.checkPermission(str, Process.myPid(), Process.myUid()) != 0) {
 | 
			
		||||
                            arrayList.add(str);
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    if (!arrayList.isEmpty()) {
 | 
			
		||||
                        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");
 | 
			
		||||
                try {
 | 
			
		||||
                    ActivityCompat.startIntentSenderForResult(componentActivity, intentSenderRequest.getIntentSender(), i, intentSenderRequest.getFillInIntent(), intentSenderRequest.getFlagsMask(), intentSenderRequest.getFlagsValues(), 0, bundle);
 | 
			
		||||
                } catch (IntentSender.SendIntentException e) {
 | 
			
		||||
                    new Handler(Looper.getMainLooper()).post(new AnonymousClass2(i, e));
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
                ActivityCompat.startActivityForResult(componentActivity, createIntent, i, bundle);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* renamed from: androidx.activity.ComponentActivity$3  reason: invalid class name */
 | 
			
		||||
    public class AnonymousClass3 implements LifecycleEventObserver {
 | 
			
		||||
        public AnonymousClass3() {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.lifecycle.LifecycleEventObserver
 | 
			
		||||
        public void onStateChanged(@NonNull LifecycleOwner lifecycleOwner, @NonNull Lifecycle.Event event) {
 | 
			
		||||
            if (event == Lifecycle.Event.ON_STOP) {
 | 
			
		||||
                Window window = ComponentActivity.this.getWindow();
 | 
			
		||||
                View peekDecorView = window != null ? window.peekDecorView() : null;
 | 
			
		||||
                if (peekDecorView != null) {
 | 
			
		||||
                    peekDecorView.cancelPendingInputEvents();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* renamed from: androidx.activity.ComponentActivity$4  reason: invalid class name */
 | 
			
		||||
    public class AnonymousClass4 implements LifecycleEventObserver {
 | 
			
		||||
        public AnonymousClass4() {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.lifecycle.LifecycleEventObserver
 | 
			
		||||
        public void onStateChanged(@NonNull LifecycleOwner lifecycleOwner, @NonNull Lifecycle.Event event) {
 | 
			
		||||
            if (event == Lifecycle.Event.ON_DESTROY) {
 | 
			
		||||
                ComponentActivity.this.mContextAwareHelper.clearAvailableContext();
 | 
			
		||||
                if (!ComponentActivity.this.isChangingConfigurations()) {
 | 
			
		||||
                    ComponentActivity.this.getViewModelStore().clear();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* renamed from: androidx.activity.ComponentActivity$5  reason: invalid class name */
 | 
			
		||||
    public class AnonymousClass5 implements LifecycleEventObserver {
 | 
			
		||||
        public AnonymousClass5() {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.lifecycle.LifecycleEventObserver
 | 
			
		||||
        public void onStateChanged(@NonNull LifecycleOwner lifecycleOwner, @NonNull Lifecycle.Event event) {
 | 
			
		||||
            ComponentActivity.this.ensureViewModelStore();
 | 
			
		||||
            ComponentActivity.this.getLifecycle().removeObserver(this);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static final class NonConfigurationInstances {
 | 
			
		||||
        public Object custom;
 | 
			
		||||
        public ViewModelStore viewModelStore;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public ComponentActivity() {
 | 
			
		||||
        this.mContextAwareHelper = new ContextAwareHelper();
 | 
			
		||||
        this.mLifecycleRegistry = new LifecycleRegistry(this);
 | 
			
		||||
        this.mSavedStateRegistryController = SavedStateRegistryController.create(this);
 | 
			
		||||
        this.mOnBackPressedDispatcher = new OnBackPressedDispatcher(new AnonymousClass1());
 | 
			
		||||
        this.mNextLocalRequestCode = new AtomicInteger();
 | 
			
		||||
        this.mActivityResultRegistry = new AnonymousClass2();
 | 
			
		||||
        if (getLifecycle() != null) {
 | 
			
		||||
            int i = Build.VERSION.SDK_INT;
 | 
			
		||||
            getLifecycle().addObserver(new AnonymousClass3());
 | 
			
		||||
            getLifecycle().addObserver(new AnonymousClass4());
 | 
			
		||||
            getLifecycle().addObserver(new AnonymousClass5());
 | 
			
		||||
            if (i <= 23) {
 | 
			
		||||
                getLifecycle().addObserver(new ImmLeaksCleaner(this));
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        throw new IllegalStateException("getLifecycle() returned null in ComponentActivity's constructor. Please make sure you are lazily constructing your Lifecycle in the first call to getLifecycle() rather than relying on field initialization.");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @ContentView
 | 
			
		||||
    public ComponentActivity(@LayoutRes int i) {
 | 
			
		||||
        this();
 | 
			
		||||
        this.mContentLayoutId = i;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static /* synthetic */ void access$001(ComponentActivity componentActivity) {
 | 
			
		||||
        super.onBackPressed();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void initViewTreeOwners() {
 | 
			
		||||
        ViewTreeLifecycleOwner.set(getWindow().getDecorView(), this);
 | 
			
		||||
        ViewTreeViewModelStoreOwner.set(getWindow().getDecorView(), this);
 | 
			
		||||
        ViewTreeSavedStateRegistryOwner.set(getWindow().getDecorView(), this);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    public void addContentView(@SuppressLint({"UnknownNullness", "MissingNullability"}) View view, @SuppressLint({"UnknownNullness", "MissingNullability"}) ViewGroup.LayoutParams layoutParams) {
 | 
			
		||||
        initViewTreeOwners();
 | 
			
		||||
        super.addContentView(view, layoutParams);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.activity.contextaware.ContextAware
 | 
			
		||||
    public final void addOnContextAvailableListener(@NonNull OnContextAvailableListener onContextAvailableListener) {
 | 
			
		||||
        this.mContextAwareHelper.addOnContextAvailableListener(onContextAvailableListener);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void ensureViewModelStore() {
 | 
			
		||||
        if (this.mViewModelStore == null) {
 | 
			
		||||
            NonConfigurationInstances nonConfigurationInstances = (NonConfigurationInstances) getLastNonConfigurationInstance();
 | 
			
		||||
            if (nonConfigurationInstances != null) {
 | 
			
		||||
                this.mViewModelStore = nonConfigurationInstances.viewModelStore;
 | 
			
		||||
            }
 | 
			
		||||
            if (this.mViewModelStore == null) {
 | 
			
		||||
                this.mViewModelStore = new ViewModelStore();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.activity.result.ActivityResultRegistryOwner
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public final ActivityResultRegistry getActivityResultRegistry() {
 | 
			
		||||
        return this.mActivityResultRegistry;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.lifecycle.HasDefaultViewModelProviderFactory
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public ViewModelProvider.Factory getDefaultViewModelProviderFactory() {
 | 
			
		||||
        if (getApplication() != null) {
 | 
			
		||||
            if (this.mDefaultFactory == null) {
 | 
			
		||||
                this.mDefaultFactory = new SavedStateViewModelFactory(getApplication(), this, getIntent() != null ? getIntent().getExtras() : null);
 | 
			
		||||
            }
 | 
			
		||||
            return this.mDefaultFactory;
 | 
			
		||||
        }
 | 
			
		||||
        throw new IllegalStateException("Your activity is not yet attached to the Application instance. You can't request ViewModel before onCreate call.");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Nullable
 | 
			
		||||
    @Deprecated
 | 
			
		||||
    public Object getLastCustomNonConfigurationInstance() {
 | 
			
		||||
        NonConfigurationInstances nonConfigurationInstances = (NonConfigurationInstances) getLastNonConfigurationInstance();
 | 
			
		||||
        if (nonConfigurationInstances != null) {
 | 
			
		||||
            return nonConfigurationInstances.custom;
 | 
			
		||||
        }
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.core.app.ComponentActivity, androidx.lifecycle.LifecycleOwner
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public Lifecycle getLifecycle() {
 | 
			
		||||
        return this.mLifecycleRegistry;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.activity.OnBackPressedDispatcherOwner
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public final OnBackPressedDispatcher getOnBackPressedDispatcher() {
 | 
			
		||||
        return this.mOnBackPressedDispatcher;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.savedstate.SavedStateRegistryOwner
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public final SavedStateRegistry getSavedStateRegistry() {
 | 
			
		||||
        return this.mSavedStateRegistryController.getSavedStateRegistry();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.lifecycle.ViewModelStoreOwner
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public ViewModelStore getViewModelStore() {
 | 
			
		||||
        if (getApplication() != null) {
 | 
			
		||||
            ensureViewModelStore();
 | 
			
		||||
            return this.mViewModelStore;
 | 
			
		||||
        }
 | 
			
		||||
        throw new IllegalStateException("Your activity is not yet attached to the Application instance. You can't request ViewModel before onCreate call.");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    @CallSuper
 | 
			
		||||
    @Deprecated
 | 
			
		||||
    public void onActivityResult(int i, int i2, @Nullable Intent intent) {
 | 
			
		||||
        if (!this.mActivityResultRegistry.dispatchResult(i, i2, intent)) {
 | 
			
		||||
            super.onActivityResult(i, i2, intent);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public void onBackPressed() {
 | 
			
		||||
        this.mOnBackPressedDispatcher.onBackPressed();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.core.app.ComponentActivity, android.app.Activity
 | 
			
		||||
    public void onCreate(@Nullable Bundle bundle) {
 | 
			
		||||
        this.mSavedStateRegistryController.performRestore(bundle);
 | 
			
		||||
        this.mContextAwareHelper.dispatchOnContextAvailable(this);
 | 
			
		||||
        super.onCreate(bundle);
 | 
			
		||||
        this.mActivityResultRegistry.onRestoreInstanceState(bundle);
 | 
			
		||||
        ReportFragment.injectIfNeededIn(this);
 | 
			
		||||
        int i = this.mContentLayoutId;
 | 
			
		||||
        if (i != 0) {
 | 
			
		||||
            setContentView(i);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    @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) {
 | 
			
		||||
            super.onRequestPermissionsResult(i, strArr, iArr);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Nullable
 | 
			
		||||
    @Deprecated
 | 
			
		||||
    public Object onRetainCustomNonConfigurationInstance() {
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    @Nullable
 | 
			
		||||
    public final Object onRetainNonConfigurationInstance() {
 | 
			
		||||
        NonConfigurationInstances nonConfigurationInstances;
 | 
			
		||||
        Object onRetainCustomNonConfigurationInstance = onRetainCustomNonConfigurationInstance();
 | 
			
		||||
        ViewModelStore viewModelStore = this.mViewModelStore;
 | 
			
		||||
        if (viewModelStore == null && (nonConfigurationInstances = (NonConfigurationInstances) getLastNonConfigurationInstance()) != null) {
 | 
			
		||||
            viewModelStore = nonConfigurationInstances.viewModelStore;
 | 
			
		||||
        }
 | 
			
		||||
        if (viewModelStore == null && onRetainCustomNonConfigurationInstance == null) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        NonConfigurationInstances nonConfigurationInstances2 = new NonConfigurationInstances();
 | 
			
		||||
        nonConfigurationInstances2.custom = onRetainCustomNonConfigurationInstance;
 | 
			
		||||
        nonConfigurationInstances2.viewModelStore = viewModelStore;
 | 
			
		||||
        return nonConfigurationInstances2;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.core.app.ComponentActivity, android.app.Activity
 | 
			
		||||
    @CallSuper
 | 
			
		||||
    public void onSaveInstanceState(@NonNull Bundle bundle) {
 | 
			
		||||
        Lifecycle lifecycle = getLifecycle();
 | 
			
		||||
        if (lifecycle instanceof LifecycleRegistry) {
 | 
			
		||||
            ((LifecycleRegistry) lifecycle).setCurrentState(Lifecycle.State.CREATED);
 | 
			
		||||
        }
 | 
			
		||||
        super.onSaveInstanceState(bundle);
 | 
			
		||||
        this.mSavedStateRegistryController.performSave(bundle);
 | 
			
		||||
        this.mActivityResultRegistry.onSaveInstanceState(bundle);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.activity.contextaware.ContextAware
 | 
			
		||||
    @Nullable
 | 
			
		||||
    public Context peekAvailableContext() {
 | 
			
		||||
        return this.mContextAwareHelper.peekAvailableContext();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.activity.result.ActivityResultCaller
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public final <I, O> ActivityResultLauncher<I> registerForActivityResult(@NonNull ActivityResultContract<I, O> activityResultContract, @NonNull ActivityResultCallback<O> activityResultCallback) {
 | 
			
		||||
        return registerForActivityResult(activityResultContract, this.mActivityResultRegistry, activityResultCallback);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @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);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.activity.contextaware.ContextAware
 | 
			
		||||
    public final void removeOnContextAvailableListener(@NonNull OnContextAvailableListener onContextAvailableListener) {
 | 
			
		||||
        this.mContextAwareHelper.removeOnContextAvailableListener(onContextAvailableListener);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    public void reportFullyDrawn() {
 | 
			
		||||
        try {
 | 
			
		||||
            if (Trace.isEnabled()) {
 | 
			
		||||
                Trace.beginSection("reportFullyDrawn() for " + getComponentName());
 | 
			
		||||
            }
 | 
			
		||||
            super.reportFullyDrawn();
 | 
			
		||||
        } finally {
 | 
			
		||||
            Trace.endSection();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    public void setContentView(@LayoutRes int i) {
 | 
			
		||||
        initViewTreeOwners();
 | 
			
		||||
        super.setContentView(i);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    public void setContentView(@SuppressLint({"UnknownNullness", "MissingNullability"}) View view) {
 | 
			
		||||
        initViewTreeOwners();
 | 
			
		||||
        super.setContentView(view);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    public void setContentView(@SuppressLint({"UnknownNullness", "MissingNullability"}) View view, @SuppressLint({"UnknownNullness", "MissingNullability"}) ViewGroup.LayoutParams layoutParams) {
 | 
			
		||||
        initViewTreeOwners();
 | 
			
		||||
        super.setContentView(view, layoutParams);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    @Deprecated
 | 
			
		||||
    public void startActivityForResult(@SuppressLint({"UnknownNullness"}) Intent intent, int i) {
 | 
			
		||||
        super.startActivityForResult(intent, i);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    @Deprecated
 | 
			
		||||
    public void startActivityForResult(@SuppressLint({"UnknownNullness"}) Intent intent, int i, @Nullable Bundle bundle) {
 | 
			
		||||
        super.startActivityForResult(intent, i, bundle);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    @Deprecated
 | 
			
		||||
    public void startIntentSenderForResult(@SuppressLint({"UnknownNullness"}) IntentSender intentSender, int i, @Nullable Intent intent, int i2, int i3, int i4) throws IntentSender.SendIntentException {
 | 
			
		||||
        super.startIntentSenderForResult(intentSender, i, intent, i2, i3, i4);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.app.Activity
 | 
			
		||||
    @Deprecated
 | 
			
		||||
    public void startIntentSenderForResult(@SuppressLint({"UnknownNullness"}) IntentSender intentSender, int i, @Nullable Intent intent, int i2, int i3, int i4, @Nullable Bundle bundle) throws IntentSender.SendIntentException {
 | 
			
		||||
        super.startIntentSenderForResult(intentSender, i, intent, i2, i3, i4, bundle);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										79
									
								
								app/src/main/java/androidx/activity/ImmLeaksCleaner.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,79 @@
 | 
			
		|||
package androidx.activity;
 | 
			
		||||
 | 
			
		||||
import android.app.Activity;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.inputmethod.InputMethodManager;
 | 
			
		||||
import androidx.annotation.MainThread;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.annotation.RequiresApi;
 | 
			
		||||
import androidx.lifecycle.Lifecycle;
 | 
			
		||||
import androidx.lifecycle.LifecycleEventObserver;
 | 
			
		||||
import androidx.lifecycle.LifecycleOwner;
 | 
			
		||||
import java.lang.reflect.Field;
 | 
			
		||||
@RequiresApi(19)
 | 
			
		||||
public final class ImmLeaksCleaner implements LifecycleEventObserver {
 | 
			
		||||
    private static final int INIT_FAILED = 2;
 | 
			
		||||
    private static final int INIT_SUCCESS = 1;
 | 
			
		||||
    private static final int NOT_INITIALIAZED = 0;
 | 
			
		||||
    private static Field sHField;
 | 
			
		||||
    private static Field sNextServedViewField;
 | 
			
		||||
    private static int sReflectedFieldsInitialized;
 | 
			
		||||
    private static Field sServedViewField;
 | 
			
		||||
    private Activity mActivity;
 | 
			
		||||
 | 
			
		||||
    public ImmLeaksCleaner(Activity activity) {
 | 
			
		||||
        this.mActivity = activity;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    private static void initializeReflectiveFields() {
 | 
			
		||||
        try {
 | 
			
		||||
            sReflectedFieldsInitialized = 2;
 | 
			
		||||
            Field declaredField = InputMethodManager.class.getDeclaredField("mServedView");
 | 
			
		||||
            sServedViewField = declaredField;
 | 
			
		||||
            declaredField.setAccessible(true);
 | 
			
		||||
            Field declaredField2 = InputMethodManager.class.getDeclaredField("mNextServedView");
 | 
			
		||||
            sNextServedViewField = declaredField2;
 | 
			
		||||
            declaredField2.setAccessible(true);
 | 
			
		||||
            Field declaredField3 = InputMethodManager.class.getDeclaredField("mH");
 | 
			
		||||
            sHField = declaredField3;
 | 
			
		||||
            declaredField3.setAccessible(true);
 | 
			
		||||
            sReflectedFieldsInitialized = 1;
 | 
			
		||||
        } catch (NoSuchFieldException unused) {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.lifecycle.LifecycleEventObserver
 | 
			
		||||
    public void onStateChanged(@NonNull LifecycleOwner lifecycleOwner, @NonNull Lifecycle.Event event) {
 | 
			
		||||
        if (event == Lifecycle.Event.ON_DESTROY) {
 | 
			
		||||
            if (sReflectedFieldsInitialized == 0) {
 | 
			
		||||
                initializeReflectiveFields();
 | 
			
		||||
            }
 | 
			
		||||
            if (sReflectedFieldsInitialized == 1) {
 | 
			
		||||
                InputMethodManager inputMethodManager = (InputMethodManager) this.mActivity.getSystemService("input_method");
 | 
			
		||||
                try {
 | 
			
		||||
                    Object obj = sHField.get(inputMethodManager);
 | 
			
		||||
                    if (obj != null) {
 | 
			
		||||
                        synchronized (obj) {
 | 
			
		||||
                            try {
 | 
			
		||||
                                View view = (View) sServedViewField.get(inputMethodManager);
 | 
			
		||||
                                if (view != null) {
 | 
			
		||||
                                    if (!view.isAttachedToWindow()) {
 | 
			
		||||
                                        try {
 | 
			
		||||
                                            sNextServedViewField.set(inputMethodManager, null);
 | 
			
		||||
                                            inputMethodManager.isActive();
 | 
			
		||||
                                        } catch (IllegalAccessException unused) {
 | 
			
		||||
                                        }
 | 
			
		||||
                                    }
 | 
			
		||||
                                }
 | 
			
		||||
                            } catch (IllegalAccessException unused2) {
 | 
			
		||||
                            } catch (ClassCastException unused3) {
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                } catch (IllegalAccessException unused4) {
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
package androidx.activity;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.MainThread;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import java.util.Iterator;
 | 
			
		||||
import java.util.concurrent.CopyOnWriteArrayList;
 | 
			
		||||
public abstract class OnBackPressedCallback {
 | 
			
		||||
    private CopyOnWriteArrayList<Cancellable> mCancellables = new CopyOnWriteArrayList<>();
 | 
			
		||||
    private boolean mEnabled;
 | 
			
		||||
 | 
			
		||||
    public OnBackPressedCallback(boolean z2) {
 | 
			
		||||
        this.mEnabled = z2;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void addCancellable(@NonNull Cancellable cancellable) {
 | 
			
		||||
        this.mCancellables.add(cancellable);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public abstract void handleOnBackPressed();
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public final boolean isEnabled() {
 | 
			
		||||
        return this.mEnabled;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public final void remove() {
 | 
			
		||||
        Iterator<Cancellable> it = this.mCancellables.iterator();
 | 
			
		||||
        while (it.hasNext()) {
 | 
			
		||||
            it.next().cancel();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void removeCancellable(@NonNull Cancellable cancellable) {
 | 
			
		||||
        this.mCancellables.remove(cancellable);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public final void setEnabled(boolean z2) {
 | 
			
		||||
        this.mEnabled = z2;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										127
									
								
								app/src/main/java/androidx/activity/OnBackPressedDispatcher.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,127 @@
 | 
			
		|||
package androidx.activity;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import androidx.annotation.MainThread;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
import androidx.lifecycle.Lifecycle;
 | 
			
		||||
import androidx.lifecycle.LifecycleEventObserver;
 | 
			
		||||
import androidx.lifecycle.LifecycleOwner;
 | 
			
		||||
import java.util.ArrayDeque;
 | 
			
		||||
import java.util.Iterator;
 | 
			
		||||
public final class OnBackPressedDispatcher {
 | 
			
		||||
    @Nullable
 | 
			
		||||
    private final Runnable mFallbackOnBackPressed;
 | 
			
		||||
    public final ArrayDeque<OnBackPressedCallback> mOnBackPressedCallbacks;
 | 
			
		||||
 | 
			
		||||
    public class LifecycleOnBackPressedCancellable implements LifecycleEventObserver, Cancellable {
 | 
			
		||||
        @Nullable
 | 
			
		||||
        private Cancellable mCurrentCancellable;
 | 
			
		||||
        private final Lifecycle mLifecycle;
 | 
			
		||||
        private final OnBackPressedCallback mOnBackPressedCallback;
 | 
			
		||||
 | 
			
		||||
        public LifecycleOnBackPressedCancellable(@NonNull Lifecycle lifecycle, @NonNull OnBackPressedCallback onBackPressedCallback) {
 | 
			
		||||
            this.mLifecycle = lifecycle;
 | 
			
		||||
            this.mOnBackPressedCallback = onBackPressedCallback;
 | 
			
		||||
            lifecycle.addObserver(this);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.Cancellable
 | 
			
		||||
        public void cancel() {
 | 
			
		||||
            this.mLifecycle.removeObserver(this);
 | 
			
		||||
            this.mOnBackPressedCallback.removeCancellable(this);
 | 
			
		||||
            Cancellable cancellable = this.mCurrentCancellable;
 | 
			
		||||
            if (cancellable != null) {
 | 
			
		||||
                cancellable.cancel();
 | 
			
		||||
                this.mCurrentCancellable = null;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.lifecycle.LifecycleEventObserver
 | 
			
		||||
        public void onStateChanged(@NonNull LifecycleOwner lifecycleOwner, @NonNull Lifecycle.Event event) {
 | 
			
		||||
            if (event == Lifecycle.Event.ON_START) {
 | 
			
		||||
                this.mCurrentCancellable = OnBackPressedDispatcher.this.addCancellableCallback(this.mOnBackPressedCallback);
 | 
			
		||||
            } else if (event == Lifecycle.Event.ON_STOP) {
 | 
			
		||||
                Cancellable cancellable = this.mCurrentCancellable;
 | 
			
		||||
                if (cancellable != null) {
 | 
			
		||||
                    cancellable.cancel();
 | 
			
		||||
                }
 | 
			
		||||
            } else if (event == Lifecycle.Event.ON_DESTROY) {
 | 
			
		||||
                cancel();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class OnBackPressedCancellable implements Cancellable {
 | 
			
		||||
        private final OnBackPressedCallback mOnBackPressedCallback;
 | 
			
		||||
 | 
			
		||||
        public OnBackPressedCancellable(OnBackPressedCallback onBackPressedCallback) {
 | 
			
		||||
            this.mOnBackPressedCallback = onBackPressedCallback;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.Cancellable
 | 
			
		||||
        public void cancel() {
 | 
			
		||||
            OnBackPressedDispatcher.this.mOnBackPressedCallbacks.remove(this.mOnBackPressedCallback);
 | 
			
		||||
            this.mOnBackPressedCallback.removeCancellable(this);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public OnBackPressedDispatcher() {
 | 
			
		||||
        this(null);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public OnBackPressedDispatcher(@Nullable Runnable runnable) {
 | 
			
		||||
        this.mOnBackPressedCallbacks = new ArrayDeque<>();
 | 
			
		||||
        this.mFallbackOnBackPressed = runnable;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public void addCallback(@NonNull OnBackPressedCallback onBackPressedCallback) {
 | 
			
		||||
        addCancellableCallback(onBackPressedCallback);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressLint({"LambdaLast"})
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public void addCallback(@NonNull LifecycleOwner lifecycleOwner, @NonNull OnBackPressedCallback onBackPressedCallback) {
 | 
			
		||||
        Lifecycle lifecycle = lifecycleOwner.getLifecycle();
 | 
			
		||||
        if (lifecycle.getCurrentState() != Lifecycle.State.DESTROYED) {
 | 
			
		||||
            onBackPressedCallback.addCancellable(new LifecycleOnBackPressedCancellable(lifecycle, onBackPressedCallback));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @NonNull
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public Cancellable addCancellableCallback(@NonNull OnBackPressedCallback onBackPressedCallback) {
 | 
			
		||||
        this.mOnBackPressedCallbacks.add(onBackPressedCallback);
 | 
			
		||||
        OnBackPressedCancellable onBackPressedCancellable = new OnBackPressedCancellable(onBackPressedCallback);
 | 
			
		||||
        onBackPressedCallback.addCancellable(onBackPressedCancellable);
 | 
			
		||||
        return onBackPressedCancellable;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public boolean hasEnabledCallbacks() {
 | 
			
		||||
        Iterator<OnBackPressedCallback> descendingIterator = this.mOnBackPressedCallbacks.descendingIterator();
 | 
			
		||||
        while (descendingIterator.hasNext()) {
 | 
			
		||||
            if (descendingIterator.next().isEnabled()) {
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public void onBackPressed() {
 | 
			
		||||
        Iterator<OnBackPressedCallback> descendingIterator = this.mOnBackPressedCallbacks.descendingIterator();
 | 
			
		||||
        while (descendingIterator.hasNext()) {
 | 
			
		||||
            OnBackPressedCallback next = descendingIterator.next();
 | 
			
		||||
            if (next.isEnabled()) {
 | 
			
		||||
                next.handleOnBackPressed();
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        Runnable runnable = this.mFallbackOnBackPressed;
 | 
			
		||||
        if (runnable != null) {
 | 
			
		||||
            runnable.run();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,20 @@
 | 
			
		|||
package androidx.activity;
 | 
			
		||||
 | 
			
		||||
import kotlin.jvm.functions.Function1;
 | 
			
		||||
/* compiled from: OnBackPressedDispatcher.kt */
 | 
			
		||||
public final class OnBackPressedDispatcherKt$addCallback$callback$1 extends OnBackPressedCallback {
 | 
			
		||||
    public final /* synthetic */ boolean $enabled;
 | 
			
		||||
    public final /* synthetic */ Function1 $onBackPressed;
 | 
			
		||||
 | 
			
		||||
    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
 | 
			
		||||
    public OnBackPressedDispatcherKt$addCallback$callback$1(Function1 function1, boolean z2, boolean z3) {
 | 
			
		||||
        super(z3);
 | 
			
		||||
        this.$onBackPressed = function1;
 | 
			
		||||
        this.$enabled = z2;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.activity.OnBackPressedCallback
 | 
			
		||||
    public void handleOnBackPressed() {
 | 
			
		||||
        this.$onBackPressed.invoke(this);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,30 @@
 | 
			
		|||
package androidx.activity;
 | 
			
		||||
 | 
			
		||||
import androidx.lifecycle.LifecycleOwner;
 | 
			
		||||
import d0.z.d.m;
 | 
			
		||||
import kotlin.Unit;
 | 
			
		||||
import kotlin.jvm.functions.Function1;
 | 
			
		||||
/* compiled from: OnBackPressedDispatcher.kt */
 | 
			
		||||
public final class OnBackPressedDispatcherKt {
 | 
			
		||||
    public static final OnBackPressedCallback addCallback(OnBackPressedDispatcher onBackPressedDispatcher, LifecycleOwner lifecycleOwner, boolean z2, Function1<? super OnBackPressedCallback, Unit> function1) {
 | 
			
		||||
        m.checkNotNullParameter(onBackPressedDispatcher, "$this$addCallback");
 | 
			
		||||
        m.checkNotNullParameter(function1, "onBackPressed");
 | 
			
		||||
        OnBackPressedDispatcherKt$addCallback$callback$1 onBackPressedDispatcherKt$addCallback$callback$1 = new OnBackPressedDispatcherKt$addCallback$callback$1(function1, z2, z2);
 | 
			
		||||
        if (lifecycleOwner != null) {
 | 
			
		||||
            onBackPressedDispatcher.addCallback(lifecycleOwner, onBackPressedDispatcherKt$addCallback$callback$1);
 | 
			
		||||
        } else {
 | 
			
		||||
            onBackPressedDispatcher.addCallback(onBackPressedDispatcherKt$addCallback$callback$1);
 | 
			
		||||
        }
 | 
			
		||||
        return onBackPressedDispatcherKt$addCallback$callback$1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static /* synthetic */ OnBackPressedCallback addCallback$default(OnBackPressedDispatcher onBackPressedDispatcher, LifecycleOwner lifecycleOwner, boolean z2, Function1 function1, int i, Object obj) {
 | 
			
		||||
        if ((i & 1) != 0) {
 | 
			
		||||
            lifecycleOwner = null;
 | 
			
		||||
        }
 | 
			
		||||
        if ((i & 2) != 0) {
 | 
			
		||||
            z2 = true;
 | 
			
		||||
        }
 | 
			
		||||
        return addCallback(onBackPressedDispatcher, lifecycleOwner, z2, function1);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
package androidx.activity;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.lifecycle.LifecycleOwner;
 | 
			
		||||
public interface OnBackPressedDispatcherOwner extends LifecycleOwner {
 | 
			
		||||
    @NonNull
 | 
			
		||||
    OnBackPressedDispatcher getOnBackPressedDispatcher();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,13 @@
 | 
			
		|||
package androidx.activity.contextaware;
 | 
			
		||||
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
public interface ContextAware {
 | 
			
		||||
    void addOnContextAvailableListener(@NonNull OnContextAvailableListener onContextAvailableListener);
 | 
			
		||||
 | 
			
		||||
    @Nullable
 | 
			
		||||
    Context peekAvailableContext();
 | 
			
		||||
 | 
			
		||||
    void removeOnContextAvailableListener(@NonNull OnContextAvailableListener onContextAvailableListener);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,38 @@
 | 
			
		|||
package androidx.activity.contextaware;
 | 
			
		||||
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
import java.util.concurrent.CopyOnWriteArraySet;
 | 
			
		||||
public final class ContextAwareHelper {
 | 
			
		||||
    private volatile Context mContext;
 | 
			
		||||
    private final Set<OnContextAvailableListener> mListeners = new CopyOnWriteArraySet();
 | 
			
		||||
 | 
			
		||||
    public void addOnContextAvailableListener(@NonNull OnContextAvailableListener onContextAvailableListener) {
 | 
			
		||||
        if (this.mContext != null) {
 | 
			
		||||
            onContextAvailableListener.onContextAvailable(this.mContext);
 | 
			
		||||
        }
 | 
			
		||||
        this.mListeners.add(onContextAvailableListener);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void clearAvailableContext() {
 | 
			
		||||
        this.mContext = null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void dispatchOnContextAvailable(@NonNull Context context) {
 | 
			
		||||
        this.mContext = context;
 | 
			
		||||
        for (OnContextAvailableListener onContextAvailableListener : this.mListeners) {
 | 
			
		||||
            onContextAvailableListener.onContextAvailable(context);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Nullable
 | 
			
		||||
    public Context peekAvailableContext() {
 | 
			
		||||
        return this.mContext;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void removeOnContextAvailableListener(@NonNull OnContextAvailableListener onContextAvailableListener) {
 | 
			
		||||
        this.mListeners.remove(onContextAvailableListener);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,35 @@
 | 
			
		|||
package androidx.activity.contextaware;
 | 
			
		||||
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import d0.k;
 | 
			
		||||
import d0.l;
 | 
			
		||||
import d0.z.d.m;
 | 
			
		||||
import kotlin.jvm.functions.Function1;
 | 
			
		||||
import kotlinx.coroutines.CancellableContinuation;
 | 
			
		||||
/* compiled from: ContextAware.kt */
 | 
			
		||||
public final class ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1 implements OnContextAvailableListener {
 | 
			
		||||
    public final /* synthetic */ CancellableContinuation $co;
 | 
			
		||||
    public final /* synthetic */ Function1 $onContextAvailable$inlined;
 | 
			
		||||
    public final /* synthetic */ ContextAware $this_withContextAvailable$inlined;
 | 
			
		||||
 | 
			
		||||
    public ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1(CancellableContinuation cancellableContinuation, ContextAware contextAware, Function1 function1) {
 | 
			
		||||
        this.$co = cancellableContinuation;
 | 
			
		||||
        this.$this_withContextAvailable$inlined = contextAware;
 | 
			
		||||
        this.$onContextAvailable$inlined = function1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.activity.contextaware.OnContextAvailableListener
 | 
			
		||||
    public void onContextAvailable(Context context) {
 | 
			
		||||
        Object obj;
 | 
			
		||||
        m.checkNotNullParameter(context, "context");
 | 
			
		||||
        CancellableContinuation cancellableContinuation = this.$co;
 | 
			
		||||
        try {
 | 
			
		||||
            k.a aVar = k.i;
 | 
			
		||||
            obj = k.m78constructorimpl(this.$onContextAvailable$inlined.invoke(context));
 | 
			
		||||
        } catch (Throwable th) {
 | 
			
		||||
            k.a aVar2 = k.i;
 | 
			
		||||
            obj = k.m78constructorimpl(l.createFailure(th));
 | 
			
		||||
        }
 | 
			
		||||
        cancellableContinuation.resumeWith(obj);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
package androidx.activity.contextaware;
 | 
			
		||||
 | 
			
		||||
import d0.z.d.o;
 | 
			
		||||
import kotlin.Unit;
 | 
			
		||||
import kotlin.jvm.functions.Function1;
 | 
			
		||||
/* compiled from: ContextAware.kt */
 | 
			
		||||
public final class ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$2 extends o implements Function1<Throwable, Unit> {
 | 
			
		||||
    public final /* synthetic */ ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1 $listener;
 | 
			
		||||
    public final /* synthetic */ Function1 $onContextAvailable$inlined;
 | 
			
		||||
    public final /* synthetic */ ContextAware $this_withContextAvailable$inlined;
 | 
			
		||||
 | 
			
		||||
    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
 | 
			
		||||
    public ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$2(ContextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1 contextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1, ContextAware contextAware, Function1 function1) {
 | 
			
		||||
        super(1);
 | 
			
		||||
        this.$listener = contextAwareKt$withContextAvailable$$inlined$suspendCancellableCoroutine$lambda$1;
 | 
			
		||||
        this.$this_withContextAvailable$inlined = contextAware;
 | 
			
		||||
        this.$onContextAvailable$inlined = function1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* Return type fixed from 'java.lang.Object' to match base method */
 | 
			
		||||
    /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
 | 
			
		||||
    @Override // kotlin.jvm.functions.Function1
 | 
			
		||||
    public /* bridge */ /* synthetic */ Unit invoke(Throwable th) {
 | 
			
		||||
        invoke(th);
 | 
			
		||||
        return Unit.a;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public final void invoke(Throwable th) {
 | 
			
		||||
        this.$this_withContextAvailable$inlined.removeOnContextAvailableListener(this.$listener);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,49 @@
 | 
			
		|||
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 kotlin.coroutines.Continuation;
 | 
			
		||||
import kotlin.jvm.functions.Function1;
 | 
			
		||||
import s.a.j;
 | 
			
		||||
/* 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) {
 | 
			
		||||
        Context peekAvailableContext = contextAware.peekAvailableContext();
 | 
			
		||||
        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);
 | 
			
		||||
        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();
 | 
			
		||||
        if (u != c.getCOROUTINE_SUSPENDED()) {
 | 
			
		||||
            return u;
 | 
			
		||||
        }
 | 
			
		||||
        g.probeCoroutineSuspended(continuation);
 | 
			
		||||
        return u;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private static final Object withContextAvailable$$forInline(ContextAware contextAware, Function1 function1, Continuation continuation) {
 | 
			
		||||
        Context peekAvailableContext = contextAware.peekAvailableContext();
 | 
			
		||||
        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);
 | 
			
		||||
        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();
 | 
			
		||||
        if (u == c.getCOROUTINE_SUSPENDED()) {
 | 
			
		||||
            g.probeCoroutineSuspended(continuation);
 | 
			
		||||
        }
 | 
			
		||||
        l.mark(1);
 | 
			
		||||
        return u;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
package androidx.activity.contextaware;
 | 
			
		||||
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
public interface OnContextAvailableListener {
 | 
			
		||||
    void onContextAvailable(@NonNull Context context);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,79 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.os.Parcel;
 | 
			
		||||
import android.os.Parcelable;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
import c.d.b.a.a;
 | 
			
		||||
@SuppressLint({"BanParcelableUsage"})
 | 
			
		||||
public final class ActivityResult implements Parcelable {
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public static final Parcelable.Creator<ActivityResult> CREATOR = new AnonymousClass1();
 | 
			
		||||
    @Nullable
 | 
			
		||||
    private final Intent mData;
 | 
			
		||||
    private final int mResultCode;
 | 
			
		||||
 | 
			
		||||
    /* renamed from: androidx.activity.result.ActivityResult$1  reason: invalid class name */
 | 
			
		||||
    public class AnonymousClass1 implements Parcelable.Creator<ActivityResult> {
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public ActivityResult createFromParcel(@NonNull Parcel parcel) {
 | 
			
		||||
            return new ActivityResult(parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public ActivityResult[] newArray(int i) {
 | 
			
		||||
            return new ActivityResult[i];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public ActivityResult(int i, @Nullable Intent intent) {
 | 
			
		||||
        this.mResultCode = i;
 | 
			
		||||
        this.mData = intent;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public ActivityResult(Parcel parcel) {
 | 
			
		||||
        this.mResultCode = parcel.readInt();
 | 
			
		||||
        this.mData = parcel.readInt() == 0 ? null : (Intent) Intent.CREATOR.createFromParcel(parcel);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public static String resultCodeToString(int i) {
 | 
			
		||||
        return i != -1 ? i != 0 ? String.valueOf(i) : "RESULT_CANCELED" : "RESULT_OK";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public int describeContents() {
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Nullable
 | 
			
		||||
    public Intent getData() {
 | 
			
		||||
        return this.mData;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public int getResultCode() {
 | 
			
		||||
        return this.mResultCode;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @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();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public void writeToParcel(@NonNull Parcel parcel, int i) {
 | 
			
		||||
        parcel.writeInt(this.mResultCode);
 | 
			
		||||
        parcel.writeInt(this.mData == null ? 0 : 1);
 | 
			
		||||
        Intent intent = this.mData;
 | 
			
		||||
        if (intent != null) {
 | 
			
		||||
            intent.writeToParcel(parcel, i);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
public interface ActivityResultCallback<O> {
 | 
			
		||||
    void onActivityResult(@SuppressLint({"UnknownNullness"}) O o);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import androidx.activity.result.contract.ActivityResultContract;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
public interface ActivityResultCaller {
 | 
			
		||||
    @NonNull
 | 
			
		||||
    <I, O> ActivityResultLauncher<I> registerForActivityResult(@NonNull ActivityResultContract<I, O> activityResultContract, @NonNull ActivityResultCallback<O> activityResultCallback);
 | 
			
		||||
 | 
			
		||||
    @NonNull
 | 
			
		||||
    <I, O> ActivityResultLauncher<I> registerForActivityResult(@NonNull ActivityResultContract<I, O> activityResultContract, @NonNull ActivityResultRegistry activityResultRegistry, @NonNull ActivityResultCallback<O> activityResultCallback);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,16 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import kotlin.jvm.functions.Function1;
 | 
			
		||||
/* compiled from: ActivityResultCaller.kt */
 | 
			
		||||
public final class ActivityResultCallerKt$registerForActivityResult$resultLauncher$1<O> implements ActivityResultCallback<O> {
 | 
			
		||||
    public final /* synthetic */ Function1 $callback;
 | 
			
		||||
 | 
			
		||||
    public ActivityResultCallerKt$registerForActivityResult$resultLauncher$1(Function1 function1) {
 | 
			
		||||
        this.$callback = function1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.activity.result.ActivityResultCallback
 | 
			
		||||
    public final void onActivityResult(O o) {
 | 
			
		||||
        this.$callback.invoke(o);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,16 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import kotlin.jvm.functions.Function1;
 | 
			
		||||
/* compiled from: ActivityResultCaller.kt */
 | 
			
		||||
public final class ActivityResultCallerKt$registerForActivityResult$resultLauncher$2<O> implements ActivityResultCallback<O> {
 | 
			
		||||
    public final /* synthetic */ Function1 $callback;
 | 
			
		||||
 | 
			
		||||
    public ActivityResultCallerKt$registerForActivityResult$resultLauncher$2(Function1 function1) {
 | 
			
		||||
        this.$callback = function1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.activity.result.ActivityResultCallback
 | 
			
		||||
    public final void onActivityResult(O o) {
 | 
			
		||||
        this.$callback.invoke(o);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,27 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import androidx.activity.result.contract.ActivityResultContract;
 | 
			
		||||
import d0.z.d.m;
 | 
			
		||||
import kotlin.Unit;
 | 
			
		||||
import kotlin.jvm.functions.Function1;
 | 
			
		||||
/* compiled from: ActivityResultCaller.kt */
 | 
			
		||||
public final class ActivityResultCallerKt {
 | 
			
		||||
    public static final <I, O> ActivityResultLauncher<Unit> registerForActivityResult(ActivityResultCaller activityResultCaller, ActivityResultContract<I, O> activityResultContract, I i, ActivityResultRegistry activityResultRegistry, Function1<? super O, Unit> function1) {
 | 
			
		||||
        m.checkNotNullParameter(activityResultCaller, "$this$registerForActivityResult");
 | 
			
		||||
        m.checkNotNullParameter(activityResultContract, "contract");
 | 
			
		||||
        m.checkNotNullParameter(activityResultRegistry, "registry");
 | 
			
		||||
        m.checkNotNullParameter(function1, "callback");
 | 
			
		||||
        ActivityResultLauncher<I> registerForActivityResult = activityResultCaller.registerForActivityResult(activityResultContract, activityResultRegistry, new ActivityResultCallerKt$registerForActivityResult$resultLauncher$1(function1));
 | 
			
		||||
        m.checkNotNullExpressionValue(registerForActivityResult, "registerForActivityResul…egistry) { callback(it) }");
 | 
			
		||||
        return new ActivityResultCallerLauncher(registerForActivityResult, activityResultContract, i);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static final <I, O> ActivityResultLauncher<Unit> registerForActivityResult(ActivityResultCaller activityResultCaller, ActivityResultContract<I, O> activityResultContract, I i, Function1<? super O, Unit> function1) {
 | 
			
		||||
        m.checkNotNullParameter(activityResultCaller, "$this$registerForActivityResult");
 | 
			
		||||
        m.checkNotNullParameter(activityResultContract, "contract");
 | 
			
		||||
        m.checkNotNullParameter(function1, "callback");
 | 
			
		||||
        ActivityResultLauncher<I> registerForActivityResult = activityResultCaller.registerForActivityResult(activityResultContract, new ActivityResultCallerKt$registerForActivityResult$resultLauncher$2(function1));
 | 
			
		||||
        m.checkNotNullExpressionValue(registerForActivityResult, "registerForActivityResul…ontract) { callback(it) }");
 | 
			
		||||
        return new ActivityResultCallerLauncher(registerForActivityResult, activityResultContract, i);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,48 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import androidx.activity.result.contract.ActivityResultContract;
 | 
			
		||||
import d0.z.d.m;
 | 
			
		||||
import d0.z.d.o;
 | 
			
		||||
import kotlin.Unit;
 | 
			
		||||
import kotlin.jvm.functions.Function0;
 | 
			
		||||
/* compiled from: ActivityResultCaller.kt */
 | 
			
		||||
public final class ActivityResultCallerLauncher$resultContract$2 extends o implements Function0<AnonymousClass1> {
 | 
			
		||||
    public final /* synthetic */ ActivityResultCallerLauncher this$0;
 | 
			
		||||
 | 
			
		||||
    /* compiled from: ActivityResultCaller.kt */
 | 
			
		||||
    /* renamed from: androidx.activity.result.ActivityResultCallerLauncher$resultContract$2$1  reason: invalid class name */
 | 
			
		||||
    public static final class AnonymousClass1 extends ActivityResultContract<Unit, O> {
 | 
			
		||||
        public final /* synthetic */ ActivityResultCallerLauncher$resultContract$2 this$0;
 | 
			
		||||
 | 
			
		||||
        public AnonymousClass1(ActivityResultCallerLauncher$resultContract$2 activityResultCallerLauncher$resultContract$2) {
 | 
			
		||||
            this.this$0 = activityResultCallerLauncher$resultContract$2;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Intent createIntent(Context context, Unit unit) {
 | 
			
		||||
            m.checkNotNullParameter(context, "context");
 | 
			
		||||
            Intent createIntent = this.this$0.this$0.getCallerContract().createIntent(context, this.this$0.this$0.getInput());
 | 
			
		||||
            m.checkNotNullExpressionValue(createIntent, "callerContract.createIntent(context, input)");
 | 
			
		||||
            return createIntent;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* JADX WARNING: Unknown variable types count: 1 */
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        public O parseResult(int i, Intent intent) {
 | 
			
		||||
            return this.this$0.this$0.getCallerContract().parseResult(i, intent);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
 | 
			
		||||
    public ActivityResultCallerLauncher$resultContract$2(ActivityResultCallerLauncher activityResultCallerLauncher) {
 | 
			
		||||
        super(0);
 | 
			
		||||
        this.this$0 = activityResultCallerLauncher;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // kotlin.jvm.functions.Function0
 | 
			
		||||
    /* renamed from: invoke */
 | 
			
		||||
    public final AnonymousClass1 mo1invoke() {
 | 
			
		||||
        return new AnonymousClass1(this);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,55 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import androidx.activity.result.contract.ActivityResultContract;
 | 
			
		||||
import androidx.core.app.ActivityOptionsCompat;
 | 
			
		||||
import d0.g;
 | 
			
		||||
import d0.z.d.m;
 | 
			
		||||
import kotlin.Lazy;
 | 
			
		||||
import kotlin.Unit;
 | 
			
		||||
/* compiled from: ActivityResultCaller.kt */
 | 
			
		||||
public final class ActivityResultCallerLauncher<I, O> extends ActivityResultLauncher<Unit> {
 | 
			
		||||
    private final ActivityResultContract<I, O> callerContract;
 | 
			
		||||
    private final I input;
 | 
			
		||||
    private final ActivityResultLauncher<I> launcher;
 | 
			
		||||
    private final Lazy resultContract$delegate = g.lazy(new ActivityResultCallerLauncher$resultContract$2(this));
 | 
			
		||||
 | 
			
		||||
    public ActivityResultCallerLauncher(ActivityResultLauncher<I> activityResultLauncher, ActivityResultContract<I, O> activityResultContract, I i) {
 | 
			
		||||
        m.checkNotNullParameter(activityResultLauncher, "launcher");
 | 
			
		||||
        m.checkNotNullParameter(activityResultContract, "callerContract");
 | 
			
		||||
        this.launcher = activityResultLauncher;
 | 
			
		||||
        this.callerContract = activityResultContract;
 | 
			
		||||
        this.input = i;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public final ActivityResultContract<I, O> getCallerContract() {
 | 
			
		||||
        return this.callerContract;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* Return type fixed from 'androidx.activity.result.contract.ActivityResultContract<kotlin.Unit, O>' to match base method */
 | 
			
		||||
    /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: androidx.activity.result.contract.ActivityResultContract<kotlin.Unit, O>, androidx.activity.result.contract.ActivityResultContract<kotlin.Unit, ?> */
 | 
			
		||||
    @Override // androidx.activity.result.ActivityResultLauncher
 | 
			
		||||
    public ActivityResultContract<Unit, ?> getContract() {
 | 
			
		||||
        return (ActivityResultContract<Unit, O>) getResultContract();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public final I getInput() {
 | 
			
		||||
        return this.input;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public final ActivityResultLauncher<I> getLauncher() {
 | 
			
		||||
        return this.launcher;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public final ActivityResultContract<Unit, O> getResultContract() {
 | 
			
		||||
        return (ActivityResultContract) this.resultContract$delegate.getValue();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void launch(Unit unit, ActivityOptionsCompat activityOptionsCompat) {
 | 
			
		||||
        this.launcher.launch(this.input, activityOptionsCompat);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // androidx.activity.result.ActivityResultLauncher
 | 
			
		||||
    public void unregister() {
 | 
			
		||||
        this.launcher.unregister();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,16 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import d0.z.d.m;
 | 
			
		||||
/* compiled from: ActivityResult.kt */
 | 
			
		||||
public final class ActivityResultKt {
 | 
			
		||||
    public static final int component1(ActivityResult activityResult) {
 | 
			
		||||
        m.checkNotNullParameter(activityResult, "$this$component1");
 | 
			
		||||
        return activityResult.getResultCode();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static final Intent component2(ActivityResult activityResult) {
 | 
			
		||||
        m.checkNotNullParameter(activityResult, "$this$component2");
 | 
			
		||||
        return activityResult.getData();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import androidx.activity.result.contract.ActivityResultContract;
 | 
			
		||||
import androidx.annotation.MainThread;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
import androidx.core.app.ActivityOptionsCompat;
 | 
			
		||||
public abstract class ActivityResultLauncher<I> {
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public abstract ActivityResultContract<I, ?> getContract();
 | 
			
		||||
 | 
			
		||||
    public void launch(@SuppressLint({"UnknownNullness"}) I i) {
 | 
			
		||||
        launch(i, null);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public abstract void launch(@SuppressLint({"UnknownNullness"}) I i, @Nullable ActivityOptionsCompat activityOptionsCompat);
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public abstract void unregister();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import androidx.core.app.ActivityOptionsCompat;
 | 
			
		||||
import d0.z.d.m;
 | 
			
		||||
import kotlin.Unit;
 | 
			
		||||
/* compiled from: ActivityResultLauncher.kt */
 | 
			
		||||
public final class ActivityResultLauncherKt {
 | 
			
		||||
    public static final void launch(ActivityResultLauncher<Void> activityResultLauncher, ActivityOptionsCompat activityOptionsCompat) {
 | 
			
		||||
        m.checkNotNullParameter(activityResultLauncher, "$this$launch");
 | 
			
		||||
        activityResultLauncher.launch(null, activityOptionsCompat);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static /* synthetic */ void launch$default(ActivityResultLauncher activityResultLauncher, ActivityOptionsCompat activityOptionsCompat, int i, Object obj) {
 | 
			
		||||
        if ((i & 1) != 0) {
 | 
			
		||||
            activityOptionsCompat = null;
 | 
			
		||||
        }
 | 
			
		||||
        launch(activityResultLauncher, activityOptionsCompat);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static final void launchUnit(ActivityResultLauncher<Unit> activityResultLauncher, ActivityOptionsCompat activityOptionsCompat) {
 | 
			
		||||
        m.checkNotNullParameter(activityResultLauncher, "$this$launch");
 | 
			
		||||
        activityResultLauncher.launch(null, activityOptionsCompat);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static /* synthetic */ void launchUnit$default(ActivityResultLauncher activityResultLauncher, ActivityOptionsCompat activityOptionsCompat, int i, Object obj) {
 | 
			
		||||
        if ((i & 1) != 0) {
 | 
			
		||||
            activityOptionsCompat = null;
 | 
			
		||||
        }
 | 
			
		||||
        launchUnit(activityResultLauncher, activityOptionsCompat);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,308 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.util.Log;
 | 
			
		||||
import androidx.activity.result.contract.ActivityResultContract;
 | 
			
		||||
import androidx.annotation.MainThread;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
import androidx.core.app.ActivityOptionsCompat;
 | 
			
		||||
import androidx.lifecycle.Lifecycle;
 | 
			
		||||
import androidx.lifecycle.LifecycleEventObserver;
 | 
			
		||||
import androidx.lifecycle.LifecycleOwner;
 | 
			
		||||
import c.d.b.a.a;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.Iterator;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Random;
 | 
			
		||||
public abstract class ActivityResultRegistry {
 | 
			
		||||
    private static final int INITIAL_REQUEST_CODE_VALUE = 65536;
 | 
			
		||||
    private static final String KEY_COMPONENT_ACTIVITY_PENDING_RESULTS = "KEY_COMPONENT_ACTIVITY_PENDING_RESULT";
 | 
			
		||||
    private static final String KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT = "KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT";
 | 
			
		||||
    private static final String KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS = "KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS";
 | 
			
		||||
    private static final String KEY_COMPONENT_ACTIVITY_REGISTERED_RCS = "KEY_COMPONENT_ACTIVITY_REGISTERED_RCS";
 | 
			
		||||
    private static final String LOG_TAG = "ActivityResultRegistry";
 | 
			
		||||
    public final transient Map<String, CallbackAndContract<?>> mKeyToCallback = new HashMap();
 | 
			
		||||
    private final Map<String, LifecycleContainer> mKeyToLifecycleContainers = new HashMap();
 | 
			
		||||
    private final Map<String, Integer> mKeyToRc = new HashMap();
 | 
			
		||||
    public final Map<String, Object> mParsedPendingResults = new HashMap();
 | 
			
		||||
    public final Bundle mPendingResults = new Bundle();
 | 
			
		||||
    private Random mRandom = new Random();
 | 
			
		||||
    private final Map<Integer, String> mRcToKey = new HashMap();
 | 
			
		||||
 | 
			
		||||
    /* renamed from: androidx.activity.result.ActivityResultRegistry$1  reason: invalid class name */
 | 
			
		||||
    public class AnonymousClass1 implements LifecycleEventObserver {
 | 
			
		||||
        public final /* synthetic */ ActivityResultCallback val$callback;
 | 
			
		||||
        public final /* synthetic */ ActivityResultContract val$contract;
 | 
			
		||||
        public final /* synthetic */ String val$key;
 | 
			
		||||
 | 
			
		||||
        public AnonymousClass1(String str, ActivityResultCallback activityResultCallback, ActivityResultContract activityResultContract) {
 | 
			
		||||
            this.val$key = str;
 | 
			
		||||
            this.val$callback = activityResultCallback;
 | 
			
		||||
            this.val$contract = activityResultContract;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.lifecycle.LifecycleEventObserver
 | 
			
		||||
        public void onStateChanged(@NonNull LifecycleOwner lifecycleOwner, @NonNull Lifecycle.Event event) {
 | 
			
		||||
            if (Lifecycle.Event.ON_START.equals(event)) {
 | 
			
		||||
                ActivityResultRegistry.this.mKeyToCallback.put(this.val$key, new CallbackAndContract<>(this.val$callback, this.val$contract));
 | 
			
		||||
                if (ActivityResultRegistry.this.mParsedPendingResults.containsKey(this.val$key)) {
 | 
			
		||||
                    Object obj = ActivityResultRegistry.this.mParsedPendingResults.get(this.val$key);
 | 
			
		||||
                    ActivityResultRegistry.this.mParsedPendingResults.remove(this.val$key);
 | 
			
		||||
                    this.val$callback.onActivityResult(obj);
 | 
			
		||||
                }
 | 
			
		||||
                ActivityResult activityResult = (ActivityResult) ActivityResultRegistry.this.mPendingResults.getParcelable(this.val$key);
 | 
			
		||||
                if (activityResult != null) {
 | 
			
		||||
                    ActivityResultRegistry.this.mPendingResults.remove(this.val$key);
 | 
			
		||||
                    this.val$callback.onActivityResult(this.val$contract.parseResult(activityResult.getResultCode(), activityResult.getData()));
 | 
			
		||||
                }
 | 
			
		||||
            } else if (Lifecycle.Event.ON_STOP.equals(event)) {
 | 
			
		||||
                ActivityResultRegistry.this.mKeyToCallback.remove(this.val$key);
 | 
			
		||||
            } else if (Lifecycle.Event.ON_DESTROY.equals(event)) {
 | 
			
		||||
                ActivityResultRegistry.this.unregister(this.val$key);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* renamed from: androidx.activity.result.ActivityResultRegistry$2  reason: invalid class name */
 | 
			
		||||
    public class AnonymousClass2 extends ActivityResultLauncher<I> {
 | 
			
		||||
        public final /* synthetic */ ActivityResultContract val$contract;
 | 
			
		||||
        public final /* synthetic */ String val$key;
 | 
			
		||||
        public final /* synthetic */ int val$requestCode;
 | 
			
		||||
 | 
			
		||||
        public AnonymousClass2(int i, ActivityResultContract activityResultContract, String str) {
 | 
			
		||||
            this.val$requestCode = i;
 | 
			
		||||
            this.val$contract = activityResultContract;
 | 
			
		||||
            this.val$key = str;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.ActivityResultLauncher
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public ActivityResultContract<I, ?> getContract() {
 | 
			
		||||
            return this.val$contract;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.ActivityResultLauncher
 | 
			
		||||
        public void launch(I i, @Nullable ActivityOptionsCompat activityOptionsCompat) {
 | 
			
		||||
            ActivityResultRegistry.this.onLaunch(this.val$requestCode, this.val$contract, i, activityOptionsCompat);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.ActivityResultLauncher
 | 
			
		||||
        public void unregister() {
 | 
			
		||||
            ActivityResultRegistry.this.unregister(this.val$key);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* renamed from: androidx.activity.result.ActivityResultRegistry$3  reason: invalid class name */
 | 
			
		||||
    public class AnonymousClass3 extends ActivityResultLauncher<I> {
 | 
			
		||||
        public final /* synthetic */ ActivityResultContract val$contract;
 | 
			
		||||
        public final /* synthetic */ String val$key;
 | 
			
		||||
        public final /* synthetic */ int val$requestCode;
 | 
			
		||||
 | 
			
		||||
        public AnonymousClass3(int i, ActivityResultContract activityResultContract, String str) {
 | 
			
		||||
            this.val$requestCode = i;
 | 
			
		||||
            this.val$contract = activityResultContract;
 | 
			
		||||
            this.val$key = str;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.ActivityResultLauncher
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public ActivityResultContract<I, ?> getContract() {
 | 
			
		||||
            return this.val$contract;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.ActivityResultLauncher
 | 
			
		||||
        public void launch(I i, @Nullable ActivityOptionsCompat activityOptionsCompat) {
 | 
			
		||||
            ActivityResultRegistry.this.onLaunch(this.val$requestCode, this.val$contract, i, activityOptionsCompat);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.ActivityResultLauncher
 | 
			
		||||
        public void unregister() {
 | 
			
		||||
            ActivityResultRegistry.this.unregister(this.val$key);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class CallbackAndContract<O> {
 | 
			
		||||
        public final ActivityResultCallback<O> mCallback;
 | 
			
		||||
        public final ActivityResultContract<?, O> mContract;
 | 
			
		||||
 | 
			
		||||
        public CallbackAndContract(ActivityResultCallback<O> activityResultCallback, ActivityResultContract<?, O> activityResultContract) {
 | 
			
		||||
            this.mCallback = activityResultCallback;
 | 
			
		||||
            this.mContract = activityResultContract;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class LifecycleContainer {
 | 
			
		||||
        public final Lifecycle mLifecycle;
 | 
			
		||||
        private final ArrayList<LifecycleEventObserver> mObservers = new ArrayList<>();
 | 
			
		||||
 | 
			
		||||
        public LifecycleContainer(@NonNull Lifecycle lifecycle) {
 | 
			
		||||
            this.mLifecycle = lifecycle;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void addObserver(@NonNull LifecycleEventObserver lifecycleEventObserver) {
 | 
			
		||||
            this.mLifecycle.addObserver(lifecycleEventObserver);
 | 
			
		||||
            this.mObservers.add(lifecycleEventObserver);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void clearObservers() {
 | 
			
		||||
            Iterator<LifecycleEventObserver> it = this.mObservers.iterator();
 | 
			
		||||
            while (it.hasNext()) {
 | 
			
		||||
                this.mLifecycle.removeObserver(it.next());
 | 
			
		||||
            }
 | 
			
		||||
            this.mObservers.clear();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void bindRcKey(int i, String str) {
 | 
			
		||||
        this.mRcToKey.put(Integer.valueOf(i), str);
 | 
			
		||||
        this.mKeyToRc.put(str, Integer.valueOf(i));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private <O> void doDispatch(String str, int i, @Nullable Intent intent, @Nullable CallbackAndContract<O> callbackAndContract) {
 | 
			
		||||
        ActivityResultCallback<O> activityResultCallback;
 | 
			
		||||
        if (callbackAndContract == null || (activityResultCallback = callbackAndContract.mCallback) == null) {
 | 
			
		||||
            this.mParsedPendingResults.remove(str);
 | 
			
		||||
            this.mPendingResults.putParcelable(str, new ActivityResult(i, intent));
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        activityResultCallback.onActivityResult(callbackAndContract.mContract.parseResult(i, intent));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private int generateRandomNumber() {
 | 
			
		||||
        int nextInt = this.mRandom.nextInt(2147418112);
 | 
			
		||||
        while (true) {
 | 
			
		||||
            int i = nextInt + 65536;
 | 
			
		||||
            if (!this.mRcToKey.containsKey(Integer.valueOf(i))) {
 | 
			
		||||
                return i;
 | 
			
		||||
            }
 | 
			
		||||
            nextInt = this.mRandom.nextInt(2147418112);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private int registerKey(String str) {
 | 
			
		||||
        Integer num = this.mKeyToRc.get(str);
 | 
			
		||||
        if (num != null) {
 | 
			
		||||
            return num.intValue();
 | 
			
		||||
        }
 | 
			
		||||
        int generateRandomNumber = generateRandomNumber();
 | 
			
		||||
        bindRcKey(generateRandomNumber, str);
 | 
			
		||||
        return generateRandomNumber;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public final boolean dispatchResult(int i, int i2, @Nullable Intent intent) {
 | 
			
		||||
        String str = this.mRcToKey.get(Integer.valueOf(i));
 | 
			
		||||
        if (str == null) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        doDispatch(str, i2, intent, this.mKeyToCallback.get(str));
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public final <O> boolean dispatchResult(int i, @SuppressLint({"UnknownNullness"}) O o) {
 | 
			
		||||
        ActivityResultCallback<?> activityResultCallback;
 | 
			
		||||
        String str = this.mRcToKey.get(Integer.valueOf(i));
 | 
			
		||||
        if (str == null) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        CallbackAndContract<?> callbackAndContract = this.mKeyToCallback.get(str);
 | 
			
		||||
        if (callbackAndContract == null || (activityResultCallback = callbackAndContract.mCallback) == null) {
 | 
			
		||||
            this.mPendingResults.remove(str);
 | 
			
		||||
            this.mParsedPendingResults.put(str, o);
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        activityResultCallback.onActivityResult(o);
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public abstract <I, O> void onLaunch(int i, @NonNull ActivityResultContract<I, O> activityResultContract, @SuppressLint({"UnknownNullness"}) I i2, @Nullable ActivityOptionsCompat activityOptionsCompat);
 | 
			
		||||
 | 
			
		||||
    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");
 | 
			
		||||
            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"));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    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);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* JADX DEBUG: Multi-variable search result rejected for r6v0, resolved type: androidx.activity.result.ActivityResultCallback<O> */
 | 
			
		||||
    /* JADX WARN: Multi-variable type inference failed */
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public final <I, O> ActivityResultLauncher<I> register(@NonNull String str, @NonNull ActivityResultContract<I, O> activityResultContract, @NonNull ActivityResultCallback<O> activityResultCallback) {
 | 
			
		||||
        int registerKey = registerKey(str);
 | 
			
		||||
        this.mKeyToCallback.put(str, new CallbackAndContract<>(activityResultCallback, activityResultContract));
 | 
			
		||||
        if (this.mParsedPendingResults.containsKey(str)) {
 | 
			
		||||
            Object obj = this.mParsedPendingResults.get(str);
 | 
			
		||||
            this.mParsedPendingResults.remove(str);
 | 
			
		||||
            activityResultCallback.onActivityResult(obj);
 | 
			
		||||
        }
 | 
			
		||||
        ActivityResult activityResult = (ActivityResult) this.mPendingResults.getParcelable(str);
 | 
			
		||||
        if (activityResult != null) {
 | 
			
		||||
            this.mPendingResults.remove(str);
 | 
			
		||||
            activityResultCallback.onActivityResult(activityResultContract.parseResult(activityResult.getResultCode(), activityResult.getData()));
 | 
			
		||||
        }
 | 
			
		||||
        return new AnonymousClass3(registerKey, activityResultContract, str);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public final <I, O> ActivityResultLauncher<I> register(@NonNull String str, @NonNull LifecycleOwner lifecycleOwner, @NonNull ActivityResultContract<I, O> activityResultContract, @NonNull ActivityResultCallback<O> activityResultCallback) {
 | 
			
		||||
        Lifecycle lifecycle = lifecycleOwner.getLifecycle();
 | 
			
		||||
        if (!lifecycle.getCurrentState().isAtLeast(Lifecycle.State.STARTED)) {
 | 
			
		||||
            int registerKey = registerKey(str);
 | 
			
		||||
            LifecycleContainer lifecycleContainer = this.mKeyToLifecycleContainers.get(str);
 | 
			
		||||
            if (lifecycleContainer == null) {
 | 
			
		||||
                lifecycleContainer = new LifecycleContainer(lifecycle);
 | 
			
		||||
            }
 | 
			
		||||
            lifecycleContainer.addObserver(new AnonymousClass1(str, activityResultCallback, activityResultContract));
 | 
			
		||||
            this.mKeyToLifecycleContainers.put(str, lifecycleContainer);
 | 
			
		||||
            return new AnonymousClass2(registerKey, activityResultContract, str);
 | 
			
		||||
        }
 | 
			
		||||
        throw new IllegalStateException("LifecycleOwner " + lifecycleOwner + " is attempting to register while current state is " + lifecycle.getCurrentState() + ". LifecycleOwners must call register before they are STARTED.");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @MainThread
 | 
			
		||||
    public final void unregister(@NonNull String str) {
 | 
			
		||||
        Integer remove = this.mKeyToRc.remove(str);
 | 
			
		||||
        if (remove != null) {
 | 
			
		||||
            this.mRcToKey.remove(remove);
 | 
			
		||||
        }
 | 
			
		||||
        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());
 | 
			
		||||
            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());
 | 
			
		||||
            this.mPendingResults.remove(str);
 | 
			
		||||
        }
 | 
			
		||||
        LifecycleContainer lifecycleContainer = this.mKeyToLifecycleContainers.get(str);
 | 
			
		||||
        if (lifecycleContainer != null) {
 | 
			
		||||
            lifecycleContainer.clearObservers();
 | 
			
		||||
            this.mKeyToLifecycleContainers.remove(str);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
public interface ActivityResultRegistryOwner {
 | 
			
		||||
    @NonNull
 | 
			
		||||
    ActivityResultRegistry getActivityResultRegistry();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,112 @@
 | 
			
		|||
package androidx.activity.result;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.app.PendingIntent;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.content.IntentSender;
 | 
			
		||||
import android.os.Parcel;
 | 
			
		||||
import android.os.Parcelable;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
@SuppressLint({"BanParcelableUsage"})
 | 
			
		||||
public final class IntentSenderRequest implements Parcelable {
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public static final Parcelable.Creator<IntentSenderRequest> CREATOR = new AnonymousClass1();
 | 
			
		||||
    @Nullable
 | 
			
		||||
    private final Intent mFillInIntent;
 | 
			
		||||
    private final int mFlagsMask;
 | 
			
		||||
    private final int mFlagsValues;
 | 
			
		||||
    @NonNull
 | 
			
		||||
    private final IntentSender mIntentSender;
 | 
			
		||||
 | 
			
		||||
    /* renamed from: androidx.activity.result.IntentSenderRequest$1  reason: invalid class name */
 | 
			
		||||
    public class AnonymousClass1 implements Parcelable.Creator<IntentSenderRequest> {
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public IntentSenderRequest createFromParcel(Parcel parcel) {
 | 
			
		||||
            return new IntentSenderRequest(parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // android.os.Parcelable.Creator
 | 
			
		||||
        public IntentSenderRequest[] newArray(int i) {
 | 
			
		||||
            return new IntentSenderRequest[i];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static final class Builder {
 | 
			
		||||
        private Intent mFillInIntent;
 | 
			
		||||
        private int mFlagsMask;
 | 
			
		||||
        private int mFlagsValues;
 | 
			
		||||
        private IntentSender mIntentSender;
 | 
			
		||||
 | 
			
		||||
        public Builder(@NonNull PendingIntent pendingIntent) {
 | 
			
		||||
            this(pendingIntent.getIntentSender());
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Builder(@NonNull IntentSender intentSender) {
 | 
			
		||||
            this.mIntentSender = intentSender;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public IntentSenderRequest build() {
 | 
			
		||||
            return new IntentSenderRequest(this.mIntentSender, this.mFillInIntent, this.mFlagsMask, this.mFlagsValues);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public Builder setFillInIntent(@Nullable Intent intent) {
 | 
			
		||||
            this.mFillInIntent = intent;
 | 
			
		||||
            return this;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public Builder setFlags(int i, int i2) {
 | 
			
		||||
            this.mFlagsValues = i;
 | 
			
		||||
            this.mFlagsMask = i2;
 | 
			
		||||
            return this;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public IntentSenderRequest(@NonNull IntentSender intentSender, @Nullable Intent intent, int i, int i2) {
 | 
			
		||||
        this.mIntentSender = intentSender;
 | 
			
		||||
        this.mFillInIntent = intent;
 | 
			
		||||
        this.mFlagsMask = i;
 | 
			
		||||
        this.mFlagsValues = i2;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public IntentSenderRequest(@NonNull Parcel parcel) {
 | 
			
		||||
        this.mIntentSender = (IntentSender) parcel.readParcelable(IntentSender.class.getClassLoader());
 | 
			
		||||
        this.mFillInIntent = (Intent) parcel.readParcelable(Intent.class.getClassLoader());
 | 
			
		||||
        this.mFlagsMask = parcel.readInt();
 | 
			
		||||
        this.mFlagsValues = parcel.readInt();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public int describeContents() {
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Nullable
 | 
			
		||||
    public Intent getFillInIntent() {
 | 
			
		||||
        return this.mFillInIntent;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public int getFlagsMask() {
 | 
			
		||||
        return this.mFlagsMask;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public int getFlagsValues() {
 | 
			
		||||
        return this.mFlagsValues;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public IntentSender getIntentSender() {
 | 
			
		||||
        return this.mIntentSender;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override // android.os.Parcelable
 | 
			
		||||
    public void writeToParcel(@NonNull Parcel parcel, int i) {
 | 
			
		||||
        parcel.writeParcelable(this.mIntentSender, i);
 | 
			
		||||
        parcel.writeParcelable(this.mFillInIntent, i);
 | 
			
		||||
        parcel.writeInt(this.mFlagsMask);
 | 
			
		||||
        parcel.writeInt(this.mFlagsValues);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,34 @@
 | 
			
		|||
package androidx.activity.result.contract;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
public abstract class ActivityResultContract<I, O> {
 | 
			
		||||
 | 
			
		||||
    public static final class SynchronousResult<T> {
 | 
			
		||||
        @SuppressLint({"UnknownNullness"})
 | 
			
		||||
        private final T mValue;
 | 
			
		||||
 | 
			
		||||
        public SynchronousResult(@SuppressLint({"UnknownNullness"}) T t) {
 | 
			
		||||
            this.mValue = t;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @SuppressLint({"UnknownNullness"})
 | 
			
		||||
        public T getValue() {
 | 
			
		||||
            return this.mValue;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @NonNull
 | 
			
		||||
    public abstract Intent createIntent(@NonNull Context context, @SuppressLint({"UnknownNullness"}) I i);
 | 
			
		||||
 | 
			
		||||
    @Nullable
 | 
			
		||||
    public SynchronousResult<O> getSynchronousResult(@NonNull Context context, @SuppressLint({"UnknownNullness"}) I i) {
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressLint({"UnknownNullness"})
 | 
			
		||||
    public abstract O parseResult(int i, @Nullable Intent intent);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,388 @@
 | 
			
		|||
package androidx.activity.result.contract;
 | 
			
		||||
 | 
			
		||||
import android.annotation.TargetApi;
 | 
			
		||||
import android.content.ClipData;
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.graphics.Bitmap;
 | 
			
		||||
import android.net.Uri;
 | 
			
		||||
import android.os.Build;
 | 
			
		||||
import androidx.activity.result.ActivityResult;
 | 
			
		||||
import androidx.activity.result.IntentSenderRequest;
 | 
			
		||||
import androidx.activity.result.contract.ActivityResultContract;
 | 
			
		||||
import androidx.annotation.CallSuper;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
import androidx.collection.ArrayMap;
 | 
			
		||||
import androidx.core.content.ContextCompat;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.LinkedHashSet;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
public final class ActivityResultContracts {
 | 
			
		||||
 | 
			
		||||
    @TargetApi(19)
 | 
			
		||||
    public static class CreateDocument extends ActivityResultContract<String, Uri> {
 | 
			
		||||
        @NonNull
 | 
			
		||||
        @CallSuper
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @NonNull String str) {
 | 
			
		||||
            return new Intent("android.intent.action.CREATE_DOCUMENT").setType("*/*").putExtra("android.intent.extra.TITLE", str);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final ActivityResultContract.SynchronousResult<Uri> getSynchronousResult(@NonNull Context context, @NonNull String str) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final Uri parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            if (intent == null || i != -1) {
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
            return intent.getData();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class GetContent extends ActivityResultContract<String, Uri> {
 | 
			
		||||
        @NonNull
 | 
			
		||||
        @CallSuper
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @NonNull String str) {
 | 
			
		||||
            return new Intent("android.intent.action.GET_CONTENT").addCategory("android.intent.category.OPENABLE").setType(str);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final ActivityResultContract.SynchronousResult<Uri> getSynchronousResult(@NonNull Context context, @NonNull String str) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final Uri parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            if (intent == null || i != -1) {
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
            return intent.getData();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @TargetApi(18)
 | 
			
		||||
    public static class GetMultipleContents extends ActivityResultContract<String, List<Uri>> {
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public static List<Uri> getClipDataUris(@NonNull Intent intent) {
 | 
			
		||||
            LinkedHashSet linkedHashSet = new LinkedHashSet();
 | 
			
		||||
            if (intent.getData() != null) {
 | 
			
		||||
                linkedHashSet.add(intent.getData());
 | 
			
		||||
            }
 | 
			
		||||
            ClipData clipData = intent.getClipData();
 | 
			
		||||
            if (clipData == null && linkedHashSet.isEmpty()) {
 | 
			
		||||
                return Collections.emptyList();
 | 
			
		||||
            }
 | 
			
		||||
            if (clipData != null) {
 | 
			
		||||
                for (int i = 0; i < clipData.getItemCount(); i++) {
 | 
			
		||||
                    Uri uri = clipData.getItemAt(i).getUri();
 | 
			
		||||
                    if (uri != null) {
 | 
			
		||||
                        linkedHashSet.add(uri);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return new ArrayList(linkedHashSet);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @NonNull
 | 
			
		||||
        @CallSuper
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @NonNull String str) {
 | 
			
		||||
            return new Intent("android.intent.action.GET_CONTENT").addCategory("android.intent.category.OPENABLE").setType(str).putExtra("android.intent.extra.ALLOW_MULTIPLE", true);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final ActivityResultContract.SynchronousResult<List<Uri>> getSynchronousResult(@NonNull Context context, @NonNull String str) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public final List<Uri> parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            return (intent == null || i != -1) ? Collections.emptyList() : getClipDataUris(intent);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @TargetApi(19)
 | 
			
		||||
    public static class OpenDocument extends ActivityResultContract<String[], Uri> {
 | 
			
		||||
        @NonNull
 | 
			
		||||
        @CallSuper
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @NonNull String[] strArr) {
 | 
			
		||||
            return new Intent("android.intent.action.OPEN_DOCUMENT").putExtra("android.intent.extra.MIME_TYPES", strArr).setType("*/*");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final ActivityResultContract.SynchronousResult<Uri> getSynchronousResult(@NonNull Context context, @NonNull String[] strArr) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final Uri parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            if (intent == null || i != -1) {
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
            return intent.getData();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @TargetApi(21)
 | 
			
		||||
    public static class OpenDocumentTree extends ActivityResultContract<Uri, Uri> {
 | 
			
		||||
        @NonNull
 | 
			
		||||
        @CallSuper
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @Nullable Uri uri) {
 | 
			
		||||
            Intent intent = new Intent("android.intent.action.OPEN_DOCUMENT_TREE");
 | 
			
		||||
            if (Build.VERSION.SDK_INT >= 26 && uri != null) {
 | 
			
		||||
                intent.putExtra("android.provider.extra.INITIAL_URI", uri);
 | 
			
		||||
            }
 | 
			
		||||
            return intent;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final ActivityResultContract.SynchronousResult<Uri> getSynchronousResult(@NonNull Context context, @Nullable Uri uri) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final Uri parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            if (intent == null || i != -1) {
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
            return intent.getData();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @TargetApi(19)
 | 
			
		||||
    public static class OpenMultipleDocuments extends ActivityResultContract<String[], List<Uri>> {
 | 
			
		||||
        @NonNull
 | 
			
		||||
        @CallSuper
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @NonNull String[] strArr) {
 | 
			
		||||
            return new Intent("android.intent.action.OPEN_DOCUMENT").putExtra("android.intent.extra.MIME_TYPES", strArr).putExtra("android.intent.extra.ALLOW_MULTIPLE", true).setType("*/*");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final ActivityResultContract.SynchronousResult<List<Uri>> getSynchronousResult(@NonNull Context context, @NonNull String[] strArr) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public final List<Uri> parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            return (i != -1 || intent == null) ? Collections.emptyList() : GetMultipleContents.getClipDataUris(intent);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static final class PickContact extends ActivityResultContract<Void, Uri> {
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @Nullable Void r2) {
 | 
			
		||||
            return new Intent("android.intent.action.PICK").setType("vnd.android.cursor.dir/contact");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public Uri parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            if (intent == null || i != -1) {
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
            return intent.getData();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static final class RequestMultiplePermissions extends ActivityResultContract<String[], Map<String, Boolean>> {
 | 
			
		||||
        public static final String ACTION_REQUEST_PERMISSIONS = "androidx.activity.result.contract.action.REQUEST_PERMISSIONS";
 | 
			
		||||
        public static final String EXTRA_PERMISSIONS = "androidx.activity.result.contract.extra.PERMISSIONS";
 | 
			
		||||
        public static final String EXTRA_PERMISSION_GRANT_RESULTS = "androidx.activity.result.contract.extra.PERMISSION_GRANT_RESULTS";
 | 
			
		||||
 | 
			
		||||
        @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);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @NonNull String[] strArr) {
 | 
			
		||||
            return createIntent(strArr);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public ActivityResultContract.SynchronousResult<Map<String, Boolean>> getSynchronousResult(@NonNull Context context, @Nullable String[] strArr) {
 | 
			
		||||
            if (strArr == null || strArr.length == 0) {
 | 
			
		||||
                return new ActivityResultContract.SynchronousResult<>(Collections.emptyMap());
 | 
			
		||||
            }
 | 
			
		||||
            ArrayMap arrayMap = new ArrayMap();
 | 
			
		||||
            boolean z2 = true;
 | 
			
		||||
            for (String str : strArr) {
 | 
			
		||||
                boolean z3 = ContextCompat.checkSelfPermission(context, str) == 0;
 | 
			
		||||
                arrayMap.put(str, Boolean.valueOf(z3));
 | 
			
		||||
                if (!z3) {
 | 
			
		||||
                    z2 = false;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            if (z2) {
 | 
			
		||||
                return new ActivityResultContract.SynchronousResult<>(arrayMap);
 | 
			
		||||
            }
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public Map<String, Boolean> parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            if (i != -1) {
 | 
			
		||||
                return Collections.emptyMap();
 | 
			
		||||
            }
 | 
			
		||||
            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");
 | 
			
		||||
            if (intArrayExtra == null || stringArrayExtra == null) {
 | 
			
		||||
                return Collections.emptyMap();
 | 
			
		||||
            }
 | 
			
		||||
            HashMap hashMap = new HashMap();
 | 
			
		||||
            int length = stringArrayExtra.length;
 | 
			
		||||
            for (int i2 = 0; i2 < length; i2++) {
 | 
			
		||||
                hashMap.put(stringArrayExtra[i2], Boolean.valueOf(intArrayExtra[i2] == 0));
 | 
			
		||||
            }
 | 
			
		||||
            return hashMap;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static final class RequestPermission extends ActivityResultContract<String, Boolean> {
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @NonNull String str) {
 | 
			
		||||
            return RequestMultiplePermissions.createIntent(new String[]{str});
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public ActivityResultContract.SynchronousResult<Boolean> getSynchronousResult(@NonNull Context context, @Nullable String str) {
 | 
			
		||||
            if (str == null) {
 | 
			
		||||
                return new ActivityResultContract.SynchronousResult<>(Boolean.FALSE);
 | 
			
		||||
            }
 | 
			
		||||
            if (ContextCompat.checkSelfPermission(context, str) == 0) {
 | 
			
		||||
                return new ActivityResultContract.SynchronousResult<>(Boolean.TRUE);
 | 
			
		||||
            }
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public Boolean parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            if (intent == null || i != -1) {
 | 
			
		||||
                return Boolean.FALSE;
 | 
			
		||||
            }
 | 
			
		||||
            int[] intArrayExtra = intent.getIntArrayExtra("androidx.activity.result.contract.extra.PERMISSION_GRANT_RESULTS");
 | 
			
		||||
            if (intArrayExtra == null || intArrayExtra.length == 0) {
 | 
			
		||||
                return Boolean.FALSE;
 | 
			
		||||
            }
 | 
			
		||||
            boolean z2 = false;
 | 
			
		||||
            if (intArrayExtra[0] == 0) {
 | 
			
		||||
                z2 = true;
 | 
			
		||||
            }
 | 
			
		||||
            return Boolean.valueOf(z2);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static final class StartActivityForResult extends ActivityResultContract<Intent, ActivityResult> {
 | 
			
		||||
        public static final String EXTRA_ACTIVITY_OPTIONS_BUNDLE = "androidx.activity.result.contract.extra.ACTIVITY_OPTIONS_BUNDLE";
 | 
			
		||||
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @NonNull Intent intent) {
 | 
			
		||||
            return intent;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public ActivityResult parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            return new ActivityResult(i, intent);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static final class StartIntentSenderForResult extends ActivityResultContract<IntentSenderRequest, ActivityResult> {
 | 
			
		||||
        public static final String ACTION_INTENT_SENDER_REQUEST = "androidx.activity.result.contract.action.INTENT_SENDER_REQUEST";
 | 
			
		||||
        public static final String EXTRA_INTENT_SENDER_REQUEST = "androidx.activity.result.contract.extra.INTENT_SENDER_REQUEST";
 | 
			
		||||
        public static final String EXTRA_SEND_INTENT_EXCEPTION = "androidx.activity.result.contract.extra.SEND_INTENT_EXCEPTION";
 | 
			
		||||
 | 
			
		||||
        @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);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public ActivityResult parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            return new ActivityResult(i, intent);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class TakePicture extends ActivityResultContract<Uri, Boolean> {
 | 
			
		||||
        @NonNull
 | 
			
		||||
        @CallSuper
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @NonNull Uri uri) {
 | 
			
		||||
            return new Intent("android.media.action.IMAGE_CAPTURE").putExtra("output", uri);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final ActivityResultContract.SynchronousResult<Boolean> getSynchronousResult(@NonNull Context context, @NonNull Uri uri) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @NonNull
 | 
			
		||||
        public final Boolean parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            return Boolean.valueOf(i == -1);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class TakePicturePreview extends ActivityResultContract<Void, Bitmap> {
 | 
			
		||||
        @NonNull
 | 
			
		||||
        @CallSuper
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @Nullable Void r2) {
 | 
			
		||||
            return new Intent("android.media.action.IMAGE_CAPTURE");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final ActivityResultContract.SynchronousResult<Bitmap> getSynchronousResult(@NonNull Context context, @Nullable Void r2) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final Bitmap parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            if (intent == null || i != -1) {
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
            return (Bitmap) intent.getParcelableExtra("data");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static class TakeVideo extends ActivityResultContract<Uri, Bitmap> {
 | 
			
		||||
        @NonNull
 | 
			
		||||
        @CallSuper
 | 
			
		||||
        public Intent createIntent(@NonNull Context context, @NonNull Uri uri) {
 | 
			
		||||
            return new Intent("android.media.action.VIDEO_CAPTURE").putExtra("output", uri);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final ActivityResultContract.SynchronousResult<Bitmap> getSynchronousResult(@NonNull Context context, @NonNull Uri uri) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override // androidx.activity.result.contract.ActivityResultContract
 | 
			
		||||
        @Nullable
 | 
			
		||||
        public final Bitmap parseResult(int i, @Nullable Intent intent) {
 | 
			
		||||
            if (intent == null || i != -1) {
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
            return (Bitmap) intent.getParcelableExtra("data");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private ActivityResultContracts() {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								app/src/main/java/androidx/annotation/AnimRes.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
package androidx.annotation;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Documented;
 | 
			
		||||
import java.lang.annotation.ElementType;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
import java.lang.annotation.Target;
 | 
			
		||||
@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.LOCAL_VARIABLE})
 | 
			
		||||
@Documented
 | 
			
		||||
@Retention(RetentionPolicy.CLASS)
 | 
			
		||||
public @interface AnimRes {
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								app/src/main/java/androidx/annotation/AnimatorRes.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
package androidx.annotation;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Documented;
 | 
			
		||||
import java.lang.annotation.ElementType;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
import java.lang.annotation.Target;
 | 
			
		||||
@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.LOCAL_VARIABLE})
 | 
			
		||||
@Documented
 | 
			
		||||
@Retention(RetentionPolicy.CLASS)
 | 
			
		||||
public @interface AnimatorRes {
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								app/src/main/java/androidx/annotation/AnyRes.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
package androidx.annotation;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Documented;
 | 
			
		||||
import java.lang.annotation.ElementType;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
import java.lang.annotation.Target;
 | 
			
		||||
@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.LOCAL_VARIABLE})
 | 
			
		||||
@Documented
 | 
			
		||||
@Retention(RetentionPolicy.CLASS)
 | 
			
		||||
public @interface AnyRes {
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								app/src/main/java/androidx/annotation/AnyThread.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
package androidx.annotation;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Documented;
 | 
			
		||||
import java.lang.annotation.ElementType;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
import java.lang.annotation.Target;
 | 
			
		||||
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE, ElementType.PARAMETER})
 | 
			
		||||
@Documented
 | 
			
		||||
@Retention(RetentionPolicy.CLASS)
 | 
			
		||||
public @interface AnyThread {
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								app/src/main/java/androidx/annotation/ArrayRes.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
package androidx.annotation;
 | 
			
		||||
 | 
			
		||||
import java.lang.annotation.Documented;
 | 
			
		||||
import java.lang.annotation.ElementType;
 | 
			
		||||
import java.lang.annotation.Retention;
 | 
			
		||||
import java.lang.annotation.RetentionPolicy;
 | 
			
		||||
import java.lang.annotation.Target;
 | 
			
		||||
@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.LOCAL_VARIABLE})
 | 
			
		||||
@Documented
 | 
			
		||||
@Retention(RetentionPolicy.CLASS)
 | 
			
		||||
public @interface ArrayRes {
 | 
			
		||||
}
 | 
			
		||||