package com.linecorp.linesdk.auth.internal;

import X.7lW;
import X.8uQ;
import X.C5690M9x;
import X.MCK;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import com.linecorp.linesdk.LineAccessToken;
import com.linecorp.linesdk.LineApiError;
import com.linecorp.linesdk.LineCredential;
import com.linecorp.linesdk.LineProfile;
import com.linecorp.linesdk.a.a.d;
import com.linecorp.linesdk.a.e;
import com.linecorp.linesdk.a.f;
import com.linecorp.linesdk.auth.LineAuthenticationConfig;
import com.linecorp.linesdk.auth.LineLoginResult;
import com.linecorp.linesdk.auth.internal.d;
import java.util.Collections;
import java.util.HashMap;

public final class c {
    public final LineAuthenticationActivity LIZ;
    public final LineAuthenticationConfig LIZIZ;
    public final com.linecorp.linesdk.a.a.b LIZJ;
    public final d LIZLLL;
    public final a LJ;
    public final com.linecorp.linesdk.a.a LJFF;
    public final String[] LJI;
    public final d LJII;

    static {
        Covode.recordClassIndex(46053);
    }

    public class b implements Runnable {
        static {
            Covode.recordClassIndex(46055);
        }

        public final void run() {
            if (c.this.LJII.LIZLLL != d.a.LIZJ && !c.this.LIZ.isFinishing()) {
                c.this.LIZ.LIZ(LineLoginResult.LIZ);
            }
        }

        public b() {
        }

        public /* synthetic */ b(c cVar, byte b) {
            this();
        }
    }

    public class a extends AsyncTask<String, Void, LineLoginResult> {
        static {
            Covode.recordClassIndex(46054);
        }

        public a() {
        }

        public final /* synthetic */ void onPostExecute(Object obj) {
            c.this.LJII.LIZLLL = d.a.LIZLLL;
            c.this.LIZ.LIZ((LineLoginResult) obj);
        }

        public final /* synthetic */ Object doInBackground(Object[] objArr) {
            String str;
            String[] strArr = (String[]) objArr;
            if (strArr == null || strArr.length != 1) {
                str = null;
            } else {
                str = strArr[0];
            }
            f fVar = c.this.LJII.LIZ;
            String str2 = c.this.LJII.LIZIZ;
            if (TextUtils.isEmpty(str) || fVar == null || TextUtils.isEmpty(str2)) {
                return new LineLoginResult(C5690M9x.INTERNAL_ERROR, new LineApiError("Requested data is missing."));
            }
            com.linecorp.linesdk.a.a.b bVar = c.this.LIZJ;
            String str3 = c.this.LIZIZ.LIZ;
            Uri build = bVar.LJFF.buildUpon().appendPath("oauth").appendPath("accessToken").build();
            HashMap hashMap = new HashMap(5);
            hashMap.put("grant_type", "authorization_code");
            hashMap.put("code", str);
            hashMap.put("redirect_uri", str2);
            hashMap.put("client_id", str3);
            hashMap.put("otp", fVar.LIZIZ);
            MCK<e> LIZ2 = bVar.LJI.LIZ(build, Collections.emptyMap(), hashMap, com.linecorp.linesdk.a.a.b.LIZIZ);
            if (!LIZ2.LIZ()) {
                return c.LIZ((MCK) LIZ2);
            }
            e LIZIZ = LIZ2.LIZIZ();
            com.linecorp.linesdk.a.d dVar = LIZIZ.LIZ;
            com.linecorp.linesdk.a.a.d dVar2 = c.this.LIZLLL;
            Uri build2 = dVar2.LIZIZ.buildUpon().appendPath("profile").build();
            HashMap hashMap2 = new HashMap(1);
            hashMap2.put("Authorization", "Bearer " + dVar.LIZ);
            MCK<LineProfile> LIZIZ2 = dVar2.LIZJ.LIZIZ(build2, hashMap2, Collections.emptyMap(), com.linecorp.linesdk.a.a.d.LIZ);
            if (!LIZIZ2.LIZ()) {
                return c.LIZ((MCK) LIZIZ2);
            }
            com.linecorp.linesdk.a.a aVar = c.this.LJFF;
            8uQ.LIZ(aVar.LIZ, aVar.LIZIZ, 0).edit().putString("accessToken", aVar.LIZ(dVar.LIZ)).putString("expiresIn", aVar.LIZ(dVar.LIZIZ)).putString("issuedClientTime", aVar.LIZ(dVar.LIZJ)).putString("refreshToken", aVar.LIZ(dVar.LIZLLL)).apply();
            return new LineLoginResult(LIZIZ2.LIZIZ(), new LineCredential(new LineAccessToken(dVar.LIZ, dVar.LIZIZ, dVar.LIZJ), LIZIZ.LIZIZ));
        }

