Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9

以下内容为反编译后的 h.java 源代码,内容仅作参考


package com.picsart.pinterest;

import android.net.Uri;
import com.picsart.coroutine.CoroutinesWrappersKt;
import com.picsart.pinterest.PinterestAccessTokenProviderUseCase$bind$$inlined$map$1;
import kotlin.Unit;
import kotlin.coroutines.intrinsics.CoroutineSingletons;
import kotlin.jvm.internal.Intrinsics;
import myobfuscated.pn2.o0;
import org.jetbrains.annotations.NotNull;
public final class h implements myobfuscated.y81.a {
    @NotNull
    public final myobfuscated.zg1.a a;
    @NotNull
    public final String b;
    @NotNull
    public final String c;
    public String d;
    public String e;

    public h(@NotNull myobfuscated.zg1.a preferencesService, @NotNull String appId, @NotNull String secret) {
        Intrinsics.checkNotNullParameter(preferencesService, "preferencesService");
        Intrinsics.checkNotNullParameter(appId, "appId");
        Intrinsics.checkNotNullParameter(secret, "secret");
        this.a = preferencesService;
        this.b = appId;
        this.c = secret;
    }

    @Override
    @NotNull
    public final void a() {
    }

    @Override
    @NotNull
    public final String b() {
        return this.c;
    }

    @Override
    @NotNull
    public final String c() {
        return this.b;
    }

    @Override
    @NotNull
    public final String d() {
        String uri = Uri.parse("https://www.pinterest.com/oauth/").buildUpon().appendQueryParameter("client_id", this.b).appendQueryParameter("redirect_uri", "https://api.picsart.com/hooks/pinterest_oauth").appendQueryParameter("response_type", "code").appendQueryParameter("scope", "read_users,write_pins").build().toString();
        Intrinsics.checkNotNullExpressionValue(uri, "toString(...)");
        return uri;
    }

    @Override
    @NotNull
    public final String e() {
        String str = this.e;
        if (str == null) {
            String str2 = (String) this.a.b("", "pinterest_access_token_key");
            this.e = str2;
            return str2;
        }
        return str;
    }

    @Override
    public final void f(@NotNull String token) {
        Intrinsics.checkNotNullParameter(token, "token");
        this.e = token;
        this.a.a(token, "pinterest_access_token_key");
    }

    @Override
    public final void g() {
        this.a.a("", "pinterest_access_token_key");
        Unit unit = Unit.a;
        this.e = "";
    }

    @Override
    @NotNull
    public final String h() {
        String str = this.d;
        if (str == null) {
            String str2 = (String) this.a.b("", "auth_code_key");
            this.d = str2;
            return str2;
        }
        return str;
    }

    @Override
    public final Object i(@NotNull String str, @NotNull PinterestAccessTokenProviderUseCase$bind$$inlined$map$1.AnonymousClass2.AnonymousClass1 anonymousClass1) {
        PinterestAuthDataProviderImpl$saveAuthorizationCode$2 pinterestAuthDataProviderImpl$saveAuthorizationCode$2 = new PinterestAuthDataProviderImpl$saveAuthorizationCode$2(this, str, null);
        myobfuscated.wn2.b bVar = CoroutinesWrappersKt.a;
        Object f = kotlinx.coroutines.b.f(o0.c, pinterestAuthDataProviderImpl$saveAuthorizationCode$2, anonymousClass1);
        return f == CoroutineSingletons.COROUTINE_SUSPENDED ? f : Unit.a;
    }
}