package r20; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.graphics.BitmapFactory; import android.media.MediaMetadataRetriever; import android.net.Uri; import android.os.Bundle; import com.meizu.cloud.pushsdk.notification.model.AdvanceSetting; import com.tencent.wcdb.database.SQLiteDatabase; import com.uber.autodispose.a0; import com.uber.autodispose.y; import com.xingin.android.storebridge.R$string; import com.xingin.android.storebridge.config.SelectWithPreviewConfig; import com.xingin.android.storebridge.entities.FileChoosingParams; import com.xingin.android.storebridge.ui.camera.CameraHelpActivity; import com.xingin.android.storebridge.ui.choose.XhsAlbumActivity; import com.xingin.android.storebridge.ui.preview.ImagePreviewActivity; import com.xingin.chatbase.bean.MsgUIData; import com.xingin.redalbum.crop.ImageScaleActivity; import com.xingin.redalbum.model.MediaBean; import dw2.r; import java.io.File; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.concurrent.ConcurrentHashMap; import kotlin.Metadata; import kotlin.Unit; import kotlin.collections.CollectionsKt___CollectionsKt; import kotlin.jvm.JvmStatic; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.Lambda; @Metadata(bv = {}, d1 = {"\u0000p\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0014\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0007\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u000b\bÆ\u0002\u0018\u00002\u00020\u0001:\u00011B\t\b\u0002¢\u0006\u0004\b/\u00100J*\u0010\u000b\u001a\u00020\n2\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u00062\b\b\u0002\u0010\t\u001a\u00020\bH\u0007J*\u0010\u0010\u001a\u00020\n2\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\r\u001a\u00020\f2\u0006\u0010\u000f\u001a\u00020\u000e2\b\b\u0002\u0010\t\u001a\u00020\bH\u0007J\u0014\u0010\u0012\u001a\u00020\b2\f\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u000e0\u0011J \u0010\u0013\u001a\u00020\n2\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0007\u001a\u00020\u00062\b\b\u0002\u0010\t\u001a\u00020\bJ \u0010\u0018\u001a\u00020\n2\u0006\u0010\u0015\u001a\u00020\u00142\u0006\u0010\u0017\u001a\u00020\u00162\b\b\u0002\u0010\t\u001a\u00020\bJ/\u0010\u001e\u001a\u00020\n2\u0006\u0010\u001a\u001a\u00020\u00192\u0006\u0010\u001b\u001a\u00020\u000e2\u000e\u0010\u001d\u001a\n\u0012\u0004\u0012\u00020\u001c\u0018\u00010\u0011H\u0000¢\u0006\u0004\b\u001e\u0010\u001fJ\u0017\u0010\"\u001a\u00020\u001c2\u0006\u0010!\u001a\u00020 H\u0000¢\u0006\u0004\b\"\u0010#J\u0010\u0010&\u001a\u00020%2\u0006\u0010$\u001a\u00020\u000eH\u0002J\u001e\u0010)\u001a\u00020\n2\u0006\u0010\u0003\u001a\u00020\u00022\f\u0010(\u001a\b\u0012\u0004\u0012\u00020\n0'H\u0002J\u001e\u0010*\u001a\u00020\n2\u0006\u0010\u0003\u001a\u00020\u00022\f\u0010(\u001a\b\u0012\u0004\u0012\u00020\n0'H\u0002R\u0017\u0010+\u001a\u00020\b8\u0006¢\u0006\f\n\u0004\b+\u0010,\u001a\u0004\b-\u0010.¨\u00062"}, d2 = {"Lr20/a;", "", "Landroid/content/Context;", "context", "Lcom/xingin/android/storebridge/entities/FileChoosingParams;", "params", "Lr20/a$a;", "callback", "", "ratioList", "", "d", "Lcom/xingin/android/storebridge/config/SelectWithPreviewConfig;", "preViewConfig", "", "callbackKey", "j", "", "l", "m", "Landroid/app/Activity;", "activity", "Landroid/net/Uri;", "sourceUri", y7.f.f156778k, "Lr20/c;", "selectResult", "key", "Lcom/xingin/redalbum/model/MediaBean;", "resultList", "e", "(Lr20/c;Ljava/lang/String;Ljava/util/List;)V", "Ljava/io/File;", "file", "i", "(Ljava/io/File;)Lcom/xingin/redalbum/model/MediaBean;", "ratio", "", z60.h.f160753a, "Lkotlin/Function0;", "action", "c", "b", "allCropRatios", "[F", "g", "()[F", "<init>", "()V", "a", "storebridge_release"}, k = 1, mv = {1, 4, 0}) /* compiled from: Album.kt */ public final class a { /* renamed from: a reason: collision with root package name */ public static final float[] f124547a = {0.0f, 0.75f, 1.0f, 1.3333334f}; /* renamed from: b reason: collision with root package name */ public static ConcurrentHashMap<String, AbstractC1964a> f124548b = new ConcurrentHashMap<>(); /* renamed from: c reason: collision with root package name */ public static final a f124549c = new a(); @Metadata(bv = {}, d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\bf\u0018\u00002\u00020\u0001J,\u0010\t\u001a\u00020\b2\u0006\u0010\u0003\u001a\u00020\u00022\u001a\u0010\u0007\u001a\u0016\u0012\u0004\u0012\u00020\u0005\u0018\u00010\u0004j\n\u0012\u0004\u0012\u00020\u0005\u0018\u0001`\u0006H&¨\u0006\n"}, d2 = {"Lr20/a$a;", "", "Lr20/c;", "result", "Ljava/util/ArrayList;", "Lcom/xingin/redalbum/model/MediaBean;", "Lkotlin/collections/ArrayList;", "imageBeanList", "", "a", "storebridge_release"}, k = 1, mv = {1, 4, 0}) /* renamed from: r20.a$a reason: collision with other inner class name */ /* compiled from: Album.kt */ public interface AbstractC1964a { void a(c cVar, ArrayList<MediaBean> arrayList); } @Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\u0010\u0005\u001a\u00020\u00022\b\u0010\u0001\u001a\u0004\u0018\u00010\u0000H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"Lfj2/a;", AdvanceSetting.NETWORK_TYPE, "", "invoke", "(Lfj2/a;)V", "<anonymous>"}, k = 3, mv = {1, 4, 0}) /* compiled from: Album.kt */ public static final class b extends Lambda implements Function1<fj2.a, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ Function0 f124550a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public b(Function0 function0) { super(1); this.f124550a = function0; } /* 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(fj2.a aVar) { invoke(aVar); return Unit.INSTANCE; } public final void invoke(fj2.a aVar) { this.f124550a.invoke(); } } @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 1, 16}) /* compiled from: Album.kt */ public static final class c extends Lambda implements Function0<Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ AbstractC1964a f124551a; /* renamed from: b reason: collision with root package name */ public final /* synthetic */ FileChoosingParams f124552b; /* renamed from: c reason: collision with root package name */ public final /* synthetic */ float[] f124553c; /* renamed from: d reason: collision with root package name */ public final /* synthetic */ Context f124554d; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public c(AbstractC1964a aVar, FileChoosingParams fileChoosingParams, float[] fArr, Context context) { super(0); this.f124551a = aVar; this.f124552b = fileChoosingParams; this.f124553c = fArr; this.f124554d = context; } @Override // kotlin.jvm.functions.Function0 public final void invoke() { String str = "album_callback_" + System.currentTimeMillis(); a aVar = a.f124549c; a.f124548b.put(str, this.f124551a); Bundle bundle = new Bundle(); bundle.putParcelable("album_select_config", this.f124552b); bundle.putFloatArray("album_crop_ratio_list", this.f124553c); bundle.putString("callbackKey", str); Intent intent = new Intent(this.f124554d, XhsAlbumActivity.class); intent.putExtras(bundle); if (!(this.f124554d instanceof Activity)) { intent.addFlags(SQLiteDatabase.CREATE_IF_NECESSARY); } this.f124554d.startActivity(intent); } } @Metadata(bv = {}, d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0006\u001a\u00020\u000520\u0010\u0004\u001a,\u0012\u0004\u0012\u00020\u0001 \u0003*\u0016\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u0000j\n\u0012\u0004\u0012\u00020\u0001\u0018\u0001`\u00020\u0000j\b\u0012\u0004\u0012\u00020\u0001`\u0002H\n¢\u0006\u0004\b\u0006\u0010\u0007"}, d2 = {"Ljava/util/ArrayList;", "Lcom/xingin/redalbum/model/MediaBean;", "Lkotlin/collections/ArrayList;", "kotlin.jvm.PlatformType", "rst", "", "a", "(Ljava/util/ArrayList;)V"}, k = 3, mv = {1, 4, 0}) /* compiled from: Album.kt */ public static final class d<T> implements iw2.g<ArrayList<MediaBean>> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ c f124555a; public d(c cVar) { this.f124555a = cVar; } /* JADX WARNING: Code restructure failed: missing block: B:23:0x006b, code lost: r2 = java.lang.Integer.valueOf(r0.getWidth()); */ /* JADX WARNING: Code restructure failed: missing block: B:54:0x00d1, code lost: r7 = move-exception; */ /* JADX WARNING: Code restructure failed: missing block: B:56:?, code lost: r1.release(); */ /* JADX WARNING: Failed to process nested try/catch */ /* JADX WARNING: Removed duplicated region for block: B:54:0x00d1 A[ExcHandler: all (r7v2 'th' java.lang.Throwable A[CUSTOM_DECLARE]), Splitter:B:15:0x0050] */ /* renamed from: a */ public final void accept(ArrayList<MediaBean> arrayList) { Integer num; Integer num2; if (this.f124555a == c.SUCCESS && arrayList != null) { Iterator<T> it3 = arrayList.iterator(); while (it3.hasNext()) { T next = it3.next(); if (next.h()) { try { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeFile(next.d(), options); next.s(options.outWidth); next.l(options.outHeight); String str = options.outMimeType; Intrinsics.checkExpressionValueIsNotNull(str, "op.outMimeType"); next.m(str); } catch (Exception unused) { } } else if (next.j()) { MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever(); try { mediaMetadataRetriever.setDataSource(next.d()); num = null; String extractMetadata = mediaMetadataRetriever.extractMetadata(18); num2 = extractMetadata != null ? Integer.valueOf(Integer.parseInt(extractMetadata)) : null; String extractMetadata2 = mediaMetadataRetriever.extractMetadata(19); if (extractMetadata2 != null) { num = Integer.valueOf(Integer.parseInt(extractMetadata2)); } } catch (Exception unused2) { num = Integer.valueOf(next.getHeight()); } catch (Throwable th3) { } String extractMetadata3 = mediaMetadataRetriever.extractMetadata(24); int i10 = 0; if (Math.abs(extractMetadata3 != null ? Integer.parseInt(extractMetadata3) : 0) % 180 == 0) { next.s(num2 != null ? num2.intValue() : 0); if (num != null) { i10 = num.intValue(); } next.l(i10); } else { next.s(num != null ? num.intValue() : 0); if (num2 != null) { i10 = num2.intValue(); } next.l(i10); } mediaMetadataRetriever.release(); } } return; } return; throw th3; } } @Metadata(bv = {}, d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0006\u001a\u00020\u000520\u0010\u0004\u001a,\u0012\u0004\u0012\u00020\u0001 \u0003*\u0016\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u0000j\n\u0012\u0004\u0012\u00020\u0001\u0018\u0001`\u00020\u0000j\b\u0012\u0004\u0012\u00020\u0001`\u0002H\n¢\u0006\u0004\b\u0006\u0010\u0007"}, d2 = {"Ljava/util/ArrayList;", "Lcom/xingin/redalbum/model/MediaBean;", "Lkotlin/collections/ArrayList;", "kotlin.jvm.PlatformType", AdvanceSetting.NETWORK_TYPE, "", "a", "(Ljava/util/ArrayList;)V"}, k = 3, mv = {1, 4, 0}) /* compiled from: Album.kt */ public static final class e<T> implements iw2.g<ArrayList<MediaBean>> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ AbstractC1964a f124556a; /* renamed from: b reason: collision with root package name */ public final /* synthetic */ c f124557b; public e(AbstractC1964a aVar, c cVar) { this.f124556a = aVar; this.f124557b = cVar; } /* renamed from: a */ public final void accept(ArrayList<MediaBean> arrayList) { this.f124556a.a(this.f124557b, arrayList); } } @Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0010\u0003\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0004\u001a\u00020\u00032\u000e\u0010\u0002\u001a\n \u0001*\u0004\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"", "kotlin.jvm.PlatformType", AdvanceSetting.NETWORK_TYPE, "", "a", "(Ljava/lang/Throwable;)V"}, k = 3, mv = {1, 4, 0}) /* compiled from: Album.kt */ public static final class f<T> implements iw2.g<Throwable> { /* renamed from: a reason: collision with root package name */ public static final f f124558a = new f(); /* renamed from: a */ public final void accept(Throwable th3) { } } @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 1, 16}) /* compiled from: Album.kt */ public static final class g extends Lambda implements Function0<Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ Activity f124559a; /* renamed from: b reason: collision with root package name */ public final /* synthetic */ Uri f124560b; /* renamed from: c reason: collision with root package name */ public final /* synthetic */ float[] f124561c; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public g(Activity activity, Uri uri, float[] fArr) { super(0); this.f124559a = activity; this.f124560b = uri; this.f124561c = fArr; } @Override // kotlin.jvm.functions.Function0 public final void invoke() { Intent intent = new Intent(this.f124559a, ImageScaleActivity.class); intent.putExtra("scale_input_path", this.f124560b.getPath()); intent.putExtra("scale_default_ratio", this.f124561c); this.f124559a.startActivityForResult(intent, MsgUIData.PUSH_STATE_VIDEO_BASE); } } @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 1, 16}) /* compiled from: Album.kt */ public static final class h extends Lambda implements Function0<Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ Context f124562a; /* renamed from: b reason: collision with root package name */ public final /* synthetic */ SelectWithPreviewConfig f124563b; /* renamed from: c reason: collision with root package name */ public final /* synthetic */ String f124564c; /* renamed from: d reason: collision with root package name */ public final /* synthetic */ float[] f124565d; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public h(Context context, SelectWithPreviewConfig selectWithPreviewConfig, String str, float[] fArr) { super(0); this.f124562a = context; this.f124563b = selectWithPreviewConfig; this.f124564c = str; this.f124565d = fArr; } @Override // kotlin.jvm.functions.Function0 public final void invoke() { Intent intent = new Intent(this.f124562a, ImagePreviewActivity.class); if (!(this.f124562a instanceof Activity)) { intent.addFlags(SQLiteDatabase.CREATE_IF_NECESSARY); } intent.putExtra("album_preview_config", this.f124563b); intent.putExtra("callbackKey", this.f124564c); intent.putExtra("album_crop_ratio_list", this.f124565d); this.f124562a.startActivity(intent); } } @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 1, 16}) /* compiled from: Album.kt */ public static final class i extends Lambda implements Function0<Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ AbstractC1964a f124566a; /* renamed from: b reason: collision with root package name */ public final /* synthetic */ float[] f124567b; /* renamed from: c reason: collision with root package name */ public final /* synthetic */ Context f124568c; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public i(AbstractC1964a aVar, float[] fArr, Context context) { super(0); this.f124566a = aVar; this.f124567b = fArr; this.f124568c = context; } @Override // kotlin.jvm.functions.Function0 public final void invoke() { String str = "album_callback_" + System.currentTimeMillis(); a aVar = a.f124549c; a.f124548b.put(str, this.f124566a); Bundle bundle = new Bundle(); bundle.putFloatArray("album_crop_ratio_list", this.f124567b); bundle.putString("callbackKey", str); Intent intent = new Intent(this.f124568c, CameraHelpActivity.class); intent.putExtras(bundle); if (!(this.f124568c instanceof Activity)) { intent.addFlags(SQLiteDatabase.CREATE_IF_NECESSARY); } this.f124568c.startActivity(intent); } } @JvmStatic public static final void d(Context context, FileChoosingParams fileChoosingParams, AbstractC1964a aVar, float[] fArr) { Intrinsics.checkParameterIsNotNull(context, "context"); Intrinsics.checkParameterIsNotNull(fileChoosingParams, "params"); Intrinsics.checkParameterIsNotNull(aVar, "callback"); Intrinsics.checkParameterIsNotNull(fArr, "ratioList"); f124549c.c(context, new c(aVar, fileChoosingParams, fArr, context)); } @JvmStatic public static final void j(Context context, SelectWithPreviewConfig selectWithPreviewConfig, String str, float[] fArr) { Intrinsics.checkParameterIsNotNull(context, "context"); Intrinsics.checkParameterIsNotNull(selectWithPreviewConfig, "preViewConfig"); Intrinsics.checkParameterIsNotNull(str, "callbackKey"); Intrinsics.checkParameterIsNotNull(fArr, "ratioList"); f124549c.c(context, new h(context, selectWithPreviewConfig, str, fArr)); } public static /* synthetic */ void k(Context context, SelectWithPreviewConfig selectWithPreviewConfig, String str, float[] fArr, int i10, Object obj) { if ((i10 & 8) != 0) { fArr = f124547a; } j(context, selectWithPreviewConfig, str, fArr); } public final void b(Context context, Function0<Unit> function0) { function0.invoke(); } public final void c(Context context, Function0<Unit> function0) { fj2.b bVar = fj2.b.f77239f; if (!bVar.n(context, "android.permission.WRITE_EXTERNAL_STORAGE")) { b bVar2 = new b(function0); String string = context.getString(R$string.dhv); Intrinsics.checkExpressionValueIsNotNull(string, "context.getString(R.string.permission_description)"); String string2 = context.getString(R$string.e1a); Intrinsics.checkExpressionValueIsNotNull(string2, "context.getString(R.stri…storage_permission_alert)"); fj2.b.h(bVar, this, new String[]{"android.permission.WRITE_EXTERNAL_STORAGE"}, bVar2, string, string2, 0, 0, 96, null); return; } function0.invoke(); } public final void e(c cVar, String str, List<MediaBean> list) { Intrinsics.checkParameterIsNotNull(cVar, "selectResult"); Intrinsics.checkParameterIsNotNull(str, "key"); ArrayList<MediaBean> arrayList = list != null ? (ArrayList) CollectionsKt___CollectionsKt.toCollection(list, new ArrayList()) : null; AbstractC1964a remove = f124548b.remove(str); if (remove != null) { Intrinsics.checkExpressionValueIsNotNull(remove, "map.remove(key) ?: return"); if (arrayList == null) { remove.a(cVar, arrayList); return; } r W0 = r.K0(arrayList).W0(mi2.a.P()).m0(new d(cVar)).W0(gw2.a.a()); Intrinsics.checkExpressionValueIsNotNull(W0, "Observable.just(result)\n…dSchedulers.mainThread())"); a0 a0Var = a0.D; Intrinsics.checkExpressionValueIsNotNull(a0Var, "ScopeProvider.UNBOUND"); Object n14 = W0.n(com.uber.autodispose.d.b(a0Var)); Intrinsics.checkExpressionValueIsNotNull(n14, "this.`as`(AutoDispose.autoDisposable(provider))"); ((y) n14).a(new e(remove, cVar), f.f124558a); } } public final void f(Activity activity, Uri uri, float[] fArr) { Intrinsics.checkParameterIsNotNull(activity, "activity"); Intrinsics.checkParameterIsNotNull(uri, "sourceUri"); Intrinsics.checkParameterIsNotNull(fArr, "ratioList"); c(activity, new g(activity, uri, fArr)); } public final float[] g() { return f124547a; } public final float h(String str) { int hashCode = str.hashCode(); if (hashCode == 1536) { str.equals("00"); return 0.0f; } else if (hashCode != 1568) { if (hashCode != 1633) { if (hashCode == 1663 && str.equals("43")) { return 1.3333334f; } return 0.0f; } else if (str.equals("34")) { return 0.75f; } else { return 0.0f; } } else if (str.equals("11")) { return 1.0f; } else { return 0.0f; } } public final MediaBean i(File file) { Intrinsics.checkParameterIsNotNull(file, "file"); MediaBean mediaBean = new MediaBean(); String uri = Uri.fromFile(file).toString(); Intrinsics.checkExpressionValueIsNotNull(uri, "Uri.fromFile(file).toString()"); mediaBean.r(uri); String absolutePath = file.getAbsolutePath(); Intrinsics.checkExpressionValueIsNotNull(absolutePath, "file.absolutePath"); mediaBean.p(absolutePath); BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeFile(mediaBean.d(), options); mediaBean.s(options.outWidth); mediaBean.l(options.outHeight); String str = options.outMimeType; Intrinsics.checkExpressionValueIsNotNull(str, "op.outMimeType"); mediaBean.m(str); return mediaBean; } public final float[] l(List<String> list) { Intrinsics.checkParameterIsNotNull(list, "ratioList"); ArrayList arrayList = new ArrayList(); Iterator<T> it3 = list.iterator(); while (it3.hasNext()) { arrayList.add(Float.valueOf(f124549c.h(it3.next()))); } return CollectionsKt___CollectionsKt.toFloatArray(arrayList); } public final void m(Context context, AbstractC1964a aVar, float[] fArr) { Intrinsics.checkParameterIsNotNull(context, "context"); Intrinsics.checkParameterIsNotNull(aVar, "callback"); Intrinsics.checkParameterIsNotNull(fArr, "ratioList"); b(context, new i(aVar, fArr, context)); } }