        public /* synthetic */ a(c cVar, byte b) {
            this();
        }
    }

    /* renamed from: com.linecorp.linesdk.auth.internal.c$c  reason: collision with other inner class name */
    public class C0003c extends AsyncTask<Void, Void, MCK<f>> {
        static {
            Covode.recordClassIndex(46056);
        }

        public C0003c() {
        }

        public static Bundle LIZ(Intent intent) {
            try {
                return intent.getExtras();
            } catch (Exception unused) {
                return null;
            }
        }

        public final /* synthetic */ Object doInBackground(Object[] objArr) {
            com.linecorp.linesdk.a.a.b bVar = c.this.LIZJ;
            String str = c.this.LIZIZ.LIZ;
            Uri build = bVar.LJFF.buildUpon().appendPath("oauth").appendPath("otp").build();
            HashMap hashMap = new HashMap(1);
            hashMap.put("client_id", str);
            return bVar.LJI.LIZ(build, Collections.emptyMap(), hashMap, com.linecorp.linesdk.a.a.b.LIZ);
        }

        /* JADX WARNING: Code restructure failed: missing block: B:38:0x0139, code lost:
            if (r11.LIZJ >= r9.LIZJ) goto L_0x013b;
         */
        /* JADX WARNING: Removed duplicated region for block: B:43:0x0142 A[SYNTHETIC, Splitter:B:43:0x0142] */
        /* JADX WARNING: Removed duplicated region for block: B:45:0x0155 A[Catch:{ ActivityNotFoundException -> 0x01ea }] */
        /* Code decompiled incorrectly, please refer to instructions dump. */
        public final /* synthetic */ void onPostExecute(java.lang.Object r18) {
            /*
                r17 = this;
                r3 = r18
                r2 = r17
                X.MCK r3 = (X.MCK) r3
                boolean r0 = r3.LIZ()
                if (r0 != 0) goto L_0x0020
                com.linecorp.linesdk.auth.internal.c r0 = com.linecorp.linesdk.auth.internal.c.this
                com.linecorp.linesdk.auth.internal.d r1 = r0.LJII
                int r0 = com.linecorp.linesdk.auth.internal.d.a.LIZLLL
                r1.LIZLLL = r0
                com.linecorp.linesdk.auth.internal.c r0 = com.linecorp.linesdk.auth.internal.c.this
                com.linecorp.linesdk.auth.internal.LineAuthenticationActivity r1 = r0.LIZ
                com.linecorp.linesdk.auth.LineLoginResult r0 = com.linecorp.linesdk.auth.internal.c.LIZ((X.MCK) r3)
                r1.LIZ(r0)
                return
            L_0x0020:
                java.lang.Object r8 = r3.LIZIZ()
                com.linecorp.linesdk.a.f r8 = (com.linecorp.linesdk.a.f) r8
                com.linecorp.linesdk.auth.internal.c r0 = com.linecorp.linesdk.auth.internal.c.this
                com.linecorp.linesdk.auth.internal.d r0 = r0.LJII
                r0.LIZ = r8
                com.linecorp.linesdk.auth.internal.c r0 = com.linecorp.linesdk.auth.internal.c.this     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.internal.a r11 = r0.LJ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.internal.c r0 = com.linecorp.linesdk.auth.internal.c.this     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.internal.LineAuthenticationActivity r10 = r0.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.internal.c r0 = com.linecorp.linesdk.auth.internal.c.this     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.LineAuthenticationConfig r6 = r0.LIZIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.internal.c r0 = com.linecorp.linesdk.auth.internal.c.this     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String[] r7 = r0.LJI     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r12 = 8
                byte[] r9 = new byte[r12]     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.security.SecureRandom r0 = new java.security.SecureRandom     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r0.<init>()     // Catch:{ ActivityNotFoundException -> 0x01ea }
                long r0 = r0.nextLong()     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r4 = 0
                r5 = 0
            L_0x004b:
                int r3 = (int) r0     // Catch:{ ActivityNotFoundException -> 0x01ea }
                byte r3 = (byte) r3     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r9[r5] = r3     // Catch:{ ActivityNotFoundException -> 0x01ea }
                long r0 = r0 >> r12
                int r5 = r5 + 1
                if (r5 >= r12) goto L_0x0055
                goto L_0x004b
            L_0x0055:
                r0 = 11
                java.lang.String r9 = android.util.Base64.encodeToString(r9, r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.internal.d r0 = r11.LIZIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r0.LIZJ = r9     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.StringBuilder r1 = new java.lang.StringBuilder     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r0 = "intent://result#Intent;package="
                r1.<init>(r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r0 = r10.getPackageName()     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r1.append(r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r0 = ";scheme=lineauth;end"
                r1.append(r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r3 = r1.toString()     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.net.Uri r0 = r6.LIZJ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.net.Uri$Builder r5 = r0.buildUpon()     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r1 = "response_type"
                java.lang.String r0 = "code"
                android.net.Uri$Builder r5 = r5.appendQueryParameter(r1, r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r1 = "client_id"
                java.lang.String r0 = r6.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.net.Uri$Builder r1 = r5.appendQueryParameter(r1, r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r0 = "state"
                android.net.Uri$Builder r5 = r1.appendQueryParameter(r0, r9)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r1 = "otpId"
                java.lang.String r0 = r8.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.net.Uri$Builder r1 = r5.appendQueryParameter(r1, r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r0 = "redirect_uri"
                android.net.Uri$Builder r5 = r1.appendQueryParameter(r0, r3)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                if (r7 == 0) goto L_0x00b0
                int r0 = r7.length     // Catch:{ ActivityNotFoundException -> 0x01ea }
                if (r0 <= 0) goto L_0x00b0
                java.lang.String r1 = "scope"
                java.lang.String r0 = " "
                java.lang.String r0 = android.text.TextUtils.join(r0, r7)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r5.appendQueryParameter(r1, r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
            L_0x00b0:
                android.net.Uri r5 = r5.build()     // Catch:{ ActivityNotFoundException -> 0x01ea }
                boolean r8 = r6.LIZLLL     // Catch:{ ActivityNotFoundException -> 0x01ea }
                X.04w r7 = new X.04w     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r7.<init>()     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r0 = 17170443(0x106000b, float:2.4611944E-38)
                int r6 = X.070.LIZJ(r10, r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.content.Intent r1 = r7.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r0 = "android.support.customtabs.extra.TOOLBAR_COLOR"
                r1.putExtra(r0, r6)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                X.04x r1 = r7.LIZ()     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.content.Intent r0 = r1.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.content.Intent r7 = r0.setData(r5)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.os.Bundle r1 = r1.LIZIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.internal.b r11 = com.linecorp.linesdk.auth.internal.b.LIZ(r10)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                if (r11 != 0) goto L_0x0114
                com.linecorp.linesdk.auth.internal.a$a r0 = new com.linecorp.linesdk.auth.internal.a$a     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r0.<init>(r7, r1, r4)     // Catch:{ ActivityNotFoundException -> 0x01ea }
            L_0x00e0:
                com.linecorp.linesdk.auth.internal.a$b r5 = new com.linecorp.linesdk.auth.internal.a$b     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.content.Intent r4 = r0.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.os.Bundle r1 = r0.LIZIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                boolean r0 = r0.LIZJ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r5.<init>(r4, r1, r3, r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                boolean r0 = r5.LIZLLL     // Catch:{ ActivityNotFoundException -> 0x01ea }
                if (r0 == 0) goto L_0x0107
                com.linecorp.linesdk.auth.internal.c r0 = com.linecorp.linesdk.auth.internal.c.this     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.internal.LineAuthenticationActivity r3 = r0.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.content.Intent r1 = r5.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.os.Bundle r0 = r5.LIZIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                X.3i8.LIZ(r1, r3)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r3.startActivity(r1, r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
            L_0x00fd:
                com.linecorp.linesdk.auth.internal.c r0 = com.linecorp.linesdk.auth.internal.c.this     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.internal.d r1 = r0.LJII     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r0 = r5.LIZJ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r1.LIZIZ = r0     // Catch:{ ActivityNotFoundException -> 0x01ea }
                goto L_0x01d9
            L_0x0107:
                com.linecorp.linesdk.auth.internal.c r0 = com.linecorp.linesdk.auth.internal.c.this     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.internal.LineAuthenticationActivity r4 = r0.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.content.Intent r3 = r5.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r1 = 3
                android.os.Bundle r0 = r5.LIZIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r4.startActivityForResult(r3, r1, r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                goto L_0x00fd
            L_0x0114:
                r6 = 1
                if (r8 != 0) goto L_0x013d
                com.linecorp.linesdk.auth.internal.b r9 = com.linecorp.linesdk.auth.internal.a.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                if (r9 == 0) goto L_0x013d
                int r8 = r11.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                int r0 = r9.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                if (r8 == r0) goto L_0x0128
                int r8 = r11.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                int r0 = r9.LIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                if (r8 < r0) goto L_0x013d
                goto L_0x013b
            L_0x0128:
                int r8 = r11.LIZIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                int r0 = r9.LIZIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                if (r8 == r0) goto L_0x0135
                int r8 = r11.LIZIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                int r0 = r9.LIZIZ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                if (r8 < r0) goto L_0x013d
                goto L_0x013b
            L_0x0135:
                int r8 = r11.LIZJ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                int r0 = r9.LIZJ     // Catch:{ ActivityNotFoundException -> 0x01ea }
                if (r8 < r0) goto L_0x013d
            L_0x013b:
                r0 = 1
                goto L_0x013e
            L_0x013d:
                r0 = 0
            L_0x013e:
                java.lang.String r9 = "android.intent.action.VIEW"
                if (r0 == 0) goto L_0x0155
                android.content.Intent r4 = new android.content.Intent     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r4.<init>(r9)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r4.setData(r5)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r0 = "jp.naver.line.android"
                r4.setPackage(r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.internal.a$a r0 = new com.linecorp.linesdk.auth.internal.a$a     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r0.<init>(r4, r1, r6)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                goto L_0x00e0
            L_0x0155:
                android.content.Intent r0 = new android.content.Intent     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r8 = "http://"
                android.net.Uri r8 = android.net.Uri.parse(r8)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r0.<init>(r9, r8)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.content.pm.PackageManager r10 = r10.getPackageManager()     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r8 = 101311(0x18bbf, float:1.41967E-40)
                X.3GY.LIZ(r8)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r9 = 0
                r8 = 2
                java.lang.Object[] r11 = new java.lang.Object[r8]     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r11[r4] = r0     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.Integer r8 = java.lang.Integer.valueOf(r4)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r11[r6] = r8     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r12 = 101311(0x18bbf, float:1.41967E-40)
                java.lang.String r13 = "java.util.List"
                r14 = 0
                r15 = -1070753589(0xffffffffc02d98cb, float:-2.7124507)
                r16 = 2
                android.util.Pair r9 = X.3GY.LIZ(r9, r10, r11, r12, r13, r14, r15, r16)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.Object r8 = r9.first     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.Boolean r8 = (java.lang.Boolean) r8     // Catch:{ ActivityNotFoundException -> 0x01ea }
                boolean r8 = r8.booleanValue()     // Catch:{ ActivityNotFoundException -> 0x01ea }
                if (r8 == 0) goto L_0x01a2
                java.lang.Object r8 = r9.second     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.util.Collection r8 = (java.util.Collection) r8     // Catch:{ ActivityNotFoundException -> 0x01ea }
            L_0x0193:
                android.os.Bundle r0 = LIZ(r7)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.util.List r7 = com.linecorp.linesdk.auth.internal.a.LIZ(r5, r8, r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                int r0 = r7.size()     // Catch:{ ActivityNotFoundException -> 0x01ea }
                if (r0 == 0) goto L_0x01da
                goto L_0x01a7
            L_0x01a2:
                java.util.List r8 = r10.queryIntentActivities(r0, r4)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                goto L_0x0193
            L_0x01a7:
                if (r0 != r6) goto L_0x01b6
                com.linecorp.linesdk.auth.internal.a$a r0 = new com.linecorp.linesdk.auth.internal.a$a     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.Object r5 = r7.get(r4)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.content.Intent r5 = (android.content.Intent) r5     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r0.<init>(r5, r1, r4)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                goto L_0x00e0
            L_0x01b6:
                java.lang.Object r5 = r7.remove(r4)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.content.Intent r5 = (android.content.Intent) r5     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r0 = 0
                android.content.Intent r6 = android.content.Intent.createChooser(r5, r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r5 = "android.intent.extra.INITIAL_INTENTS"
                int r0 = r7.size()     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.os.Parcelable[] r0 = new android.os.Parcelable[r0]     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.Object[] r0 = r7.toArray(r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                android.os.Parcelable[] r0 = (android.os.Parcelable[]) r0     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r6.putExtra(r5, r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                com.linecorp.linesdk.auth.internal.a$a r0 = new com.linecorp.linesdk.auth.internal.a$a     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r0.<init>(r6, r1, r4)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                goto L_0x00e0
            L_0x01d9:
                return
            L_0x01da:
                android.content.ActivityNotFoundException r3 = new android.content.ActivityNotFoundException     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r1 = "Activity for LINE log-in is not found. uri="
                java.lang.String r0 = java.lang.String.valueOf(r5)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                java.lang.String r0 = r1.concat(r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                r3.<init>(r0)     // Catch:{ ActivityNotFoundException -> 0x01ea }
                throw r3     // Catch:{ ActivityNotFoundException -> 0x01ea }
            L_0x01ea:
                r4 = move-exception
                com.linecorp.linesdk.auth.internal.c r0 = com.linecorp.linesdk.auth.internal.c.this
                com.linecorp.linesdk.auth.internal.d r1 = r0.LJII
                int r0 = com.linecorp.linesdk.auth.internal.d.a.LIZLLL
                r1.LIZLLL = r0
                com.linecorp.linesdk.auth.internal.c r0 = com.linecorp.linesdk.auth.internal.c.this
                com.linecorp.linesdk.auth.internal.LineAuthenticationActivity r3 = r0.LIZ
                com.linecorp.linesdk.auth.LineLoginResult r2 = new com.linecorp.linesdk.auth.LineLoginResult
                X.M9x r1 = X.C5690M9x.INTERNAL_ERROR
                com.linecorp.linesdk.LineApiError r0 = new com.linecorp.linesdk.LineApiError
                r0.<init>((java.lang.Exception) r4)
                r2.<init>((X.C5690M9x) r1, (com.linecorp.linesdk.LineApiError) r0)
                r3.LIZ(r2)
                return
            */
            throw new UnsupportedOperationException("Method not decompiled: com.linecorp.linesdk.auth.internal.c.C0003c.onPostExecute(java.lang.Object):void");
        }

