大漢易經書院.apk(点击下载) / ay.java


package com.xiaomi.push;

import android.content.Context;
import com.xiaomi.channel.commonutils.logger.b;
import java.lang.reflect.Method;

/* access modifiers changed from: package-private */
public class ay implements au {
    private Context a;

    /* renamed from: a  reason: collision with other field name */
    private Class<?> f6760a;

    /* renamed from: a  reason: collision with other field name */
    private Object f6761a;

    /* renamed from: a  reason: collision with other field name */
    private Method f6762a = null;
    private Method b = null;
    private Method c = null;
    private Method d = null;

    public ay(Context context) {
        this.a = context;
        a(context);
    }

    private String a(Context context, Method method) {
        Object obj = this.f6761a;
        if (obj == null || method == null) {
            return null;
        }
        try {
            Object invoke = method.invoke(obj, context);
            if (invoke != null) {
                return (String) invoke;
            }
            return null;
        } catch (Exception e) {
            b.a("miui invoke error", e);
            return null;
        }
    }

    private void a(Context context) {
        try {
            Class<?> a2 = v.a(context, "com.android.id.impl.IdProviderImpl");
            this.f6760a = a2;
            this.f6761a = a2.newInstance();
            this.f6762a = this.f6760a.getMethod("getUDID", Context.class);
            this.b = this.f6760a.getMethod("getOAID", Context.class);
            this.c = this.f6760a.getMethod("getVAID", Context.class);
            this.d = this.f6760a.getMethod("getAAID", Context.class);
        } catch (Exception e) {
            b.a("miui load class error", e);
        }
    }

    /* renamed from: a  reason: collision with other method in class */
    public static boolean m9129a(Context context) {
        return "com.xiaomi.xmsf".equals(context.getPackageName());
    }

    @Override // com.xiaomi.push.au, com.xiaomi.push.au
    public String a() {
        return null;
    }

    @Override // com.xiaomi.push.au, com.xiaomi.push.au
    /* renamed from: a  reason: collision with other method in class */
    public boolean m9130a() {
        return (this.f6760a == null || this.f6761a == null) ? false : true;
    }

    @Override // com.xiaomi.push.au
    public String b() {
        return a(this.a, this.b);
    }

    @Override // com.xiaomi.push.au
    public String c() {
        return a(this.a, this.c);
    }

    @Override // com.xiaomi.push.au
    public String d() {
        return a(this.a, this.d);
    }
}