正在查看: Pulsar v1.0.0 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Pulsar v1.0.0 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package i;
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 android.os.ext.SdkExtensions;
import android.provider.MediaStore;
import androidx.core.content.ContextCompat;
import i.a;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import kotlin.Pair;
import kotlin.collections.CollectionsKt;
import kotlin.collections.u0;
import kotlin.i0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.o1;
import kotlin.z0;
public final class b {
public static final class a {
public static final a f20377a = new a();
private a() {
}
public final int getPickImagesMaxLimit() {
return MediaStore.getPickImagesMaxLimit();
}
}
public static class C0261b extends i.a<Uri, Boolean> {
@Override
public Intent createIntent(Context context, Uri uri) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(uri, "input");
Intent putExtra = new Intent("android.media.action.VIDEO_CAPTURE").putExtra("output", uri);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(MediaStore.ACTION…tore.EXTRA_OUTPUT, input)");
return putExtra;
}
@Override
public final a.C0260a<Boolean> getSynchronousResult(Context context, Uri uri) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(uri, "input");
return null;
}
@Override
public final Boolean parseResult(int i5, Intent intent) {
return Boolean.valueOf(i5 == -1);
}
}
public static class c extends i.a<String, Uri> {
private final String f20378a;
@kotlin.k(message = "Using a wildcard mime type with CreateDocument is not recommended as it breaks the automatic handling of file extensions. Instead, specify the mime type by using the constructor that takes an concrete mime type (e.g.., CreateDocument(\"image/png\")).", replaceWith = @z0(expression = "CreateDocument(\"todo/todo\")", imports = {}))
public c() {
this("*/*");
}
@Override
public final Uri parseResult(int i5, Intent intent) {
if (i5 != -1) {
intent = null;
}
if (intent != null) {
return intent.getData();
}
return null;
}
public c(String str) {
Intrinsics.checkNotNullParameter(str, "mimeType");
this.f20378a = str;
}
@Override
public Intent createIntent(Context context, String str) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(str, "input");
Intent putExtra = new Intent("android.intent.action.CREATE_DOCUMENT").setType(this.f20378a).putExtra("android.intent.extra.TITLE", str);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(Intent.ACTION_CRE…ntent.EXTRA_TITLE, input)");
return putExtra;
}
@Override
public final a.C0260a<Uri> getSynchronousResult(Context context, String str) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(str, "input");
return null;
}
}
public static class d extends i.a<String, Uri> {
@Override
public final Uri parseResult(int i5, Intent intent) {
if (i5 != -1) {
intent = null;
}
if (intent != null) {
return intent.getData();
}
return null;
}
@Override
public Intent createIntent(Context context, String str) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(str, "input");
Intent type = new Intent("android.intent.action.GET_CONTENT").addCategory("android.intent.category.OPENABLE").setType(str);
Intrinsics.checkNotNullExpressionValue(type, "Intent(Intent.ACTION_GET… .setType(input)");
return type;
}
@Override
public final a.C0260a<Uri> getSynchronousResult(Context context, String str) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(str, "input");
return null;
}
}
public static class e extends i.a<String, List<Uri>> {
public static final a f20379a = new a(null);
public static final class a {
private a() {
}
public final List<Uri> getClipDataUris$activity_release(Intent intent) {
Intrinsics.checkNotNullParameter(intent, "<this>");
LinkedHashSet linkedHashSet = new LinkedHashSet();
Uri data = intent.getData();
if (data != null) {
linkedHashSet.add(data);
}
ClipData clipData = intent.getClipData();
if (clipData == null && linkedHashSet.isEmpty()) {
return CollectionsKt.emptyList();
}
if (clipData != null) {
int itemCount = clipData.getItemCount();
for (int i5 = 0; i5 < itemCount; i5++) {
Uri uri = clipData.getItemAt(i5).getUri();
if (uri != null) {
linkedHashSet.add(uri);
}
}
}
return new ArrayList(linkedHashSet);
}
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
@Override
public Intent createIntent(Context context, String str) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(str, "input");
Intent putExtra = new Intent("android.intent.action.GET_CONTENT").addCategory("android.intent.category.OPENABLE").setType(str).putExtra("android.intent.extra.ALLOW_MULTIPLE", true);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(Intent.ACTION_GET…TRA_ALLOW_MULTIPLE, true)");
return putExtra;
}
@Override
public final a.C0260a<List<Uri>> getSynchronousResult(Context context, String str) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(str, "input");
return null;
}
@Override
public final List<Uri> parseResult(int i5, Intent intent) {
List<Uri> clipDataUris$activity_release;
if (i5 != -1) {
intent = null;
}
return (intent == null || (clipDataUris$activity_release = f20379a.getClipDataUris$activity_release(intent)) == null) ? CollectionsKt.emptyList() : clipDataUris$activity_release;
}
}
public static class f extends i.a<String[], Uri> {
@Override
public final Uri parseResult(int i5, Intent intent) {
if (i5 != -1) {
intent = null;
}
if (intent != null) {
return intent.getData();
}
return null;
}
@Override
public Intent createIntent(Context context, String[] strArr) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(strArr, "input");
Intent type = new Intent("android.intent.action.OPEN_DOCUMENT").putExtra("android.intent.extra.MIME_TYPES", strArr).setType("*/*");
Intrinsics.checkNotNullExpressionValue(type, "Intent(Intent.ACTION_OPE… .setType(\"*/*\")");
return type;
}
@Override
public final a.C0260a<Uri> getSynchronousResult(Context context, String[] strArr) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(strArr, "input");
return null;
}
}
public static class g extends i.a<Uri, Uri> {
@Override
public Intent createIntent(Context context, Uri uri) {
Intrinsics.checkNotNullParameter(context, "context");
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;
}
@Override
public final a.C0260a<Uri> getSynchronousResult(Context context, Uri uri) {
Intrinsics.checkNotNullParameter(context, "context");
return null;
}
@Override
public final Uri parseResult(int i5, Intent intent) {
if (i5 != -1) {
intent = null;
}
if (intent != null) {
return intent.getData();
}
return null;
}
}
public static class h extends i.a<String[], List<Uri>> {
@Override
public Intent createIntent(Context context, String[] strArr) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(strArr, "input");
Intent type = new Intent("android.intent.action.OPEN_DOCUMENT").putExtra("android.intent.extra.MIME_TYPES", strArr).putExtra("android.intent.extra.ALLOW_MULTIPLE", true).setType("*/*");
Intrinsics.checkNotNullExpressionValue(type, "Intent(Intent.ACTION_OPE… .setType(\"*/*\")");
return type;
}
@Override
public final a.C0260a<List<Uri>> getSynchronousResult(Context context, String[] strArr) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(strArr, "input");
return null;
}
@Override
public final List<Uri> parseResult(int i5, Intent intent) {
List<Uri> clipDataUris$activity_release;
if (i5 != -1) {
intent = null;
}
return (intent == null || (clipDataUris$activity_release = e.f20379a.getClipDataUris$activity_release(intent)) == null) ? CollectionsKt.emptyList() : clipDataUris$activity_release;
}
}
public static final class i extends i.a<Void, Uri> {
@Override
public Uri parseResult(int i5, Intent intent) {
if (i5 != -1) {
intent = null;
}
if (intent != null) {
return intent.getData();
}
return null;
}
@Override
public Intent createIntent(Context context, Void r22) {
Intrinsics.checkNotNullParameter(context, "context");
Intent type = new Intent("android.intent.action.PICK").setType("vnd.android.cursor.dir/contact");
Intrinsics.checkNotNullExpressionValue(type, "Intent(Intent.ACTION_PIC…ct.Contacts.CONTENT_TYPE)");
return type;
}
}
public static class j extends i.a<androidx.activity.result.g, List<Uri>> {
public static final a f20380b = new a(null);
private final int f20381a;
public static final class a {
private a() {
}
public final int getMaxItems$activity_release() {
if (!k.f20382a.isPhotoPickerAvailable() || Build.VERSION.SDK_INT < 33) {
return Integer.MAX_VALUE;
}
return a.f20377a.getPickImagesMaxLimit();
}
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
public j() {
this(0, 1, null);
}
@Override
public Intent createIntent(Context context, androidx.activity.result.g gVar) {
Intent intent;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(gVar, "input");
k.a aVar = k.f20382a;
if (aVar.isPhotoPickerAvailable()) {
intent = new Intent("android.provider.action.PICK_IMAGES");
intent.setType(aVar.getVisualMimeType$activity_release(gVar.getMediaType()));
if (Build.VERSION.SDK_INT >= 33 && this.f20381a > a.f20377a.getPickImagesMaxLimit()) {
throw new IllegalArgumentException("Max items must be less or equals MediaStore.getPickImagesMaxLimit()".toString());
}
intent.putExtra("android.provider.extra.PICK_IMAGES_MAX", this.f20381a);
} else {
intent = new Intent("android.intent.action.OPEN_DOCUMENT");
intent.setType(aVar.getVisualMimeType$activity_release(gVar.getMediaType()));
intent.putExtra("android.intent.extra.ALLOW_MULTIPLE", true);
if (intent.getType() == null) {
intent.setType("*/*");
intent.putExtra("android.intent.extra.MIME_TYPES", new String[]{"image/*", "video/*"});
}
}
return intent;
}
@Override
public final a.C0260a<List<Uri>> getSynchronousResult(Context context, androidx.activity.result.g gVar) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(gVar, "input");
return null;
}
public j(int i5) {
this.f20381a = i5;
if (i5 <= 1) {
throw new IllegalArgumentException("Max items must be higher than 1".toString());
}
}
@Override
public final List<Uri> parseResult(int i5, Intent intent) {
List<Uri> clipDataUris$activity_release;
if (i5 != -1) {
intent = null;
}
return (intent == null || (clipDataUris$activity_release = e.f20379a.getClipDataUris$activity_release(intent)) == null) ? CollectionsKt.emptyList() : clipDataUris$activity_release;
}
public j(int i5, int i6, DefaultConstructorMarker defaultConstructorMarker) {
this((i6 & 1) != 0 ? f20380b.getMaxItems$activity_release() : i5);
}
}
public static class k extends i.a<androidx.activity.result.g, Uri> {
public static final a f20382a = new a(null);
public static final class a {
private a() {
}
public final String getVisualMimeType$activity_release(f fVar) {
Intrinsics.checkNotNullParameter(fVar, "input");
if (fVar instanceof c) {
return "image/*";
}
if (fVar instanceof e) {
return "video/*";
}
if (fVar instanceof d) {
return ((d) fVar).getMimeType();
}
if (fVar instanceof C0262b) {
return null;
}
throw new i0();
}
@m7.n
public final boolean isPhotoPickerAvailable() {
int extensionVersion;
int i5 = Build.VERSION.SDK_INT;
if (i5 >= 33) {
return true;
}
if (i5 >= 30) {
extensionVersion = SdkExtensions.getExtensionVersion(30);
if (extensionVersion >= 2) {
return true;
}
}
return false;
}
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
public static final class C0262b implements f {
public static final C0262b f20383a = new C0262b();
private C0262b() {
}
}
public static final class c implements f {
public static final c f20384a = new c();
private c() {
}
}
public static final class d implements f {
private final String f20385a;
public d(String str) {
Intrinsics.checkNotNullParameter(str, "mimeType");
this.f20385a = str;
}
public final String getMimeType() {
return this.f20385a;
}
}
public static final class e implements f {
public static final e f20386a = new e();
private e() {
}
}
public interface f {
}
@m7.n
public static final boolean isPhotoPickerAvailable() {
return f20382a.isPhotoPickerAvailable();
}
@Override
public Intent createIntent(Context context, androidx.activity.result.g gVar) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(gVar, "input");
a aVar = f20382a;
if (aVar.isPhotoPickerAvailable()) {
Intent intent = new Intent("android.provider.action.PICK_IMAGES");
intent.setType(aVar.getVisualMimeType$activity_release(gVar.getMediaType()));
return intent;
}
Intent intent2 = new Intent("android.intent.action.OPEN_DOCUMENT");
intent2.setType(aVar.getVisualMimeType$activity_release(gVar.getMediaType()));
if (intent2.getType() != null) {
return intent2;
}
intent2.setType("*/*");
intent2.putExtra("android.intent.extra.MIME_TYPES", new String[]{"image/*", "video/*"});
return intent2;
}
@Override
public final a.C0260a<Uri> getSynchronousResult(Context context, androidx.activity.result.g gVar) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(gVar, "input");
return null;
}
@Override
public final Uri parseResult(int i5, Intent intent) {
if (i5 != -1) {
intent = null;
}
if (intent != null) {
return intent.getData();
}
return null;
}
}
public static final class l extends i.a<String[], Map<String, Boolean>> {
public static final a f20387a = new a(null);
public static final String f20388b = "androidx.activity.result.contract.action.REQUEST_PERMISSIONS";
public static final String f20389c = "androidx.activity.result.contract.extra.PERMISSIONS";
public static final String f20390d = "androidx.activity.result.contract.extra.PERMISSION_GRANT_RESULTS";
public static final class a {
private a() {
}
public final Intent createIntent$activity_release(String[] strArr) {
Intrinsics.checkNotNullParameter(strArr, "input");
Intent putExtra = new Intent(l.f20388b).putExtra(l.f20389c, strArr);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(ACTION_REQUEST_PE…EXTRA_PERMISSIONS, input)");
return putExtra;
}
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
@Override
public Intent createIntent(Context context, String[] strArr) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(strArr, "input");
return f20387a.createIntent$activity_release(strArr);
}
@Override
public a.C0260a<Map<String, Boolean>> getSynchronousResult(Context context, String[] strArr) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(strArr, "input");
if (strArr.length == 0) {
return new a.C0260a<>(u0.emptyMap());
}
for (String str : strArr) {
if (ContextCompat.checkSelfPermission(context, str) != 0) {
return null;
}
}
LinkedHashMap linkedHashMap = new LinkedHashMap(kotlin.ranges.r.coerceAtLeast(u0.mapCapacity(strArr.length), 16));
for (String str2 : strArr) {
Pair pair = o1.to(str2, Boolean.TRUE);
linkedHashMap.put(pair.getFirst(), pair.getSecond());
}
return new a.C0260a<>(linkedHashMap);
}
@Override
public Map<String, Boolean> parseResult(int i5, Intent intent) {
if (i5 == -1 && intent != null) {
String[] stringArrayExtra = intent.getStringArrayExtra(f20389c);
int[] intArrayExtra = intent.getIntArrayExtra(f20390d);
if (intArrayExtra == null || stringArrayExtra == null) {
return u0.emptyMap();
}
ArrayList arrayList = new ArrayList(intArrayExtra.length);
for (int i6 : intArrayExtra) {
arrayList.add(Boolean.valueOf(i6 == 0));
}
return u0.toMap(CollectionsKt.zip(kotlin.collections.l.filterNotNull(stringArrayExtra), arrayList));
}
return u0.emptyMap();
}
}
public static final class m extends i.a<String, Boolean> {
@Override
public Boolean parseResult(int i5, Intent intent) {
if (intent == null || i5 != -1) {
return Boolean.FALSE;
}
int[] intArrayExtra = intent.getIntArrayExtra(l.f20390d);
boolean z4 = false;
if (intArrayExtra != null) {
int length = intArrayExtra.length;
int i6 = 0;
while (true) {
if (i6 >= length) {
break;
}
if (intArrayExtra[i6] == 0) {
z4 = true;
break;
}
i6++;
}
}
return Boolean.valueOf(z4);
}
@Override
public Intent createIntent(Context context, String str) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(str, "input");
return l.f20387a.createIntent$activity_release(new String[]{str});
}
@Override
public a.C0260a<Boolean> getSynchronousResult(Context context, String str) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(str, "input");
if (ContextCompat.checkSelfPermission(context, str) == 0) {
return new a.C0260a<>(Boolean.TRUE);
}
return null;
}
}
public static final class n extends i.a<Intent, androidx.activity.result.a> {
public static final a f20391a = new a(null);
public static final String f20392b = "androidx.activity.result.contract.extra.ACTIVITY_OPTIONS_BUNDLE";
public static final class a {
private a() {
}
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
@Override
public Intent createIntent(Context context, Intent intent) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(intent, "input");
return intent;
}
@Override
public androidx.activity.result.a parseResult(int i5, Intent intent) {
return new androidx.activity.result.a(i5, intent);
}
}
public static final class o extends i.a<androidx.activity.result.f, androidx.activity.result.a> {
public static final a f20393a = new a(null);
public static final String f20394b = "androidx.activity.result.contract.action.INTENT_SENDER_REQUEST";
public static final String f20395c = "androidx.activity.result.contract.extra.INTENT_SENDER_REQUEST";
public static final String f20396d = "androidx.activity.result.contract.extra.SEND_INTENT_EXCEPTION";
public static final class a {
private a() {
}
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
@Override
public Intent createIntent(Context context, androidx.activity.result.f fVar) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(fVar, "input");
Intent putExtra = new Intent(f20394b).putExtra(f20395c, fVar);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(ACTION_INTENT_SEN…NT_SENDER_REQUEST, input)");
return putExtra;
}
@Override
public androidx.activity.result.a parseResult(int i5, Intent intent) {
return new androidx.activity.result.a(i5, intent);
}
}
public static class p extends i.a<Uri, Boolean> {
@Override
public Intent createIntent(Context context, Uri uri) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(uri, "input");
Intent putExtra = new Intent("android.media.action.IMAGE_CAPTURE").putExtra("output", uri);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(MediaStore.ACTION…tore.EXTRA_OUTPUT, input)");
return putExtra;
}
@Override
public final a.C0260a<Boolean> getSynchronousResult(Context context, Uri uri) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(uri, "input");
return null;
}
@Override
public final Boolean parseResult(int i5, Intent intent) {
return Boolean.valueOf(i5 == -1);
}
}
public static class q extends i.a<Void, Bitmap> {
@Override
public final Bitmap parseResult(int i5, Intent intent) {
if (i5 != -1) {
intent = null;
}
if (intent != null) {
return (Bitmap) intent.getParcelableExtra("data");
}
return null;
}
@Override
public Intent createIntent(Context context, Void r22) {
Intrinsics.checkNotNullParameter(context, "context");
return new Intent("android.media.action.IMAGE_CAPTURE");
}
@Override
public final a.C0260a<Bitmap> getSynchronousResult(Context context, Void r22) {
Intrinsics.checkNotNullParameter(context, "context");
return null;
}
}
@kotlin.k(message = "The thumbnail bitmap is rarely returned and is not a good signal to determine\n whether the video was actually successfully captured. Use {@link CaptureVideo} instead.")
public static class r extends i.a<Uri, Bitmap> {
@Override
public Intent createIntent(Context context, Uri uri) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(uri, "input");
Intent putExtra = new Intent("android.media.action.VIDEO_CAPTURE").putExtra("output", uri);
Intrinsics.checkNotNullExpressionValue(putExtra, "Intent(MediaStore.ACTION…tore.EXTRA_OUTPUT, input)");
return putExtra;
}
@Override
public final a.C0260a<Bitmap> getSynchronousResult(Context context, Uri uri) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(uri, "input");
return null;
}
@Override
public final Bitmap parseResult(int i5, Intent intent) {
if (i5 != -1) {
intent = null;
}
if (intent != null) {
return (Bitmap) intent.getParcelableExtra("data");
}
return null;
}
}
private b() {
}
}