百度手机卫士 v8.6.2版本的 MD5 值为:fa60cb367e40201705a2d9f9ce2cbfdf

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


package dxoptimizer;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.Uri;
import android.text.TextUtils;
import com.dianxinos.optimizer.engine.antispam.AntiSpamConstants;
import com.dianxinos.optimizer.engine.antispam.model.TimeIntervalEntity;
import com.dianxinos.optimizer.module.recommend.data.RelationalRecommendConstants;
import java.util.ArrayList;
import java.util.Iterator;

public class bbd {
    private static boolean a = false;
    private static bbd d = null;
    private Boolean b;
    private BroadcastReceiver c = new bbe(this);
    private Context e;

    private void a(String str, String str2, Boolean bool) {
        Intent intent = new Intent(str);
        intent.putExtra(str2, bool);
        hyv.a(this.e, intent);
    }

    private bbd(Context context) {
        this.e = context.getApplicationContext();
        hyv.a(this.e, this.c, new IntentFilter("com.dianxinos.optimizer.action.SET_OPENMMSSERVICE"));
    }

    public static bbd a(Context context) {
        if (d == null) {
            synchronized (bbd.class) {
                if (d == null) {
                    d = new bbd(context);
                }
            }
        }
        return d;
    }

    private void a(String str, Object obj) {
        if (obj instanceof Boolean) {
            hoe.a().a(this.e, "antispam_settings", str, ((Boolean) obj).booleanValue());
            return;
        }
        if (obj instanceof Integer) {
            hoe.a().a(this.e, "antispam_settings", str, ((Integer) obj).intValue());
        } else if (obj instanceof String) {
            hoe.a().a(this.e, "antispam_settings", str, (String) obj);
        } else if (obj instanceof Long) {
            hoe.a().a(this.e, "antispam_settings", str, ((Long) obj).longValue());
        }
    }

    public void a(boolean z) {
        a("pref_anti_spam", Boolean.valueOf(z));
    }

    public boolean a() {
        return hoe.a().b(this.e, "antispam_settings", "pref_anti_spam", true);
    }

    public void a(AntiSpamConstants.FirewallRingtone firewallRingtone) {
        b(firewallRingtone);
        a("pref_response", Integer.valueOf(firewallRingtone.getValue()));
    }

    public AntiSpamConstants.FirewallRingtone b() {
        return AntiSpamConstants.FirewallRingtone.fromValue(hoe.a().b(this.e, "antispam_settings", "pref_response", 0));
    }

    public void b(boolean z) {
        a("pref_firewall_time_enable", Boolean.valueOf(z));
    }

    public boolean c() {
        return hoe.a().b(this.e, "antispam_settings", "pref_firewall_time_enable", false);
    }

    public void a(ArrayList<AntiSpamConstants.WeekDay> arrayList) {
        ArrayList arrayList2 = new ArrayList();
        Iterator<AntiSpamConstants.WeekDay> it = arrayList.iterator();
        while (it.hasNext()) {
            arrayList2.add(it.next().getValue());
        }
        a("pref_firewall_time_loop_cycle", TextUtils.join(RelationalRecommendConstants.RECOM_REFERENCE_SPLIT, arrayList2));
    }

    public ArrayList<AntiSpamConstants.WeekDay> d() {
        int i = 0;
        String b = hoe.a().b(this.e, "antispam_settings", "pref_firewall_time_loop_cycle", (String) null);
        ArrayList<AntiSpamConstants.WeekDay> arrayList = new ArrayList<>();
        if (b == null) {
            AntiSpamConstants.WeekDay[] values = AntiSpamConstants.WeekDay.values();
            int length = values.length;
            while (i < length) {
                arrayList.add(values[i]);
                i++;
            }
        } else if (b.length() != 0) {
            String[] split = b.split(RelationalRecommendConstants.RECOM_REFERENCE_SPLIT);
            if (a) {
                bhv.a("AntiSpamSettings", "repeatWeekDays: " + split);
            }
            int length2 = split.length;
            while (i < length2) {
                arrayList.add(AntiSpamConstants.WeekDay.fromValue(split[i]));
                i++;
            }
        }
        return arrayList;
    }

