导航菜单

页面标题

页面副标题

Kaspi.kz v5.85.1 - openOrCreateDatabase.java 源代码

正在查看: Kaspi.kz v5.85.1 应用的 openOrCreateDatabase.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package o;

import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.webkit.MimeTypeMap;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleCoroutineScope;
import androidx.lifecycle.LifecycleDestroyedException;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.WithLifecycleStateKt;
import java.io.File;
import java.util.List;
import java.util.Locale;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import o.setStatement;
import o.startService;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class openOrCreateDatabase {
    private final Command setOptions;

    public openOrCreateDatabase(@NotNull Command command) {
        Intrinsics.checkNotNullParameter(command, "");
        this.setOptions = command;
    }

    public static void setLabel(openOrCreateDatabase openorcreatedatabase, Context context, File file, String str, String str2, String str3, int i, Object obj) {
        if ((i & 16) != 0) {
            str3 = null;
        }
        openorcreatedatabase.setLabel(context, file, str, str2, str3);
    }

    static final class setOptions extends accessorSubstitutingScopelambda0 implements Function2<AbstractStubTypeCompanion, GivenFunctionsMemberScopeLambda0<? super Unit>, Object> {
        int IconCompatParcelizer;
        final String setBackground;
        final openOrCreateDatabase setElement;
        final String setError;
        final Context setFieldValue;
        final String setLabel;
        final File setOptions;

        setOptions(String str, File file, openOrCreateDatabase openorcreatedatabase, Context context, String str2, String str3, GivenFunctionsMemberScopeLambda0<? super setOptions> givenFunctionsMemberScopeLambda0) {
            super(2, givenFunctionsMemberScopeLambda0);
            this.setError = str;
            this.setOptions = file;
            this.setElement = openorcreatedatabase;
            this.setFieldValue = context;
            this.setBackground = str2;
            this.setLabel = str3;
        }

        public final GivenFunctionsMemberScopeLambda0<Unit> create(Object obj, GivenFunctionsMemberScopeLambda0<?> givenFunctionsMemberScopeLambda0) {
            return new setOptions(this.setError, this.setOptions, this.setElement, this.setFieldValue, this.setBackground, this.setLabel, givenFunctionsMemberScopeLambda0);
        }

        public final Object invoke(AbstractStubTypeCompanion abstractStubTypeCompanion, GivenFunctionsMemberScopeLambda0<? super Unit> givenFunctionsMemberScopeLambda0) {
            return create(abstractStubTypeCompanion, givenFunctionsMemberScopeLambda0).invokeSuspend(Unit.INSTANCE);
        }

        public final Object invokeSuspend(Object obj) {
            LifecycleCoroutineScope lifecycleScope;
            File file;
            Object options = accessorMemberScopeCompanionlambda0.setOptions();
            int i = this.IconCompatParcelizer;
            try {
                if (i == 0) {
                    CapturedTypeConstructorKtwrapWithCapturingSubstitution2.setFieldValue(obj);
                    String str = this.setError;
                    if (str != null) {
                        File file2 = this.setOptions;
                        file = getPropertyDelegatedFieldAnnotation.setLabel(file2, new File(getWallpaper.setFieldValue().setFieldValue().setFieldValue(), str), true, getPropertyDelegatedFieldAnnotation.setOptions(file2).length);
                        file.setLastModified(0L);
                    } else {
                        file = null;
                    }
                    String label = this.setElement.setLabel(getPropertyDelegatedFieldAnnotation.setBackground(this.setOptions));
                    openOrCreateDatabase openorcreatedatabase = this.setElement;
                    Context context = this.setFieldValue;
                    if (file == null) {
                        file = this.setOptions;
                    }
                    Uri label2 = openorcreatedatabase.setLabel(context, file);
                    refinedSupertypes_delegatelambda0 error = isSubtypeOfForSingleClassifierTypelambda21lambda20.setError();
                    AnonymousClass2 anonymousClass2 = new AnonymousClass2(label2, label, this.setFieldValue, this.setElement, this.setOptions, this.setBackground, this.setLabel, null);
                    this.IconCompatParcelizer = 1;
                    if (LockBasedStorageManagerMapBasedMemoizedFunction.setOptions(error, anonymousClass2, this) == options) {
                        return options;
                    }
                } else {
                    if (i != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    CapturedTypeConstructorKtwrapWithCapturingSubstitution2.setFieldValue(obj);
                }
            } catch (ActivityNotFoundException e) {
                setStatement.setLabel.setOptions(this.setElement.setOptions, new Exception("No Activity found to open file " + this.setOptions.getAbsolutePath(), e), null, 2, null);
                setAllowStacking setallowstacking = this.setFieldValue;
                setAllowStacking setallowstacking2 = setallowstacking instanceof setAllowStacking ? setallowstacking : null;
                if (setallowstacking2 != null && (lifecycleScope = LifecycleOwnerKt.getLifecycleScope(setallowstacking2)) != null) {
                    LockBasedStorageManagerMapBasedMemoizedFunction.setFieldValue(lifecycleScope, isSubtypeOfForSingleClassifierTypelambda21lambda20.setError(), (accessorAbstractTypeCheckerlambda1) null, new AnonymousClass3(this.setFieldValue, this.setElement, this.setOptions, this.setBackground, null), 2, (Object) null);
                }
            } catch (Exception e2) {
                setStatement.setLabel.setOptions(this.setElement.setOptions, e2, null, 2, null);
            }
            return Unit.INSTANCE;
        }

        static final class AnonymousClass2 extends accessorSubstitutingScopelambda0 implements Function2<AbstractStubTypeCompanion, GivenFunctionsMemberScopeLambda0<? super Intent>, Object> {
            int RemoteActionCompatParcelizer;
            Object read;
            final String setBackground;
            final openOrCreateDatabase setElement;
            final String setError;
            final File setFieldValue;
            final Context setLabel;
            final Uri setOptions;
            final String write;

            AnonymousClass2(Uri uri, String str, Context context, openOrCreateDatabase openorcreatedatabase, File file, String str2, String str3, GivenFunctionsMemberScopeLambda0<? super AnonymousClass2> givenFunctionsMemberScopeLambda0) {
                super(2, givenFunctionsMemberScopeLambda0);
                this.setOptions = uri;
                this.setBackground = str;
                this.setLabel = context;
                this.setElement = openorcreatedatabase;
                this.setFieldValue = file;
                this.write = str2;
                this.setError = str3;
            }

            public final GivenFunctionsMemberScopeLambda0<Unit> create(Object obj, GivenFunctionsMemberScopeLambda0<?> givenFunctionsMemberScopeLambda0) {
                return new AnonymousClass2(this.setOptions, this.setBackground, this.setLabel, this.setElement, this.setFieldValue, this.write, this.setError, givenFunctionsMemberScopeLambda0);
            }

            public final Object invoke(AbstractStubTypeCompanion abstractStubTypeCompanion, GivenFunctionsMemberScopeLambda0<? super Intent> givenFunctionsMemberScopeLambda0) {
                return create(abstractStubTypeCompanion, givenFunctionsMemberScopeLambda0).invokeSuspend(Unit.INSTANCE);
            }

            public final Object invokeSuspend(Object obj) {
                Intent intent;
                Object options = accessorMemberScopeCompanionlambda0.setOptions();
                int i = this.RemoteActionCompatParcelizer;
                if (i == 0) {
                    CapturedTypeConstructorKtwrapWithCapturingSubstitution2.setFieldValue(obj);
                    Intent intent2 = new Intent("android.intent.action.VIEW");
                    Uri uri = this.setOptions;
                    String str = this.setBackground;
                    LifecycleOwner lifecycleOwner = this.setLabel;
                    openOrCreateDatabase openorcreatedatabase = this.setElement;
                    File file = this.setFieldValue;
                    String str2 = this.write;
                    String str3 = this.setError;
                    intent2.setFlags(1);
                    intent2.addFlags(268435456);
                    intent2.setDataAndType(uri, str);
                    LifecycleOwner lifecycleOwner2 = (setAllowStacking) lifecycleOwner;
                    PackageManager packageManager = lifecycleOwner2.getPackageManager();
                    List<ResolveInfo> queryIntentActivities = packageManager != null ? packageManager.queryIntentActivities(intent2, 65536) : null;
                    LifecycleOwner lifecycleOwner3 = lifecycleOwner instanceof setAllowStacking ? lifecycleOwner2 : null;
                    if (lifecycleOwner3 != null) {
                        Lifecycle lifecycle = lifecycleOwner3.getLifecycle();
                        Lifecycle.State state = Lifecycle.State.RESUMED;
                        refinedSupertypes_delegatelambda0 background = isSubtypeOfForSingleClassifierTypelambda21lambda20.setError().setBackground();
                        boolean isDispatchNeeded = background.isDispatchNeeded(getContext());
                        if (!isDispatchNeeded) {
                            if (lifecycle.getCurrentState() == Lifecycle.State.DESTROYED) {
                                throw new LifecycleDestroyedException();
                            }
                            if (lifecycle.getCurrentState().compareTo(state) >= 0) {
                                List<ResolveInfo> list = queryIntentActivities;
                                if (list == null || list.isEmpty()) {
                                    openorcreatedatabase.setBackground(lifecycleOwner, file, str2);
                                } else {
                                    lifecycleOwner2.startActivity(Intent.createChooser(intent2, str3));
                                }
                                Unit unit = Unit.INSTANCE;
                            }
                        }
                        setFieldValue setfieldvalue = new setFieldValue(queryIntentActivities, openorcreatedatabase, lifecycleOwner, file, str2, intent2, str3);
                        this.read = intent2;
                        this.RemoteActionCompatParcelizer = 1;
                        if (WithLifecycleStateKt.suspendWithStateAtLeastUnchecked(lifecycle, state, isDispatchNeeded, background, setfieldvalue, this) == options) {
                            return options;
                        }
                        intent = intent2;
                    }
                    return intent2;
                }
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                intent = (Intent) this.read;
                CapturedTypeConstructorKtwrapWithCapturingSubstitution2.setFieldValue(obj);
                return intent;
            }

            public static final class setFieldValue extends ProtoContainerClass implements Function0<Unit> {
                final String RemoteActionCompatParcelizer;
                final List setBackground;
                final openOrCreateDatabase setElement;
                final Intent setError;
                final File setFieldValue;
                final Context setLabel;
                final String setOptions;

                public setFieldValue(List list, openOrCreateDatabase openorcreatedatabase, Context context, File file, String str, Intent intent, String str2) {
                    super(0);
                    this.setBackground = list;
                    this.setElement = openorcreatedatabase;
                    this.setLabel = context;
                    this.setFieldValue = file;
                    this.RemoteActionCompatParcelizer = str;
                    this.setError = intent;
                    this.setOptions = str2;
                }

                public final Unit invoke() {
                    List list = this.setBackground;
                    if (list == null || list.isEmpty()) {
                        this.setElement.setBackground(this.setLabel, this.setFieldValue, this.RemoteActionCompatParcelizer);
                    } else {
                        this.setLabel.startActivity(Intent.createChooser(this.setError, this.setOptions));
                    }
                    return Unit.INSTANCE;
                }
            }
        }

        static final class AnonymousClass3 extends accessorSubstitutingScopelambda0 implements Function2<AbstractStubTypeCompanion, GivenFunctionsMemberScopeLambda0<? super Unit>, Object> {
            final openOrCreateDatabase setBackground;
            final Context setError;
            int setFieldValue;
            final String setLabel;
            final File setOptions;

            AnonymousClass3(Context context, openOrCreateDatabase openorcreatedatabase, File file, String str, GivenFunctionsMemberScopeLambda0<? super AnonymousClass3> givenFunctionsMemberScopeLambda0) {
                super(2, givenFunctionsMemberScopeLambda0);
                this.setError = context;
                this.setBackground = openorcreatedatabase;
                this.setOptions = file;
                this.setLabel = str;
            }

            public final GivenFunctionsMemberScopeLambda0<Unit> create(Object obj, GivenFunctionsMemberScopeLambda0<?> givenFunctionsMemberScopeLambda0) {
                return new AnonymousClass3(this.setError, this.setBackground, this.setOptions, this.setLabel, givenFunctionsMemberScopeLambda0);
            }

            public final Object invoke(AbstractStubTypeCompanion abstractStubTypeCompanion, GivenFunctionsMemberScopeLambda0<? super Unit> givenFunctionsMemberScopeLambda0) {
                return create(abstractStubTypeCompanion, givenFunctionsMemberScopeLambda0).invokeSuspend(Unit.INSTANCE);
            }

            public final Object invokeSuspend(Object obj) {
                Object options = accessorMemberScopeCompanionlambda0.setOptions();
                int i = this.setFieldValue;
                if (i == 0) {
                    CapturedTypeConstructorKtwrapWithCapturingSubstitution2.setFieldValue(obj);
                    setAllowStacking setallowstacking = this.setError;
                    setAllowStacking setallowstacking2 = setallowstacking instanceof setAllowStacking ? setallowstacking : null;
                    if (setallowstacking2 != null) {
                        openOrCreateDatabase openorcreatedatabase = this.setBackground;
                        File file = this.setOptions;
                        String str = this.setLabel;
                        Lifecycle lifecycle = setallowstacking2.getLifecycle();
                        Lifecycle.State state = Lifecycle.State.RESUMED;
                        refinedSupertypes_delegatelambda0 background = isSubtypeOfForSingleClassifierTypelambda21lambda20.setError().setBackground();
                        boolean isDispatchNeeded = background.isDispatchNeeded(getContext());
                        if (!isDispatchNeeded) {
                            if (lifecycle.getCurrentState() == Lifecycle.State.DESTROYED) {
                                throw new LifecycleDestroyedException();
                            }
                            if (lifecycle.getCurrentState().compareTo(state) >= 0) {
                                openorcreatedatabase.setBackground(setallowstacking, file, str);
                                Unit unit = Unit.INSTANCE;
                            }
                        }
                        setLabel setlabel = new setLabel(openorcreatedatabase, setallowstacking, file, str);
                        this.setFieldValue = 1;
                        if (WithLifecycleStateKt.suspendWithStateAtLeastUnchecked(lifecycle, state, isDispatchNeeded, background, setlabel, this) == options) {
                            return options;
                        }
                    }
                } else {
                    if (i != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    CapturedTypeConstructorKtwrapWithCapturingSubstitution2.setFieldValue(obj);
                }
                return Unit.INSTANCE;
            }

            public static final class setLabel extends ProtoContainerClass implements Function0<Unit> {
                final openOrCreateDatabase setBackground;
                final String setError;
                final File setLabel;
                final Context setOptions;

                public setLabel(openOrCreateDatabase openorcreatedatabase, Context context, File file, String str) {
                    super(0);
                    this.setBackground = openorcreatedatabase;
                    this.setOptions = context;
                    this.setLabel = file;
                    this.setError = str;
                }

                public final Unit invoke() {
                    this.setBackground.setBackground(this.setOptions, this.setLabel, this.setError);
                    return Unit.INSTANCE;
                }
            }
        }
    }

    public final void setLabel(@NotNull Context context, @NotNull File file, @Nullable String str, @Nullable String str2, @Nullable String str3) {
        LifecycleCoroutineScope lifecycleScope;
        Intrinsics.checkNotNullParameter(context, "");
        Intrinsics.checkNotNullParameter(file, "");
        setAllowStacking setallowstacking = context instanceof setAllowStacking ? (setAllowStacking) context : null;
        if (setallowstacking == null || (lifecycleScope = LifecycleOwnerKt.getLifecycleScope(setallowstacking)) == null) {
            return;
        }
        LockBasedStorageManagerMapBasedMemoizedFunction.setFieldValue(lifecycleScope, isSubtypeOfForSingleClassifierTypelambda21lambda20.setOptions(), (accessorAbstractTypeCheckerlambda1) null, new setOptions(str, file, this, context, str3, str2, null), 2, (Object) null);
    }

    public static void setBackground(openOrCreateDatabase openorcreatedatabase, Context context, File file, String str, boolean z, String str2, String str3, int i, Object obj) {
        if ((i & 32) != 0) {
            str3 = null;
        }
        openorcreatedatabase.setLabel(context, file, str, z, str2, str3);
    }

    static final class setFieldValue extends accessorSubstitutingScopelambda0 implements Function2<AbstractStubTypeCompanion, GivenFunctionsMemberScopeLambda0<? super Unit>, Object> {
        final String IconCompatParcelizer;
        final Context setBackground;
        final openOrCreateDatabase setElement;
        final String setError;
        final String setFieldValue;
        final File setLabel;
        final boolean setOptions;
        int write;

        setFieldValue(File file, openOrCreateDatabase openorcreatedatabase, String str, Context context, boolean z, String str2, String str3, GivenFunctionsMemberScopeLambda0<? super setFieldValue> givenFunctionsMemberScopeLambda0) {
            super(2, givenFunctionsMemberScopeLambda0);
            this.setLabel = file;
            this.setElement = openorcreatedatabase;
            this.setError = str;
            this.setBackground = context;
            this.setOptions = z;
            this.setFieldValue = str2;
            this.IconCompatParcelizer = str3;
        }

        public final GivenFunctionsMemberScopeLambda0<Unit> create(Object obj, GivenFunctionsMemberScopeLambda0<?> givenFunctionsMemberScopeLambda0) {
            return new setFieldValue(this.setLabel, this.setElement, this.setError, this.setBackground, this.setOptions, this.setFieldValue, this.IconCompatParcelizer, givenFunctionsMemberScopeLambda0);
        }

        public final Object invoke(AbstractStubTypeCompanion abstractStubTypeCompanion, GivenFunctionsMemberScopeLambda0<? super Unit> givenFunctionsMemberScopeLambda0) {
            return create(abstractStubTypeCompanion, givenFunctionsMemberScopeLambda0).invokeSuspend(Unit.INSTANCE);
        }

        public final Object invokeSuspend(Object obj) {
            File file;
            Object options = accessorMemberScopeCompanionlambda0.setOptions();
            int i = this.write;
            try {
                if (i == 0) {
                    CapturedTypeConstructorKtwrapWithCapturingSubstitution2.setFieldValue(obj);
                    String label = this.setElement.setLabel(getPropertyDelegatedFieldAnnotation.setBackground(this.setLabel));
                    String str = this.setError;
                    if (str != null) {
                        File file2 = this.setLabel;
                        file = getPropertyDelegatedFieldAnnotation.setLabel(file2, new File(getWallpaper.setFieldValue().setFieldValue().setFieldValue(), str), true, getPropertyDelegatedFieldAnnotation.setOptions(file2).length);
                        file.setLastModified(0L);
                    } else {
                        file = null;
                    }
                    openOrCreateDatabase openorcreatedatabase = this.setElement;
                    Context context = this.setBackground;
                    if (file == null) {
                        file = this.setLabel;
                    }
                    Uri label2 = openorcreatedatabase.setLabel(context, file);
                    refinedSupertypes_delegatelambda0 error = isSubtypeOfForSingleClassifierTypelambda21lambda20.setError();
                    AnonymousClass2 anonymousClass2 = new AnonymousClass2(this.setOptions, this.setElement, this.setBackground, this.setLabel, this.setError, this.setFieldValue, this.IconCompatParcelizer, label, label2, null);
                    this.write = 1;
                    if (LockBasedStorageManagerMapBasedMemoizedFunction.setOptions(error, anonymousClass2, this) == options) {
                        return options;
                    }
                } else {
                    if (i != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    CapturedTypeConstructorKtwrapWithCapturingSubstitution2.setFieldValue(obj);
                }
            } catch (ActivityNotFoundException e) {
                setStatement.setLabel.setOptions(this.setElement.setOptions, new Exception("No Activity found to share file " + this.setLabel.getAbsolutePath(), e), null, 2, null);
            } catch (Exception e2) {
                setStatement.setLabel.setOptions(this.setElement.setOptions, e2, null, 2, null);
            }
            return Unit.INSTANCE;
        }

        static final class AnonymousClass2 extends accessorSubstitutingScopelambda0 implements Function2<AbstractStubTypeCompanion, GivenFunctionsMemberScopeLambda0<? super Object>, Object> {
            final Uri IconCompatParcelizer;
            final openOrCreateDatabase RemoteActionCompatParcelizer;
            final String read;
            final String setBackground;
            final String setElement;
            final Context setError;
            final String setFieldValue;
            final File setLabel;
            final boolean setOptions;
            int write;

            AnonymousClass2(boolean z, openOrCreateDatabase openorcreatedatabase, Context context, File file, String str, String str2, String str3, String str4, Uri uri, GivenFunctionsMemberScopeLambda0<? super AnonymousClass2> givenFunctionsMemberScopeLambda0) {
                super(2, givenFunctionsMemberScopeLambda0);
                this.setOptions = z;
                this.RemoteActionCompatParcelizer = openorcreatedatabase;
                this.setError = context;
                this.setLabel = file;
                this.setBackground = str;
                this.setElement = str2;
                this.read = str3;
                this.setFieldValue = str4;
                this.IconCompatParcelizer = uri;
            }

            public final GivenFunctionsMemberScopeLambda0<Unit> create(Object obj, GivenFunctionsMemberScopeLambda0<?> givenFunctionsMemberScopeLambda0) {
                return new AnonymousClass2(this.setOptions, this.RemoteActionCompatParcelizer, this.setError, this.setLabel, this.setBackground, this.setElement, this.read, this.setFieldValue, this.IconCompatParcelizer, givenFunctionsMemberScopeLambda0);
            }

            public final Object invoke(AbstractStubTypeCompanion abstractStubTypeCompanion, GivenFunctionsMemberScopeLambda0<Object> givenFunctionsMemberScopeLambda0) {
                return create(abstractStubTypeCompanion, givenFunctionsMemberScopeLambda0).invokeSuspend(Unit.INSTANCE);
            }

            public final Object invokeSuspend(Object obj) {
                Object options = accessorMemberScopeCompanionlambda0.setOptions();
                int i = this.write;
                if (i == 0) {
                    CapturedTypeConstructorKtwrapWithCapturingSubstitution2.setFieldValue(obj);
                    if (this.setOptions) {
                        this.RemoteActionCompatParcelizer.setLabel(this.setError, this.setLabel, this.setBackground, this.setElement, this.read);
                        return Unit.INSTANCE;
                    }
                    setAllowStacking setallowstacking = this.setError;
                    setAllowStacking setallowstacking2 = setallowstacking instanceof setAllowStacking ? setallowstacking : null;
                    if (setallowstacking2 == null) {
                        return null;
                    }
                    String str = this.setFieldValue;
                    Uri uri = this.IconCompatParcelizer;
                    String str2 = this.setElement;
                    Lifecycle lifecycle = setallowstacking2.getLifecycle();
                    Lifecycle.State state = Lifecycle.State.RESUMED;
                    refinedSupertypes_delegatelambda0 background = isSubtypeOfForSingleClassifierTypelambda21lambda20.setError().setBackground();
                    boolean isDispatchNeeded = background.isDispatchNeeded(getContext());
                    if (!isDispatchNeeded) {
                        if (lifecycle.getCurrentState() == Lifecycle.State.DESTROYED) {
                            throw new LifecycleDestroyedException();
                        }
                        if (lifecycle.getCurrentState().compareTo(state) >= 0) {
                            Intent intent = new Intent("android.intent.action.SEND");
                            intent.setType(str);
                            intent.putExtra("android.intent.extra.STREAM", uri);
                            setallowstacking.startActivity(Intent.createChooser(intent, str2));
                            obj = intent;
                        }
                    }
                    setBackground setbackground = new setBackground(str, uri, setallowstacking, str2);
                    this.write = 1;
                    obj = WithLifecycleStateKt.suspendWithStateAtLeastUnchecked(lifecycle, state, isDispatchNeeded, background, setbackground, this);
                    if (obj == options) {
                        return options;
                    }
                } else {
                    if (i != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    CapturedTypeConstructorKtwrapWithCapturingSubstitution2.setFieldValue(obj);
                }
                return (Intent) obj;
            }

            public static final class setBackground extends ProtoContainerClass implements Function0<Intent> {
                final Context setBackground;
                final Uri setError;
                final String setFieldValue;
                final String setOptions;

                public setBackground(String str, Uri uri, Context context, String str2) {
                    super(0);
                    this.setOptions = str;
                    this.setError = uri;
                    this.setBackground = context;
                    this.setFieldValue = str2;
                }

                public final Intent invoke() {
                    Intent intent = new Intent("android.intent.action.SEND");
                    intent.setType(this.setOptions);
                    intent.putExtra("android.intent.extra.STREAM", this.setError);
                    this.setBackground.startActivity(Intent.createChooser(intent, this.setFieldValue));
                    return intent;
                }
            }
        }
    }

    public final void setLabel(@NotNull Context context, @NotNull File file, @Nullable String str, boolean z, @Nullable String str2, @Nullable String str3) {
        LifecycleCoroutineScope lifecycleScope;
        Intrinsics.checkNotNullParameter(context, "");
        Intrinsics.checkNotNullParameter(file, "");
        setAllowStacking setallowstacking = context instanceof setAllowStacking ? (setAllowStacking) context : null;
        if (setallowstacking == null || (lifecycleScope = LifecycleOwnerKt.getLifecycleScope(setallowstacking)) == null) {
            return;
        }
        LockBasedStorageManagerMapBasedMemoizedFunction.setFieldValue(lifecycleScope, isSubtypeOfForSingleClassifierTypelambda21lambda20.setOptions(), (accessorAbstractTypeCheckerlambda1) null, new setFieldValue(file, this, str2, context, z, str, str3, null), 2, (Object) null);
    }

    public final void setBackground(@NotNull List<getWallpaperDesiredMinimumWidth> list, @NotNull Context context) {
        LifecycleCoroutineScope lifecycleScope;
        Intrinsics.checkNotNullParameter(list, "");
        Intrinsics.checkNotNullParameter(context, "");
        setAllowStacking setallowstacking = context instanceof setAllowStacking ? (setAllowStacking) context : null;
        if (setallowstacking == null || (lifecycleScope = LifecycleOwnerKt.getLifecycleScope(setallowstacking)) == null) {
            return;
        }
        LockBasedStorageManagerMapBasedMemoizedFunction.setFieldValue(lifecycleScope, isSubtypeOfForSingleClassifierTypelambda21lambda20.setOptions(), (accessorAbstractTypeCheckerlambda1) null, new setBackground(list, this, context, (GivenFunctionsMemberScopeLambda0) null), 2, (Object) null);
    }

    public final void setBackground(@NotNull Context context, @NotNull File file, @Nullable String str) {
        LifecycleCoroutineScope lifecycleScope;
        Intrinsics.checkNotNullParameter(context, "");
        Intrinsics.checkNotNullParameter(file, "");
        if (Intrinsics.setFieldValue(getPropertyDelegatedFieldAnnotation.setBackground(file), getExternalCacheDir.setBackground)) {
            setAllowStacking setallowstacking = context instanceof setAllowStacking ? (setAllowStacking) context : null;
            if (setallowstacking != null) {
                Uri label = setLabel(context, file);
                startService.setLabel setlabel = startService.setLabel;
                String absolutePath = file.getAbsolutePath();
                Intrinsics.checkNotNullExpressionValue(absolutePath, "");
                setlabel.setOptions(absolutePath, label).show(setallowstacking.AudioAttributesImplBaseParcelizer(), "kz.kaspi.mobile.pdf.impl.view.PdfPreviewDialog");
                return;
            }
            return;
        }
        if (str != null) {
            Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("https://docs.google.com/viewer?url=" + str));
            try {
                setAllowStacking setallowstacking2 = context instanceof setAllowStacking ? (setAllowStacking) context : null;
                if (setallowstacking2 == null || (lifecycleScope = LifecycleOwnerKt.getLifecycleScope(setallowstacking2)) == null) {
                    return;
                }
                LockBasedStorageManagerMapBasedMemoizedFunction.setFieldValue(lifecycleScope, isSubtypeOfForSingleClassifierTypelambda21lambda20.setError(), (accessorAbstractTypeCheckerlambda1) null, new setLabel(context, intent, null), 2, (Object) null);
            } catch (ActivityNotFoundException e) {
                setStatement.setLabel.setOptions(this.setOptions, new Exception("No Activity found to open link https://docs.google.com/viewer?url=" + str, e), null, 2, null);
                Unit unit = Unit.INSTANCE;
            }
        }
    }

    static final class setLabel extends accessorSubstitutingScopelambda0 implements Function2<AbstractStubTypeCompanion, GivenFunctionsMemberScopeLambda0<? super Unit>, Object> {
        final Context setBackground;
        final Intent setFieldValue;
        int setOptions;

        setLabel(Context context, Intent intent, GivenFunctionsMemberScopeLambda0<? super setLabel> givenFunctionsMemberScopeLambda0) {
            super(2, givenFunctionsMemberScopeLambda0);
            this.setBackground = context;
            this.setFieldValue = intent;
        }

        public final GivenFunctionsMemberScopeLambda0<Unit> create(Object obj, GivenFunctionsMemberScopeLambda0<?> givenFunctionsMemberScopeLambda0) {
            return new setLabel(this.setBackground, this.setFieldValue, givenFunctionsMemberScopeLambda0);
        }

        public final Object invoke(AbstractStubTypeCompanion abstractStubTypeCompanion, GivenFunctionsMemberScopeLambda0<? super Unit> givenFunctionsMemberScopeLambda0) {
            return create(abstractStubTypeCompanion, givenFunctionsMemberScopeLambda0).invokeSuspend(Unit.INSTANCE);
        }

        public final Object invokeSuspend(Object obj) {
            Object options = accessorMemberScopeCompanionlambda0.setOptions();
            int i = this.setOptions;
            if (i == 0) {
                CapturedTypeConstructorKtwrapWithCapturingSubstitution2.setFieldValue(obj);
                setAllowStacking setallowstacking = this.setBackground;
                setAllowStacking setallowstacking2 = setallowstacking instanceof setAllowStacking ? setallowstacking : null;
                if (setallowstacking2 != null) {
                    Intent intent = this.setFieldValue;
                    Lifecycle lifecycle = setallowstacking2.getLifecycle();
                    Lifecycle.State state = Lifecycle.State.RESUMED;
                    refinedSupertypes_delegatelambda0 background = isSubtypeOfForSingleClassifierTypelambda21lambda20.setError().setBackground();
                    boolean isDispatchNeeded = background.isDispatchNeeded(getContext());
                    if (!isDispatchNeeded) {
                        if (lifecycle.getCurrentState() == Lifecycle.State.DESTROYED) {
                            throw new LifecycleDestroyedException();
                        }
                        if (lifecycle.getCurrentState().compareTo(state) >= 0) {
                            setallowstacking.startActivity(intent);
                            Unit unit = Unit.INSTANCE;
                        }
                    }
                    C0067setLabel c0067setLabel = new C0067setLabel(setallowstacking, intent);
                    this.setOptions = 1;
                    if (WithLifecycleStateKt.suspendWithStateAtLeastUnchecked(lifecycle, state, isDispatchNeeded, background, c0067setLabel, this) == options) {
                        return options;
                    }
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                CapturedTypeConstructorKtwrapWithCapturingSubstitution2.setFieldValue(obj);
            }
            return Unit.INSTANCE;
        }

        public static final class C0067setLabel extends ProtoContainerClass implements Function0<Unit> {
            final Intent setLabel;
            final Context setOptions;

            public C0067setLabel(Context context, Intent intent) {
                super(0);
                this.setOptions = context;
                this.setLabel = intent;
            }

            public final Unit invoke() {
                this.setOptions.startActivity(this.setLabel);
                return Unit.INSTANCE;
            }
        }
    }

    public final Uri setLabel(Context context, File file) {
        try {
            return setItfMinCodeLength.setError(context, getWallpaper.setFieldValue().IconCompatParcelizer(), file);
        } catch (IllegalArgumentException unused) {
            setStatement.setLabel.setOptions(this.setOptions, new Exception("Cannot create uri from file " + file.getAbsolutePath()), null, 2, null);
            return null;
        }
    }

    public final String setLabel(String str) {
        MimeTypeMap singleton = MimeTypeMap.getSingleton();
        String lowerCase = str.toLowerCase(Locale.ROOT);
        Intrinsics.checkNotNullExpressionValue(lowerCase, "");
        return singleton.getMimeTypeFromExtension(lowerCase);
    }
}