        public /* synthetic */ C0003c(c cVar, byte b) {
            this();
        }
    }

    public static Context LIZ(LineAuthenticationActivity lineAuthenticationActivity) {
        Context applicationContext = lineAuthenticationActivity.getApplicationContext();
        if (7lW.LIZJ && applicationContext == null) {
            return 7lW.LIZ;
        }
        return applicationContext;
    }

    public static /* synthetic */ LineLoginResult LIZ(MCK mck) {
        return new LineLoginResult(mck.LIZIZ, mck.LIZJ);
    }

    /* JADX WARNING: Illegal instructions before constructor call */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public c(com.linecorp.linesdk.auth.internal.LineAuthenticationActivity r11, com.linecorp.linesdk.auth.LineAuthenticationConfig r12, com.linecorp.linesdk.auth.internal.d r13, java.lang.String[] r14) {
        /*
            r10 = this;
            com.linecorp.linesdk.a.a.b r4 = new com.linecorp.linesdk.a.a.b
            r2 = r11
            android.content.Context r1 = LIZ((com.linecorp.linesdk.auth.internal.LineAuthenticationActivity) r2)
            r3 = r12
            android.net.Uri r0 = r3.LIZIZ
            r4.<init>((android.content.Context) r1, (android.net.Uri) r0)
            com.linecorp.linesdk.a.a.d r5 = new com.linecorp.linesdk.a.a.d
            android.content.Context r1 = LIZ((com.linecorp.linesdk.auth.internal.LineAuthenticationActivity) r2)
            android.net.Uri r0 = r3.LIZIZ
            r5.<init>((android.content.Context) r1, (android.net.Uri) r0)
            com.linecorp.linesdk.auth.internal.a r6 = new com.linecorp.linesdk.auth.internal.a
            r8 = r13
            r6.<init>(r8)
            com.linecorp.linesdk.a.a r7 = new com.linecorp.linesdk.a.a
            android.content.Context r1 = LIZ((com.linecorp.linesdk.auth.internal.LineAuthenticationActivity) r2)
            java.lang.String r0 = r3.LIZ
            r7.<init>(r1, r0)
            r1 = r10
            r9 = r14
            r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.linecorp.linesdk.auth.internal.c.<init>(com.linecorp.linesdk.auth.internal.LineAuthenticationActivity, com.linecorp.linesdk.auth.LineAuthenticationConfig, com.linecorp.linesdk.auth.internal.d, java.lang.String[]):void");
    }

    public c(LineAuthenticationActivity lineAuthenticationActivity, LineAuthenticationConfig lineAuthenticationConfig, com.linecorp.linesdk.a.a.b bVar, com.linecorp.linesdk.a.a.d dVar, a aVar, com.linecorp.linesdk.a.a aVar2, d dVar2, String[] strArr) {
        this.LIZ = lineAuthenticationActivity;
        this.LIZIZ = lineAuthenticationConfig;
        this.LIZJ = bVar;
        this.LIZLLL = dVar;
        this.LJ = aVar;
        this.LJFF = aVar2;
        this.LJII = dVar2;
        this.LJI = strArr;
    }
}
