Chomp v9.11版本的 MD5 值为:86ab69d1e20ec410efefb0967588d151

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


package p3;

import android.app.Application;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Log;
import com.google.android.gms.internal.consent_sdk.zzak;
import com.google.android.gms.internal.consent_sdk.zzam;
import com.google.android.gms.internal.consent_sdk.zzay;
import com.google.android.gms.internal.consent_sdk.zzbi;
import com.google.android.gms.internal.consent_sdk.zzg;
import com.google.android.gms.internal.consent_sdk.zzh;
import com.google.android.gms.internal.consent_sdk.zzj;
import java.io.ByteArrayOutputStream;
import java.util.concurrent.Executor;
import org.json.JSONException;
import org.json.JSONObject;
import p3.h;
public final class h implements zzg {
    public final Application f17928a;
    public final zzbi f17929b;
    public final Handler f17930c;
    public final Executor f17931d;
    public final zzh f17932e;
    public final zzak f17933f;
    public final zzay f17934g;
    public final zzam f17935h;

    public h(Application application, zzbi zzbiVar, Handler handler, Executor executor, zzh zzhVar, zzak zzakVar, zzay zzayVar, zzam zzamVar) {
        this.f17928a = application;
        this.f17929b = zzbiVar;
        this.f17930c = handler;
        this.f17931d = executor;
        this.f17932e = zzhVar;
        this.f17933f = zzakVar;
        this.f17934g = zzayVar;
        this.f17935h = zzamVar;
    }

    public final void a(String str) {
        String valueOf = String.valueOf(str);
        Log.d("UserMessagingPlatform", valueOf.length() != 0 ? "Receive consent action: ".concat(valueOf) : new String("Receive consent action: "));
        Uri parse = Uri.parse(str);
        this.f17932e.zzb(parse.getQueryParameter("action"), parse.getQueryParameter("args"), this, this.f17933f);
    }

    @Override
    public final Executor zza() {
        final Handler handler = this.f17930c;
        return new Executor() {
            @Override
            public final void execute(Runnable runnable) {
                handler.post(runnable);
            }
        };
    }

    @Override
    public final boolean zzb(String str, JSONObject jSONObject) {
        boolean z10;
        char c10 = 65535;
        switch (str.hashCode()) {
            case -1370505102:
                if (str.equals("load_complete")) {
                    z10 = false;
                    break;
                }
                z10 = true;
                break;
            case -278739366:
                if (str.equals("configure_app_assets")) {
                    z10 = true;
                    break;
                }
                z10 = true;
                break;
            case 150940456:
                if (str.equals("browser")) {
                    z10 = true;
                    break;
                }
                z10 = true;
                break;
            case 1671672458:
                if (str.equals("dismiss")) {
                    z10 = true;
                    break;
                }
                z10 = true;
                break;
            default:
                z10 = true;
                break;
        }
        zzay zzayVar = this.f17934g;
        if (!z10) {
            zzayVar.zze();
            return true;
        } else if (!z10) {
            if (!z10) {
                if (!z10) {
                    return false;
                }
                this.f17931d.execute(new Runnable() {
                    @Override
                    public final void run() {
                        String concat;
                        h hVar = h.this;
                        Application application = hVar.f17928a;
                        JSONObject jSONObject2 = new JSONObject();
                        try {
                            jSONObject2.put("app_name", application.getPackageManager().getApplicationLabel(application.getApplicationInfo()).toString());
                            Drawable applicationIcon = application.getPackageManager().getApplicationIcon(application.getApplicationInfo());
                            if (applicationIcon == null) {
                                concat = null;
                            } else {
                                Bitmap createBitmap = Bitmap.createBitmap(applicationIcon.getIntrinsicWidth(), applicationIcon.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
                                Canvas canvas = new Canvas(createBitmap);
                                applicationIcon.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
                                applicationIcon.draw(canvas);
                                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                                createBitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
                                String valueOf = String.valueOf(Base64.encodeToString(byteArrayOutputStream.toByteArray(), 2));
                                concat = valueOf.length() != 0 ? "data:image/png;base64,".concat(valueOf) : new String("data:image/png;base64,");
                            }
                            jSONObject2.put("app_icon", concat);
                            jSONObject2.put("stored_infos_map", hVar.f17935h.zzb());
                        } catch (JSONException unused) {
                        }
                        hVar.f17934g.zza().zzb("UMP_configureFormWithAppAssets", jSONObject2.toString());
                    }
                });
                return true;
            }
            String optString = jSONObject.optString("url");
            if (TextUtils.isEmpty(optString)) {
                Log.d("UserMessagingPlatform", "Action[browser]: empty url.");
            }
            Uri parse = Uri.parse(optString);
            if (parse.getScheme() == null) {
                String valueOf = String.valueOf(optString);
                Log.d("UserMessagingPlatform", valueOf.length() != 0 ? "Action[browser]: empty scheme: ".concat(valueOf) : new String("Action[browser]: empty scheme: "));
            }
            try {
                this.f17929b.startActivity(new Intent("android.intent.action.VIEW", parse));
            } catch (ActivityNotFoundException e10) {
                String valueOf2 = String.valueOf(optString);
                Log.d("UserMessagingPlatform", valueOf2.length() != 0 ? "Action[browser]: can not open url: ".concat(valueOf2) : new String("Action[browser]: can not open url: "), e10);
            }
            return true;
        } else {
            String optString2 = jSONObject.optString("status");
            switch (optString2.hashCode()) {
                case -954325659:
                    if (optString2.equals("CONSENT_SIGNAL_NON_PERSONALIZED_ADS")) {
                        c10 = 3;
                        break;
                    }
                    break;
                case -258041904:
                    if (optString2.equals("personalized")) {
                        c10 = 0;
                        break;
                    }
                    break;
                case 429411856:
                    if (optString2.equals("CONSENT_SIGNAL_SUFFICIENT")) {
                        c10 = 4;
                        break;
                    }
                    break;
                case 467888915:
                    if (optString2.equals("CONSENT_SIGNAL_PERSONALIZED_ADS")) {
                        c10 = 1;
                        break;
                    }
                    break;
                case 1666911234:
                    if (optString2.equals("non_personalized")) {
                        c10 = 2;
                        break;
                    }
                    break;
            }
            if (c10 == 0 || c10 == 1 || c10 == 2 || c10 == 3 || c10 == 4) {
                zzayVar.zzc(3);
            } else {
                zzayVar.zzd(new zzj(1, "We are getting something wrong with the webview."));
            }
            return true;
        }
    }
}