    public void a(TimeIntervalEntity timeIntervalEntity) {
        if (timeIntervalEntity.startTimeHour < 0 || timeIntervalEntity.startTimeHour > 23 || timeIntervalEntity.endTimeHour < 0 || timeIntervalEntity.endTimeHour > 23) {
            throw new IllegalArgumentException("startTimeHour or endTimeHour should not be < 0 or > 23,but this startTimeHour is " + timeIntervalEntity.startTimeHour + ", endTimeHour is " + timeIntervalEntity.endTimeHour);
        }
        if (timeIntervalEntity.startTimeMinute < 0 || timeIntervalEntity.startTimeMinute > 59 || timeIntervalEntity.endTimeMinute < 0 || timeIntervalEntity.endTimeMinute > 59) {
            throw new IllegalArgumentException("startTimeMinute or endTimeMinute should not be < 0 or > 59, but this startTimeMinute is " + timeIntervalEntity.startTimeMinute + ", endTimeMinute is " + timeIntervalEntity.endTimeMinute);
        }
        a("pref_firewall_time_interval", b(timeIntervalEntity));
    }

    public TimeIntervalEntity e() {
        return e(hoe.a().b(this.e, "antispam_settings", "pref_firewall_time_interval", "23:00-07:00"));
    }

    public void c(boolean z) {
        a("pref_smart_block", Boolean.valueOf(z));
    }

    public boolean f() {
        return hoe.a().b(this.e, "antispam_settings", "pref_smart_block", true);
    }

    public void d(boolean z) {
        a("pref_smart_cloud_block", Boolean.valueOf(z));
    }

    public boolean g() {
        return hoe.a().b(this.e, "antispam_settings", "pref_smart_cloud_block", true);
    }

    public boolean h() {
        return hoe.a().b(this.e, "antispam_settings", "pref_blacklist_block", true);
    }

    public boolean i() {
        return hoe.a().b(this.e, "antispam_settings", "pref_whitelist_discharge", true);
    }

    public void e(boolean z) {
        a("pref_stranger_block", Boolean.valueOf(z));
    }

    public boolean j() {
        return hoe.a().b(this.e, "antispam_settings", "pref_stranger_block", false);
    }

    public void f(boolean z) {
        a("pref_contact_block", Boolean.valueOf(z));
    }

    public boolean k() {
        return hoe.a().b(this.e, "antispam_settings", "pref_contact_block", false);
    }

    public void g(boolean z) {
        a("pref_keywords_block", Boolean.valueOf(z));
    }

    public boolean l() {
        return hoe.a().b(this.e, "antispam_settings", "pref_keywords_block", true);
    }

    public void h(boolean z) {
        a("pref_smart_block2", Boolean.valueOf(z));
    }

    public boolean m() {
        return hoe.a().b(this.e, "antispam_settings", "pref_smart_block2", true);
    }

    public void i(boolean z) {
        a("pref_smart_cloud_block2", Boolean.valueOf(z));
    }

    public boolean n() {
        return hoe.a().b(this.e, "antispam_settings", "pref_smart_cloud_block2", true);
    }

    public boolean o() {
        return hoe.a().b(this.e, "antispam_settings", "pref_blacklist_block2", true);
    }

    public boolean p() {
        return hoe.a().b(this.e, "antispam_settings", "pref_whitelist_discharge2", true);
    }

    public void j(boolean z) {
        a("pref_stranger_block2", Boolean.valueOf(z));
    }

    public boolean q() {
        return hoe.a().b(this.e, "antispam_settings", "pref_stranger_block2", false);
    }

    public void k(boolean z) {
        a("pref_contact_block2", Boolean.valueOf(z));
    }

    public boolean r() {
        return hoe.a().b(this.e, "antispam_settings", "pref_contact_block2", false);
    }

    public void l(boolean z) {
        a("pref_cloud_scan_url_number", Boolean.valueOf(z));
    }

    public boolean s() {
        return hoe.a().b(this.e, "antispam_settings", "pref_cloud_scan_url_number", true);
    }

    public void m(boolean z) {
        a("pref_open_mms_service", Boolean.valueOf(z));
        a("com.dianxinos.optimizer.action.SET_OPENMMSSERVICE", "extra_openmmsservice", Boolean.valueOf(z));
    }

    public boolean t() {
        if (this.b == null) {
            this.b = Boolean.valueOf(hoe.a().b(this.e, "antispam_settings", "pref_open_mms_service", false));
        }
        return this.b.booleanValue();
    }

    @Deprecated
    public void n(boolean z) {
        a("pref_takeover_system_mms", Boolean.valueOf(z));
    }

    @Deprecated
    public boolean u() {
        return hoe.a().b(this.e, "antispam_settings", "pref_takeover_system_mms", false);
    }

    public void o(boolean z) {
        a("pref_keywords_block2", Boolean.valueOf(z));
    }

    public boolean v() {
        return hoe.a().b(this.e, "antispam_settings", "pref_keywords_block2", true);
    }

