红果免费短剧 v6.2.3.32版本的 MD5 值为:a6b05492607eab2c8a25f26d2f238ae0

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


package com.huawei;

import android.content.Context;
import android.text.TextUtils;
import com.bytedance.push.l;
import com.bytedance.push.z.k;
import com.bytedance.push.z.q;
import com.huawei.hms.aaid.HmsInstanceId;
import com.huawei.hms.common.ApiException;
import com.huawei.hms.utils.Util;
import com.hw.HWPushAdapter;

public final class a implements Runnable {

    private final Context f99149a;

    private final int f99150b;

    private String f99151c;

    private String a() throws ApiException {
        int b2 = b.b(this.f99149a);
        if (b2 != 0) {
            k.a("HWPush", "hms not available:" + b2);
            l.f().b(this.f99150b, 109, String.valueOf(b2), "hms not available");
            return null;
        }
        String token = HmsInstanceId.getInstance(this.f99149a).getToken(Util.getAppId(this.f99149a), "HCM");
        if (TextUtils.isEmpty(token) && q.a().k()) {
            b("");
            return null;
        }
        return token;
    }

    @Override
    public void run() {
        try {
            String str = this.f99151c;
            if (TextUtils.isEmpty(str)) {
                str = a();
            }
            if (TextUtils.isEmpty(str)) {
                k.b("HWPush", "get huawei token error!!");
                return;
            }
            k.a("HWPush", "get token success : " + str);
            a(str);
        } catch (ApiException e) {
            int statusCode = e.getStatusCode();
            l.c().a("HWPush", "getToken error,errCode = " + statusCode + " please visit : https://developer.huawei.com/consumer/cn/doc/development/HMS-References/status");
            b(String.valueOf(statusCode));
        } catch (Exception e2) {
            e2.printStackTrace();
            b("");
        }
    }

    public a(Context context) {
        this.f99149a = context;
        this.f99150b = HWPushAdapter.getHwPush();
    }

    private void a(String str) {
        l.d().a(this.f99149a, this.f99150b, str);
    }

    private void b(String str) {
        l.f().b(this.f99150b, 102, str, "get token error");
    }

    public a(Context context, String str) {
        this(context);
        this.f99151c = str;
    }
}