mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-14 18:07:16 +01:00
75 lines
4.5 KiB
Java
75 lines
4.5 KiB
Java
package androidx.credentials.playservices;
|
|
|
|
import android.app.Activity;
|
|
import android.app.PendingIntent;
|
|
import android.content.Intent;
|
|
import android.os.Bundle;
|
|
import android.os.ResultReceiver;
|
|
import androidx.annotation.RestrictTo;
|
|
import androidx.credentials.playservices.controllers.CredentialProviderBaseController;
|
|
import kotlin.Metadata;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0017\u0018\u0000 \u00142\u00020\u0001:\u0001\u0014B\u0005¢\u0006\u0002\u0010\u0002J\"\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\n2\b\u0010\f\u001a\u0004\u0018\u00010\rH\u0014J\u0012\u0010\u000e\u001a\u00020\b2\b\u0010\u000f\u001a\u0004\u0018\u00010\u0010H\u0014J\u0010\u0010\u0011\u001a\u00020\b2\u0006\u0010\u0012\u001a\u00020\u0010H\u0014J\u0012\u0010\u0013\u001a\u00020\b2\b\u0010\u000f\u001a\u0004\u0018\u00010\u0010H\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0006X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u0015"}, d2 = {"Landroidx/credentials/playservices/IdentityCredentialApiHiddenActivity;", "Landroid/app/Activity;", "()V", "mWaitingForActivityResult", "", "resultReceiver", "Landroid/os/ResultReceiver;", "onActivityResult", "", "requestCode", "", "resultCode", "data", "Landroid/content/Intent;", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "onSaveInstanceState", "outState", "restoreState", "Companion", "credentials-play-services-auth_release"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
/* loaded from: classes13.dex */
|
|
public class IdentityCredentialApiHiddenActivity extends Activity {
|
|
|
|
@NotNull
|
|
private static final String KEY_AWAITING_RESULT = "androidx.credentials.playservices.AWAITING_RESULT";
|
|
private boolean mWaitingForActivityResult;
|
|
|
|
@Nullable
|
|
private ResultReceiver resultReceiver;
|
|
|
|
private final void restoreState(Bundle savedInstanceState) {
|
|
if (savedInstanceState != null) {
|
|
this.mWaitingForActivityResult = savedInstanceState.getBoolean(KEY_AWAITING_RESULT, false);
|
|
}
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
|
super.onActivityResult(requestCode, resultCode, data);
|
|
ResultReceiver resultReceiver = this.resultReceiver;
|
|
if (resultReceiver != null) {
|
|
CredentialProviderBaseController.INSTANCE.reportResult$credentials_play_services_auth_release(resultReceiver, requestCode, resultCode, data);
|
|
}
|
|
this.mWaitingForActivityResult = false;
|
|
finish();
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
overridePendingTransition(0, 0);
|
|
ResultReceiver resultReceiver = (ResultReceiver) getIntent().getParcelableExtra(CredentialProviderBaseController.RESULT_RECEIVER_TAG);
|
|
this.resultReceiver = resultReceiver;
|
|
if (resultReceiver == null) {
|
|
finish();
|
|
}
|
|
restoreState(savedInstanceState);
|
|
if (this.mWaitingForActivityResult) {
|
|
return;
|
|
}
|
|
PendingIntent pendingIntent = (PendingIntent) getIntent().getParcelableExtra(CredentialProviderBaseController.EXTRA_GET_CREDENTIAL_INTENT);
|
|
if (pendingIntent != null) {
|
|
startIntentSenderForResult(pendingIntent.getIntentSender(), CredentialProviderBaseController.INSTANCE.getCONTROLLER_REQUEST_CODE$credentials_play_services_auth_release(), null, 0, 0, 0, null);
|
|
return;
|
|
}
|
|
ResultReceiver resultReceiver2 = this.resultReceiver;
|
|
if (resultReceiver2 != null) {
|
|
CredentialProviderBaseController.INSTANCE.reportError$credentials_play_services_auth_release(resultReceiver2, CredentialProviderBaseController.GET_UNKNOWN, "Internal error");
|
|
}
|
|
finish();
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
public void onSaveInstanceState(@NotNull Bundle outState) {
|
|
outState.getClass();
|
|
outState.putBoolean(KEY_AWAITING_RESULT, this.mWaitingForActivityResult);
|
|
super.onSaveInstanceState(outState);
|
|
}
|
|
}
|