- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
222 lines
10 KiB
Java
222 lines
10 KiB
Java
package androidx.credentials.provider;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.app.PendingIntent;
|
|
import android.app.slice.Slice;
|
|
import android.app.slice.SliceItem;
|
|
import android.net.Uri;
|
|
import android.os.Build;
|
|
import android.os.Bundle;
|
|
import androidx.annotation.RequiresApi;
|
|
import androidx.annotation.RestrictTo;
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import kotlin.collections.CollectionsKt__CollectionsJVMKt;
|
|
import kotlin.collections.CollectionsKt__CollectionsKt;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
|
|
@SourceDebugExtension({"SMAP\nAuthenticationAction.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AuthenticationAction.kt\nandroidx/credentials/provider/AuthenticationAction\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,231:1\n1#2:232\n*E\n"})
|
|
/* loaded from: classes.dex */
|
|
public final class AuthenticationAction {
|
|
public static final Companion Companion = new Companion(null);
|
|
private static final String EXTRA_AUTH_ACTION_PENDING_INTENT_PREFIX = "androidx.credentials.provider.extra.AUTH_ACTION_PENDING_INTENT_";
|
|
private static final String EXTRA_AUTH_ACTION_SIZE = "androidx.credentials.provider.extra.AUTH_ACTION_SIZE";
|
|
private static final String EXTRA_AUTH_ACTION_TITLE_PREFIX = "androidx.credentials.provider.extra.AUTH_ACTION_TITLE_";
|
|
private static final String SLICE_HINT_PENDING_INTENT = "androidx.credentials.provider.authenticationAction.SLICE_HINT_PENDING_INTENT";
|
|
private static final String SLICE_HINT_TITLE = "androidx.credentials.provider.authenticationAction.SLICE_HINT_TITLE";
|
|
private static final int SLICE_SPEC_REVISION = 0;
|
|
private static final String SLICE_SPEC_TYPE = "AuthenticationAction";
|
|
private static final String TAG = "AuthenticationAction";
|
|
private final PendingIntent pendingIntent;
|
|
private final CharSequence title;
|
|
|
|
@RequiresApi(34)
|
|
public static final AuthenticationAction fromAction(android.service.credentials.Action action) {
|
|
return Companion.fromAction(action);
|
|
}
|
|
|
|
@RequiresApi(28)
|
|
@SuppressLint({"WrongConstant"})
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
public static final AuthenticationAction fromSlice(Slice slice) {
|
|
return Companion.fromSlice(slice);
|
|
}
|
|
|
|
@RequiresApi(28)
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
public static final Slice toSlice(AuthenticationAction authenticationAction) {
|
|
return Companion.toSlice(authenticationAction);
|
|
}
|
|
|
|
public final PendingIntent getPendingIntent() {
|
|
return this.pendingIntent;
|
|
}
|
|
|
|
public final CharSequence getTitle() {
|
|
return this.title;
|
|
}
|
|
|
|
public AuthenticationAction(CharSequence title, PendingIntent pendingIntent) {
|
|
Intrinsics.checkNotNullParameter(title, "title");
|
|
Intrinsics.checkNotNullParameter(pendingIntent, "pendingIntent");
|
|
this.title = title;
|
|
this.pendingIntent = pendingIntent;
|
|
if (title.length() <= 0) {
|
|
throw new IllegalArgumentException("title must not be empty".toString());
|
|
}
|
|
}
|
|
|
|
public static final class Builder {
|
|
private final PendingIntent pendingIntent;
|
|
private final CharSequence title;
|
|
|
|
public Builder(CharSequence title, PendingIntent pendingIntent) {
|
|
Intrinsics.checkNotNullParameter(title, "title");
|
|
Intrinsics.checkNotNullParameter(pendingIntent, "pendingIntent");
|
|
this.title = title;
|
|
this.pendingIntent = pendingIntent;
|
|
}
|
|
|
|
public final AuthenticationAction build() {
|
|
return new AuthenticationAction(this.title, this.pendingIntent);
|
|
}
|
|
}
|
|
|
|
@RequiresApi(34)
|
|
public static final class Api34Impl {
|
|
public static final Api34Impl INSTANCE = new Api34Impl();
|
|
|
|
private Api34Impl() {
|
|
}
|
|
|
|
public static final AuthenticationAction fromAction(android.service.credentials.Action authenticationAction) {
|
|
Intrinsics.checkNotNullParameter(authenticationAction, "authenticationAction");
|
|
Slice slice = authenticationAction.getSlice();
|
|
Intrinsics.checkNotNullExpressionValue(slice, "authenticationAction.slice");
|
|
return AuthenticationAction.Companion.fromSlice(slice);
|
|
}
|
|
}
|
|
|
|
@SourceDebugExtension({"SMAP\nAuthenticationAction.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AuthenticationAction.kt\nandroidx/credentials/provider/AuthenticationAction$Companion\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,231:1\n1855#2,2:232\n*S KotlinDebug\n*F\n+ 1 AuthenticationAction.kt\nandroidx/credentials/provider/AuthenticationAction$Companion\n*L\n143#1:232,2\n*E\n"})
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
|
|
@RequiresApi(28)
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
public final Slice toSlice(AuthenticationAction authenticationAction) {
|
|
Slice.Builder addHints;
|
|
Slice build;
|
|
Slice.Builder addAction;
|
|
Slice build2;
|
|
Intrinsics.checkNotNullParameter(authenticationAction, "authenticationAction");
|
|
CharSequence title = authenticationAction.getTitle();
|
|
PendingIntent pendingIntent = authenticationAction.getPendingIntent();
|
|
Action$Companion$$ExternalSyntheticApiModelOutline12.m();
|
|
Slice.Builder m = Action$Companion$$ExternalSyntheticApiModelOutline10.m(Uri.EMPTY, Action$Companion$$ExternalSyntheticApiModelOutline9.m("AuthenticationAction", 0));
|
|
addHints = Action$Companion$$ExternalSyntheticApiModelOutline11.m(m).addHints(Collections.singletonList(AuthenticationAction.SLICE_HINT_PENDING_INTENT));
|
|
build = addHints.build();
|
|
addAction = m.addAction(pendingIntent, build, null);
|
|
addAction.addText(title, null, CollectionsKt__CollectionsJVMKt.listOf(AuthenticationAction.SLICE_HINT_TITLE));
|
|
build2 = m.build();
|
|
Intrinsics.checkNotNullExpressionValue(build2, "sliceBuilder.build()");
|
|
return build2;
|
|
}
|
|
|
|
@RequiresApi(28)
|
|
@SuppressLint({"WrongConstant"})
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
public final AuthenticationAction fromSlice(Slice slice) {
|
|
List items;
|
|
boolean hasHint;
|
|
boolean hasHint2;
|
|
Intrinsics.checkNotNullParameter(slice, "slice");
|
|
items = slice.getItems();
|
|
Intrinsics.checkNotNullExpressionValue(items, "slice.items");
|
|
Iterator it = items.iterator();
|
|
CharSequence charSequence = null;
|
|
PendingIntent pendingIntent = null;
|
|
while (it.hasNext()) {
|
|
SliceItem m = Action$Companion$$ExternalSyntheticApiModelOutline5.m(it.next());
|
|
hasHint = m.hasHint(AuthenticationAction.SLICE_HINT_PENDING_INTENT);
|
|
if (hasHint) {
|
|
pendingIntent = m.getAction();
|
|
} else {
|
|
hasHint2 = m.hasHint(AuthenticationAction.SLICE_HINT_TITLE);
|
|
if (hasHint2) {
|
|
charSequence = m.getText();
|
|
}
|
|
}
|
|
}
|
|
try {
|
|
Intrinsics.checkNotNull(charSequence);
|
|
Intrinsics.checkNotNull(pendingIntent);
|
|
return new AuthenticationAction(charSequence, pendingIntent);
|
|
} catch (Exception e) {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("fromSlice failed with: ");
|
|
sb.append(e.getMessage());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
@RequiresApi(34)
|
|
public final AuthenticationAction fromAction(android.service.credentials.Action authenticationAction) {
|
|
Intrinsics.checkNotNullParameter(authenticationAction, "authenticationAction");
|
|
if (Build.VERSION.SDK_INT >= 34) {
|
|
return Api34Impl.fromAction(authenticationAction);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public final void marshall$credentials_release(List<AuthenticationAction> list, Bundle bundle) {
|
|
Intrinsics.checkNotNullParameter(list, "<this>");
|
|
Intrinsics.checkNotNullParameter(bundle, "bundle");
|
|
bundle.putInt(AuthenticationAction.EXTRA_AUTH_ACTION_SIZE, list.size());
|
|
int size = list.size();
|
|
for (int i = 0; i < size; i++) {
|
|
bundle.putParcelable(AuthenticationAction.EXTRA_AUTH_ACTION_PENDING_INTENT_PREFIX + i, list.get(i).getPendingIntent());
|
|
bundle.putCharSequence(AuthenticationAction.EXTRA_AUTH_ACTION_TITLE_PREFIX + i, list.get(i).getTitle());
|
|
}
|
|
}
|
|
|
|
public final List<AuthenticationAction> unmarshallAuthActionList$credentials_release(Bundle bundle) {
|
|
Intrinsics.checkNotNullParameter(bundle, "<this>");
|
|
ArrayList arrayList = new ArrayList();
|
|
int i = bundle.getInt(AuthenticationAction.EXTRA_AUTH_ACTION_SIZE, 0);
|
|
for (int i2 = 0; i2 < i; i2++) {
|
|
PendingIntent pendingIntent = (PendingIntent) bundle.getParcelable(AuthenticationAction.EXTRA_AUTH_ACTION_PENDING_INTENT_PREFIX + i2);
|
|
CharSequence charSequence = bundle.getCharSequence(AuthenticationAction.EXTRA_AUTH_ACTION_TITLE_PREFIX + i2);
|
|
if (pendingIntent == null || charSequence == null) {
|
|
return CollectionsKt__CollectionsKt.emptyList();
|
|
}
|
|
arrayList.add(new AuthenticationAction(charSequence, pendingIntent));
|
|
}
|
|
return arrayList;
|
|
}
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof AuthenticationAction)) {
|
|
return false;
|
|
}
|
|
AuthenticationAction authenticationAction = (AuthenticationAction) obj;
|
|
return Intrinsics.areEqual(this.title, authenticationAction.title) && Intrinsics.areEqual(this.pendingIntent, authenticationAction.pendingIntent);
|
|
}
|
|
|
|
public int hashCode() {
|
|
return (this.title.hashCode() * 31) + this.pendingIntent.hashCode();
|
|
}
|
|
}
|