    public String w() {
        return hoe.a().b(this.e, "antispam_settings", "prefs_key_owner_phone_number", "");
    }

    public void a(String str) {
        a("prefs_key_report_number_datas", str);
    }

    public String x() {
        return hoe.a().b(this.e, "antispam_settings", "prefs_key_report_number_datas", "");
    }

    public void y() {
        a("prefs_key_report_number_datas", "");
    }

    public void p(boolean z) {
        a("pref_dynamic_load_keywords", Boolean.valueOf(z));
    }

    public boolean z() {
        return hoe.a().b(this.e, "antispam_settings", "pref_dynamic_load_keywords", true);
    }

    public int A() {
        return hoe.a().b(this.e, "antispam_settings", "pref_scansms_networktype", -1);
    }

    public void a(int i) {
        hoe.a().a(this.e, "antispam_settings", "pref_scansms_networktype", i);
    }

    public boolean B() {
        return hoe.a().b(this.e, "antispam_settings", "prefs_key_poiad_added", false);
    }

    public void q(boolean z) {
        a("prefs_key_poiad_added", Boolean.valueOf(z));
    }

    public String C() {
        return hoe.a().b(this.e, "antispam_settings", "pref_call_forwarding_num_not_exist", "");
    }

    public void b(String str) {
        hoe.a().a(this.e, "antispam_settings", "pref_call_forwarding_num_not_exist", str);
    }

    public String D() {
        return hoe.a().b(this.e, "antispam_settings", "pref_call_forwarding_out_of_service", "");
    }

    public void c(String str) {
        hoe.a().a(this.e, "antispam_settings", "pref_call_forwarding_out_of_service", str);
    }

    public String E() {
        return hoe.a().b(this.e, "antispam_settings", "pref_call_forwarding_power_off", "");
    }

    public void d(String str) {
        hoe.a().a(this.e, "antispam_settings", "pref_call_forwarding_power_off", str);
    }

    public static void a(Context context, long j) {
        hoe.a().a(context, "antispam_settings", "prefs_last_received_sms_id", j);
    }

    public static long b(Context context) {
        return hoe.a().b(context, "antispam_settings", "prefs_last_received_sms_id", 0L);
    }

    private void b(AntiSpamConstants.FirewallRingtone firewallRingtone) {
        String str;
        String C = C();
        String D = D();
        String E = E();
        if (TextUtils.isEmpty(C)) {
            C = "13800000000";
        }
        if (TextUtils.isEmpty(D)) {
            D = "13910827493";
        }
        if (TextUtils.isEmpty(E)) {
            E = "18210679767";
        }
        if (hxt.b(this.e) == 2) {
            switch (bbf.a[firewallRingtone.ordinal()]) {
                case 1:
                    str = "*90" + C;
                    break;
                case 2:
                    str = "*90" + D;
                    break;
                case 3:
                    str = "*90" + E;
                    break;
                default:
                    str = "*900";
                    break;
            }
        } else {
            switch (bbf.a[firewallRingtone.ordinal()]) {
                case 1:
                    str = "**67*" + C + "%23";
                    break;
                case 2:
                    str = "**67*" + D + "%23";
                    break;
                case 3:
                    str = "**67*" + E + "%23";
                    break;
                default:
                    str = "%23%2367%23";
                    break;
            }
        }
        Intent intent = new Intent("android.intent.action.CALL");
        intent.setData(Uri.parse("tel:" + str));
        intent.setFlags(268435456);
        try {
            this.e.startActivity(intent);
        } catch (Exception e) {
            if (a) {
                e.printStackTrace();
            }
        }
    }

    private String b(TimeIntervalEntity timeIntervalEntity) {
        return String.format("%02d:%02d", Integer.valueOf(timeIntervalEntity.startTimeHour), Integer.valueOf(timeIntervalEntity.startTimeMinute)) + "-" + String.format("%02d:%02d", Integer.valueOf(timeIntervalEntity.endTimeHour), Integer.valueOf(timeIntervalEntity.endTimeMinute));
    }

    private TimeIntervalEntity e(String str) {
        String[] split = str.split("-");
        String[] split2 = split[0].split(":");
        int intValue = Integer.valueOf(split2[0]).intValue();
        int intValue2 = Integer.valueOf(split2[1]).intValue();
        String[] split3 = split[1].split(":");
        return new TimeIntervalEntity(intValue, intValue2, Integer.valueOf(split3[0]).intValue(), Integer.valueOf(split3[1]).intValue());
    }
}