package com.ifpdos.debugmenu.action;

import android.content.Context;
import android.content.Intent;
import com.ifpdos.debugmenu.action.base.ItemSwitchAction;
import com.seewo.vcommons.data.UserContentResolver;
import d.i.f.b.a;
import d.i.f.c.b;
import d.i.f.c.c;

/* JADX INFO: loaded from: classes.dex */
public class ScreenLockEnableAction extends ItemSwitchAction {
    public ScreenLockEnableAction(Context context) {
        super(context);
    }

    @Override // com.ifpdos.debugmenu.action.base.ItemSwitchAction
    public boolean isOn(Context context) {
        Context context2 = this.mContext;
        UserContentResolver userContentResolver = b.a;
        String str = a.a;
        return b.b(context2, "screenlock_switch", (c.f("ro.cvte.region", "").equals("CN") || c.f("ro.product.locale.region", "").equals("CN")) ? false : true);
    }

    @Override // com.ifpdos.debugmenu.action.base.ItemSwitchAction
    public void onSwitch(Context context, boolean z) {
        Intent intent;
        Context context2 = this.mContext;
        b.g(context2, "screenlock_switch", z);
        d.i.c.a.G(context2, "com.seewo.screenlock", z);
        if (z) {
            intent = new Intent("com.seewo.intent.remove.filterpackage");
        } else {
            b.h(this.mContext.getContentResolver(), "sahara_password", "");
            intent = new Intent("com.seewo.intent.add.filterpackage");
        }
        intent.putExtra("package", "com.seewo.screenlock");
        this.mContext.sendBroadcast(intent);
        d.i.c.a.G(this.mContext, "com.seewo.screenlock", z);
    }
}
