2021-08-03 07:33:18 +00:00
|
|
|
package c.q.a.j;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.graphics.Bitmap;
|
|
|
|
import android.graphics.BitmapFactory;
|
|
|
|
import android.graphics.Matrix;
|
|
|
|
import android.net.Uri;
|
|
|
|
import android.os.AsyncTask;
|
|
|
|
import android.util.Log;
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
import c.q.a.l.c;
|
2021-08-09 22:51:56 +00:00
|
|
|
import com.adjust.sdk.Constants;
|
|
|
|
import com.google.android.material.snackbar.BaseTransientBottomBar;
|
2021-08-03 07:33:18 +00:00
|
|
|
import com.yalantis.ucrop.UCropActivity;
|
2021-11-02 06:38:17 +00:00
|
|
|
import d0.z.d.m;
|
|
|
|
import f0.e0.g.e;
|
|
|
|
import f0.x;
|
|
|
|
import g0.g;
|
|
|
|
import g0.p;
|
|
|
|
import g0.y;
|
2021-08-03 07:33:18 +00:00
|
|
|
import java.io.File;
|
|
|
|
import java.io.FileOutputStream;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import java.io.OutputStream;
|
|
|
|
import java.util.Objects;
|
2021-08-10 21:19:22 +00:00
|
|
|
import okhttp3.Request;
|
2021-08-03 07:33:18 +00:00
|
|
|
import okhttp3.Response;
|
|
|
|
import okhttp3.ResponseBody;
|
|
|
|
/* compiled from: BitmapLoadTask */
|
|
|
|
public class b extends AsyncTask<Void, Void, a> {
|
|
|
|
public final Context a;
|
|
|
|
public Uri b;
|
|
|
|
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
2021-12-02 18:53:44 +00:00
|
|
|
public Uri f1579c;
|
2021-08-03 07:33:18 +00:00
|
|
|
public final int d;
|
|
|
|
public final int e;
|
|
|
|
public final c.q.a.h.b f;
|
|
|
|
|
|
|
|
/* compiled from: BitmapLoadTask */
|
|
|
|
public static class a {
|
|
|
|
public Bitmap a;
|
|
|
|
public c.q.a.i.b b;
|
|
|
|
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
2021-12-02 18:53:44 +00:00
|
|
|
public Exception f1580c;
|
2021-08-03 07:33:18 +00:00
|
|
|
|
|
|
|
public a(@NonNull Bitmap bitmap, @NonNull c.q.a.i.b bVar) {
|
|
|
|
this.a = bitmap;
|
|
|
|
this.b = bVar;
|
|
|
|
}
|
|
|
|
|
|
|
|
public a(@NonNull Exception exc) {
|
2021-12-02 18:53:44 +00:00
|
|
|
this.f1580c = exc;
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public b(@NonNull Context context, @NonNull Uri uri, @Nullable Uri uri2, int i, int i2, c.q.a.h.b bVar) {
|
|
|
|
this.a = context;
|
|
|
|
this.b = uri;
|
2021-12-02 18:53:44 +00:00
|
|
|
this.f1579c = uri2;
|
2021-08-03 07:33:18 +00:00
|
|
|
this.d = i;
|
|
|
|
this.e = i2;
|
|
|
|
this.f = bVar;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:28:0x0052 A[SYNTHETIC, Splitter:B:28:0x0052] */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:32:0x0057 A[SYNTHETIC, Splitter:B:32:0x0057] */
|
|
|
|
public final void a(@NonNull Uri uri, @Nullable Uri uri2) throws NullPointerException, IOException {
|
|
|
|
Throwable th;
|
|
|
|
InputStream inputStream;
|
|
|
|
Log.d("BitmapWorkerTask", "copyFile");
|
|
|
|
Objects.requireNonNull(uri2, "Output Uri is null - cannot copy image");
|
|
|
|
FileOutputStream fileOutputStream = null;
|
|
|
|
try {
|
|
|
|
inputStream = this.a.getContentResolver().openInputStream(uri);
|
|
|
|
try {
|
|
|
|
FileOutputStream fileOutputStream2 = new FileOutputStream(new File(uri2.getPath()));
|
|
|
|
if (inputStream != null) {
|
|
|
|
try {
|
|
|
|
byte[] bArr = new byte[1024];
|
|
|
|
while (true) {
|
|
|
|
int read = inputStream.read(bArr);
|
|
|
|
if (read > 0) {
|
|
|
|
fileOutputStream2.write(bArr, 0, read);
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
break;
|
|
|
|
} catch (IOException unused) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fileOutputStream2.close();
|
|
|
|
try {
|
|
|
|
inputStream.close();
|
|
|
|
} catch (IOException unused2) {
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
this.b = this.f1579c;
|
2021-08-03 07:33:18 +00:00
|
|
|
} catch (Throwable th2) {
|
|
|
|
th = th2;
|
|
|
|
fileOutputStream = fileOutputStream2;
|
|
|
|
if (fileOutputStream != null) {
|
|
|
|
try {
|
|
|
|
fileOutputStream.close();
|
|
|
|
} catch (IOException unused3) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (inputStream != null) {
|
|
|
|
try {
|
|
|
|
inputStream.close();
|
|
|
|
} catch (IOException unused4) {
|
|
|
|
}
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
this.b = this.f1579c;
|
2021-08-03 07:33:18 +00:00
|
|
|
throw th;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
throw new NullPointerException("InputStream for given input Uri is null");
|
|
|
|
}
|
|
|
|
} catch (Throwable th3) {
|
|
|
|
th = th3;
|
|
|
|
if (fileOutputStream != null) {
|
|
|
|
}
|
|
|
|
if (inputStream != null) {
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
this.b = this.f1579c;
|
2021-08-03 07:33:18 +00:00
|
|
|
throw th;
|
|
|
|
}
|
|
|
|
} catch (Throwable th4) {
|
|
|
|
th = th4;
|
|
|
|
inputStream = null;
|
|
|
|
if (fileOutputStream != null) {
|
|
|
|
}
|
|
|
|
if (inputStream != null) {
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
this.b = this.f1579c;
|
2021-08-03 07:33:18 +00:00
|
|
|
throw th;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:39:0x0080 A[SYNTHETIC, Splitter:B:39:0x0080] */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:43:0x0085 A[SYNTHETIC, Splitter:B:43:0x0085] */
|
|
|
|
public final void b(@NonNull Uri uri, @Nullable Uri uri2) throws NullPointerException, IOException {
|
|
|
|
Throwable th;
|
|
|
|
Response response;
|
|
|
|
p pVar;
|
|
|
|
ResponseBody responseBody;
|
|
|
|
g c2;
|
|
|
|
Log.d("BitmapWorkerTask", "downloadFile");
|
|
|
|
Objects.requireNonNull(uri2, "Output Uri is null - cannot download image");
|
|
|
|
x xVar = new x();
|
|
|
|
g gVar = null;
|
|
|
|
try {
|
2021-08-10 21:19:22 +00:00
|
|
|
Request.a aVar = new Request.a();
|
2021-08-03 07:33:18 +00:00
|
|
|
aVar.f(uri.toString());
|
|
|
|
try {
|
|
|
|
response = ((e) xVar.b(aVar.a())).execute();
|
|
|
|
try {
|
2021-12-02 18:53:44 +00:00
|
|
|
c2 = response.p.c();
|
2021-08-03 07:33:18 +00:00
|
|
|
} catch (Throwable th2) {
|
|
|
|
th = th2;
|
|
|
|
pVar = null;
|
|
|
|
if (gVar != null) {
|
|
|
|
}
|
|
|
|
if (pVar != null) {
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
responseBody.close();
|
|
|
|
} catch (IOException unused) {
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
xVar.m.a();
|
|
|
|
this.b = this.f1579c;
|
2021-08-03 07:33:18 +00:00
|
|
|
throw th;
|
|
|
|
}
|
|
|
|
} catch (Throwable th3) {
|
|
|
|
th = th3;
|
|
|
|
response = null;
|
|
|
|
pVar = null;
|
|
|
|
if (gVar != null) {
|
|
|
|
}
|
|
|
|
if (pVar != null) {
|
|
|
|
}
|
|
|
|
responseBody.close();
|
2021-12-02 18:53:44 +00:00
|
|
|
xVar.m.a();
|
|
|
|
this.b = this.f1579c;
|
2021-08-03 07:33:18 +00:00
|
|
|
throw th;
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
OutputStream openOutputStream = this.a.getContentResolver().openOutputStream(uri2);
|
|
|
|
if (openOutputStream != null) {
|
|
|
|
m.checkParameterIsNotNull(openOutputStream, "$this$sink");
|
|
|
|
pVar = new p(openOutputStream, new y());
|
|
|
|
try {
|
2021-11-05 06:48:17 +00:00
|
|
|
c2.k0(pVar);
|
2021-08-03 07:33:18 +00:00
|
|
|
try {
|
|
|
|
c2.close();
|
|
|
|
} catch (IOException unused2) {
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
pVar.close();
|
|
|
|
} catch (IOException unused3) {
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
ResponseBody responseBody2 = response.p;
|
2021-08-03 07:33:18 +00:00
|
|
|
if (responseBody2 != null) {
|
|
|
|
try {
|
|
|
|
responseBody2.close();
|
|
|
|
} catch (IOException unused4) {
|
|
|
|
}
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
xVar.m.a();
|
|
|
|
this.b = this.f1579c;
|
2021-08-03 07:33:18 +00:00
|
|
|
} catch (Throwable th4) {
|
|
|
|
th = th4;
|
|
|
|
gVar = c2;
|
|
|
|
if (gVar != null) {
|
|
|
|
}
|
|
|
|
if (pVar != null) {
|
|
|
|
}
|
|
|
|
responseBody.close();
|
2021-12-02 18:53:44 +00:00
|
|
|
xVar.m.a();
|
|
|
|
this.b = this.f1579c;
|
2021-08-03 07:33:18 +00:00
|
|
|
throw th;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
throw new NullPointerException("OutputStream for given output Uri is null");
|
|
|
|
}
|
|
|
|
} catch (Throwable th5) {
|
|
|
|
th = th5;
|
|
|
|
pVar = null;
|
|
|
|
gVar = c2;
|
|
|
|
if (gVar != null) {
|
|
|
|
try {
|
|
|
|
gVar.close();
|
|
|
|
} catch (IOException unused5) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (pVar != null) {
|
|
|
|
try {
|
|
|
|
pVar.close();
|
|
|
|
} catch (IOException unused6) {
|
|
|
|
}
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
if (!(response == null || (responseBody = response.p) == null)) {
|
2021-08-03 07:33:18 +00:00
|
|
|
responseBody.close();
|
|
|
|
}
|
2021-12-02 18:53:44 +00:00
|
|
|
xVar.m.a();
|
|
|
|
this.b = this.f1579c;
|
2021-08-03 07:33:18 +00:00
|
|
|
throw th;
|
|
|
|
}
|
|
|
|
} catch (Throwable th6) {
|
|
|
|
th = th6;
|
|
|
|
response = null;
|
|
|
|
pVar = null;
|
|
|
|
if (gVar != null) {
|
|
|
|
}
|
|
|
|
if (pVar != null) {
|
|
|
|
}
|
|
|
|
responseBody.close();
|
2021-12-02 18:53:44 +00:00
|
|
|
xVar.m.a();
|
|
|
|
this.b = this.f1579c;
|
2021-08-03 07:33:18 +00:00
|
|
|
throw th;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void c() throws NullPointerException, IOException {
|
|
|
|
String scheme = this.b.getScheme();
|
|
|
|
Log.d("BitmapWorkerTask", "Uri scheme: " + scheme);
|
2021-08-09 22:51:56 +00:00
|
|
|
if ("http".equals(scheme) || Constants.SCHEME.equals(scheme)) {
|
2021-08-03 07:33:18 +00:00
|
|
|
try {
|
2021-12-02 18:53:44 +00:00
|
|
|
b(this.b, this.f1579c);
|
2021-08-03 07:33:18 +00:00
|
|
|
} catch (IOException | NullPointerException e) {
|
|
|
|
Log.e("BitmapWorkerTask", "Downloading failed", e);
|
|
|
|
throw e;
|
|
|
|
}
|
|
|
|
} else if ("content".equals(scheme)) {
|
|
|
|
try {
|
2021-12-02 18:53:44 +00:00
|
|
|
a(this.b, this.f1579c);
|
2021-08-03 07:33:18 +00:00
|
|
|
} catch (IOException | NullPointerException e2) {
|
|
|
|
Log.e("BitmapWorkerTask", "Copying failed", e2);
|
|
|
|
throw e2;
|
|
|
|
}
|
|
|
|
} else if (!"file".equals(scheme)) {
|
|
|
|
Log.e("BitmapWorkerTask", "Invalid Uri scheme " + scheme);
|
2021-11-05 06:48:17 +00:00
|
|
|
throw new IllegalArgumentException(c.d.b.a.a.v("Invalid Uri scheme", scheme));
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 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[]] */
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:120:?, code lost:
|
|
|
|
return new c.q.a.j.b.a(new java.lang.IllegalArgumentException(r2.toString(), r0));
|
|
|
|
*/
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:50:0x00b7, code lost:
|
|
|
|
r0 = move-exception;
|
|
|
|
*/
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:51:0x00b8, code lost:
|
|
|
|
android.util.Log.e("BitmapWorkerTask", "doInBackground: ImageDecoder.createSource: ", r0);
|
2021-11-05 06:48:17 +00:00
|
|
|
r2 = c.d.b.a.a.R("Bitmap could not be decoded from the Uri: [");
|
2021-08-03 07:33:18 +00:00
|
|
|
r2.append(r13.b);
|
|
|
|
r2.append("]");
|
|
|
|
*/
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:52:0x00d9, code lost:
|
|
|
|
r5 = move-exception;
|
|
|
|
*/
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:53:0x00da, code lost:
|
|
|
|
android.util.Log.e("BitmapWorkerTask", "doInBackground: BitmapFactory.decodeFileDescriptor: ", r5);
|
|
|
|
r1.inSampleSize *= 2;
|
|
|
|
*/
|
|
|
|
/* JADX WARNING: Failed to process nested try/catch */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:52:0x00d9 A[ExcHandler: OutOfMemoryError (r5v3 'e' java.lang.OutOfMemoryError A[CUSTOM_DECLARE]), PHI: r12
|
|
|
|
PHI: (r12v5 android.graphics.Bitmap) = (r12v1 android.graphics.Bitmap), (r12v1 android.graphics.Bitmap), (r12v1 android.graphics.Bitmap), (r12v1 android.graphics.Bitmap), (r12v6 android.graphics.Bitmap), (r12v6 android.graphics.Bitmap), (r12v6 android.graphics.Bitmap), (r12v6 android.graphics.Bitmap) binds: [B:18:0x004e, B:19:?, B:46:0x00b3, B:47:?, B:40:0x00aa, B:41:?, B:26:0x0069, B:27:?] A[DONT_GENERATE, DONT_INLINE], Splitter:B:18:0x004e] */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:69:0x013c */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:70:0x013e */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:71:0x0141 */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:72:0x0144 */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:83:0x015e */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:85:0x0164 */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:88:0x0170 */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:96:0x0194 */
|
|
|
|
@Override // android.os.AsyncTask
|
|
|
|
@NonNull
|
|
|
|
public a doInBackground(Void[] voidArr) {
|
|
|
|
int i;
|
|
|
|
int i2;
|
|
|
|
int i3;
|
|
|
|
Matrix matrix;
|
|
|
|
a aVar;
|
|
|
|
boolean z2;
|
|
|
|
if (this.b == null) {
|
|
|
|
return new a(new NullPointerException("Input Uri cannot be null"));
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
c();
|
|
|
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
|
|
|
options.inJustDecodeBounds = true;
|
|
|
|
int i4 = this.d;
|
|
|
|
int i5 = this.e;
|
|
|
|
int i6 = options.outHeight;
|
|
|
|
int i7 = options.outWidth;
|
|
|
|
if (i6 > i5 || i7 > i4) {
|
|
|
|
int i8 = 1;
|
|
|
|
while (true) {
|
|
|
|
if (i6 / i8 <= i5 && i7 / i8 <= i4) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
i8 *= 2;
|
|
|
|
}
|
|
|
|
i = i8;
|
|
|
|
} else {
|
|
|
|
i = 1;
|
|
|
|
}
|
|
|
|
options.inSampleSize = i;
|
|
|
|
options.inJustDecodeBounds = false;
|
|
|
|
boolean z3 = false;
|
|
|
|
Bitmap bitmap = null;
|
|
|
|
while (true) {
|
|
|
|
int i9 = -1;
|
|
|
|
if (!z3) {
|
|
|
|
try {
|
|
|
|
InputStream openInputStream = this.a.getContentResolver().openInputStream(this.b);
|
|
|
|
try {
|
|
|
|
bitmap = BitmapFactory.decodeStream(openInputStream, null, options);
|
|
|
|
if (options.outWidth == -1 || options.outHeight == -1) {
|
|
|
|
aVar = new a(new IllegalArgumentException("Bounds for bitmap could not be retrieved from the Uri: [" + this.b + "]"));
|
|
|
|
if (openInputStream == null) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
openInputStream.close();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if ((bitmap != null ? bitmap.getByteCount() : 0) > 104857600) {
|
|
|
|
options.inSampleSize *= 2;
|
|
|
|
z2 = true;
|
|
|
|
} else {
|
|
|
|
z2 = false;
|
|
|
|
}
|
|
|
|
if (!z2) {
|
|
|
|
z3 = true;
|
|
|
|
}
|
|
|
|
} finally {
|
|
|
|
if (openInputStream == null) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
openInputStream.close();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
} catch (IOException unused) {
|
|
|
|
} catch (OutOfMemoryError e) {
|
|
|
|
}
|
|
|
|
} else if (bitmap == null) {
|
2021-11-05 06:48:17 +00:00
|
|
|
StringBuilder R = c.d.b.a.a.R("Bitmap could not be decoded from the Uri: [");
|
|
|
|
R.append(this.b);
|
|
|
|
R.append("]");
|
|
|
|
return new a(new IllegalArgumentException(R.toString()));
|
2021-08-03 07:33:18 +00:00
|
|
|
} else {
|
|
|
|
Context context = this.a;
|
|
|
|
Uri uri = this.b;
|
|
|
|
try {
|
|
|
|
InputStream openInputStream2 = context.getContentResolver().openInputStream(uri);
|
|
|
|
if (openInputStream2 == null) {
|
|
|
|
i2 = 0;
|
|
|
|
switch (i2) {
|
|
|
|
case 3:
|
|
|
|
case 4:
|
2021-08-09 22:51:56 +00:00
|
|
|
i3 = BaseTransientBottomBar.ANIMATION_FADE_DURATION;
|
2021-08-03 07:33:18 +00:00
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
case 6:
|
|
|
|
i3 = 90;
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
case 8:
|
|
|
|
i3 = 270;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
i3 = 0;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (!(i2 == 2 || i2 == 7 || i2 == 4 || i2 == 5)) {
|
|
|
|
i9 = 1;
|
|
|
|
}
|
|
|
|
c.q.a.i.b bVar = new c.q.a.i.b(i2, i3, i9);
|
|
|
|
matrix = new Matrix();
|
|
|
|
if (i3 != 0) {
|
|
|
|
matrix.preRotate((float) i3);
|
|
|
|
}
|
|
|
|
if (i9 != 1) {
|
|
|
|
matrix.postScale((float) i9, 1.0f);
|
|
|
|
}
|
|
|
|
if (!matrix.isIdentity()) {
|
|
|
|
return new a(bitmap, bVar);
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
Bitmap createBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
|
|
|
|
if (!bitmap.sameAs(createBitmap)) {
|
|
|
|
bitmap = createBitmap;
|
|
|
|
}
|
|
|
|
} catch (OutOfMemoryError e2) {
|
|
|
|
Log.e("BitmapLoadUtils", "transformBitmap: ", e2);
|
|
|
|
}
|
|
|
|
return new a(bitmap, bVar);
|
|
|
|
}
|
2021-11-05 06:48:17 +00:00
|
|
|
i2 = new c.q.a.k.b(openInputStream2).a();
|
2021-08-03 07:33:18 +00:00
|
|
|
try {
|
|
|
|
openInputStream2.close();
|
|
|
|
} catch (IOException unused2) {
|
|
|
|
}
|
|
|
|
switch (i2) {
|
|
|
|
}
|
|
|
|
i9 = 1;
|
|
|
|
c.q.a.i.b bVar = new c.q.a.i.b(i2, i3, i9);
|
|
|
|
matrix = new Matrix();
|
|
|
|
if (i3 != 0) {
|
|
|
|
}
|
|
|
|
if (i9 != 1) {
|
|
|
|
}
|
|
|
|
if (!matrix.isIdentity()) {
|
|
|
|
}
|
|
|
|
} catch (IOException e3) {
|
2021-11-05 06:48:17 +00:00
|
|
|
StringBuilder R2 = c.d.b.a.a.R("getExifOrientation: ");
|
|
|
|
R2.append(uri.toString());
|
|
|
|
Log.e("BitmapLoadUtils", R2.toString(), e3);
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (IOException | NullPointerException e4) {
|
|
|
|
return new a(e4);
|
|
|
|
}
|
|
|
|
return aVar;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
|
|
@Override // android.os.AsyncTask
|
|
|
|
public void onPostExecute(@NonNull a aVar) {
|
|
|
|
a aVar2 = aVar;
|
2021-12-02 18:53:44 +00:00
|
|
|
Exception exc = aVar2.f1580c;
|
2021-08-03 07:33:18 +00:00
|
|
|
if (exc == null) {
|
|
|
|
c.q.a.h.b bVar = this.f;
|
|
|
|
Bitmap bitmap = aVar2.a;
|
|
|
|
c.q.a.i.b bVar2 = aVar2.b;
|
|
|
|
String path = this.b.getPath();
|
2021-12-02 18:53:44 +00:00
|
|
|
Uri uri = this.f1579c;
|
2021-08-03 07:33:18 +00:00
|
|
|
String path2 = uri == null ? null : uri.getPath();
|
2021-11-05 06:48:17 +00:00
|
|
|
c cVar = ((c.q.a.l.b) bVar).a;
|
2021-12-02 18:53:44 +00:00
|
|
|
cVar.v = path;
|
|
|
|
cVar.w = path2;
|
|
|
|
cVar.f1588x = bVar2;
|
|
|
|
cVar.f1587s = true;
|
2021-08-03 07:33:18 +00:00
|
|
|
cVar.setImageBitmap(bitmap);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
c.q.a.l.b bVar3 = (c.q.a.l.b) this.f;
|
|
|
|
Objects.requireNonNull(bVar3);
|
|
|
|
Log.e("TransformImageView", "onFailure: setImageUri", exc);
|
2021-12-02 18:53:44 +00:00
|
|
|
c.a aVar3 = bVar3.a.p;
|
2021-08-03 07:33:18 +00:00
|
|
|
if (aVar3 != null) {
|
|
|
|
UCropActivity.a aVar4 = (UCropActivity.a) aVar3;
|
|
|
|
UCropActivity.this.b(exc);
|
|
|
|
UCropActivity.this.finish();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|