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


package com.vivo.push.d;

import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.vivo.push.a.a;
import com.vivo.push.b.c;
import com.vivo.push.b.w;
import com.vivo.push.cache.ClientConfigManagerImpl;
import com.vivo.push.e;
import com.vivo.push.l;
import com.vivo.push.model.b;
import com.vivo.push.o;
import com.vivo.push.util.p;
import com.vivo.push.util.s;
import com.vivo.push.util.t;
import java.util.List;

/* access modifiers changed from: package-private */
/* compiled from: SendCommandTask */
public final class ah extends l {
    ah(o oVar) {
        super(oVar);
    }

    /* access modifiers changed from: protected */
    @Override // com.vivo.push.l
    public final void a(o oVar) {
        if (this.a == null) {
            p.d("SendCommandTask", "SendCommandTask " + oVar + " ; mContext is Null");
        } else if (oVar == null) {
            p.d("SendCommandTask", "SendCommandTask pushCommand is Null");
        } else {
            b a = t.a(this.a);
            int b = oVar.b();
            if (b != 0) {
                if (b == 2009) {
                    p.a(ClientConfigManagerImpl.getInstance(this.a).isDebug());
                    if (p.a()) {
                        e.a().i();
                        com.vivo.push.util.b bVar = new com.vivo.push.util.b();
                        bVar.a(this.a, "com.vivo.push_preferences.hybridapptoken_v1");
                        bVar.a();
                        com.vivo.push.util.b bVar2 = new com.vivo.push.util.b();
                        bVar2.a(this.a, "com.vivo.push_preferences.appconfig_v1");
                        bVar2.a();
                        if (!e.a().e()) {
                            ClientConfigManagerImpl.getInstance(this.a).clearPush();
                        }
                    }
                } else if (b != 2011) {
                    switch (b) {
                        case 2002:
                        case PushConstants.NOTIFICATION_SERVICE_SEND_MESSAGE:
                        case PushConstants.NOTIFICATION_SERVICE_SEND_MESSAGE_ERROR:
                        case PushConstants.NOTIFICATION_SERVICE_SEND_MESSAGE_BROADCAST:
                            if (a == null || a.c()) {
                                e.a().a(((c) oVar).h(), 1005);
                                break;
                            } else {
                                c cVar = (c) oVar;
                                int a2 = s.a(cVar);
                                if (a2 != 0) {
                                    e.a().a(cVar.h(), a2);
                                    return;
                                }
                            }
                            break;
                    }
                } else {
                    p.a(ClientConfigManagerImpl.getInstance(this.a).isDebug(((w) oVar).d()));
                }
            } else if (e.a().e()) {
                Context context = this.a;
                Intent intent = new Intent();
                intent.setPackage(context.getPackageName());
                intent.setClassName(context.getPackageName(), "com.vivo.push.sdk.service.CommandService");
                List<ResolveInfo> queryIntentServices = context.getPackageManager().queryIntentServices(intent, 128);
                if (queryIntentServices == null || queryIntentServices.size() <= 0) {
                    p.d("ModuleUtil", "disableDeprecatedService is null");
                } else {
                    PackageManager packageManager = context.getPackageManager();
                    ComponentName componentName = new ComponentName(context, queryIntentServices.get(0).serviceInfo.name);
                    if (packageManager.getComponentEnabledSetting(componentName) != 2) {
                        packageManager.setComponentEnabledSetting(componentName, 2, 1);
                    }
                }
                Context context2 = this.a;
                Intent intent2 = new Intent();
                intent2.setPackage(context2.getPackageName());
                intent2.setClassName(context2.getPackageName(), "com.vivo.push.sdk.service.LinkProxyActivity");
                List<ResolveInfo> queryIntentActivities = context2.getPackageManager().queryIntentActivities(intent2, 128);
                if (queryIntentActivities == null || queryIntentActivities.size() <= 0) {
                    p.d("ModuleUtil", "disableDeprecatedActivity is null");
                } else {
                    PackageManager packageManager2 = context2.getPackageManager();
                    ComponentName componentName2 = new ComponentName(context2, queryIntentActivities.get(0).activityInfo.name);
                    if (packageManager2.getComponentEnabledSetting(componentName2) != 2) {
                        packageManager2.setComponentEnabledSetting(componentName2, 2, 1);
                    }
                }
            }
            if (a == null) {
                p.d("SendCommandTask", "SendCommandTask " + oVar + " ; pushPkgInfo is Null");
                return;
            }
            String a3 = a.a();
            if (a.c()) {
                e.a().a(((c) oVar).h(), 1004);
                oVar = new com.vivo.push.b.e();
                p.d("SendCommandTask", "SendCommandTask " + oVar + " ; pkgName is InBlackList ");
            }
            a.a(this.a, a3, oVar);
        }
    }
}