和通讯录 v3.9.6版本的 MD5 值为:669178e2ee1b2311daf378bd20c6bbe1

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


package com.chinamobile.contacts.im;

import android.content.Context;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.os.Handler;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import com.android.internal.telephony.PhoneConstants;
import com.baidu.location.LocationClientOption;
import com.chinamobile.contacts.im.config.LoginInfoSP;
import com.chinamobile.contacts.im.data.ContactAccessor;
import com.chinamobile.contacts.im.mms2.data.DraftCache;
import com.iflytek.cloud.SpeechUtility;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;

public class e implements com.chinamobile.contacts.im.c.b, com.chinamobile.contacts.im.service.n {

    public static boolean f2350b = false;

    TelephonyManager f2351a;
    private Context c;
    private com.chinamobile.contacts.im.enterpriseContact.a.b d;
    private Cursor e;
    private com.chinamobile.contacts.im.utils.aq f = new com.chinamobile.contacts.im.utils.aq();
    private Handler g = new f(this);

    public void a(Context context) {
        this.c = context;
        this.d = new com.chinamobile.contacts.im.enterpriseContact.a.b(this.c);
        this.e = this.d.a();
        this.f2351a = (TelephonyManager) this.c.getSystemService(PhoneConstants.PHONE_KEY);
        com.chinamobile.contacts.im.service.m.b().a((com.chinamobile.contacts.im.service.n) this);
        com.chinamobile.contacts.im.mms2.transaction.e.initWithNothing();
        com.chinamobile.contacts.im.utils.ax.a();
        com.chinamobile.contacts.im.utils.aq.a("ICloudInit", "oncreate.....");
        DraftCache.init(this.c);
        Main.f1278b.execute(new g(this));
        c();
        if (com.chinamobile.contacts.im.donotdisturbe.d.c.m(this.c)) {
            com.chinamobile.contacts.im.donotdisturbe.d.c.i(this.c, false);
            com.chinamobile.contacts.im.cloudserver.al.a().a(LocationClientOption.MIN_AUTO_NOTIFY_INTERVAL, true);
        }
    }

    private void c() {
        if (com.chinamobile.contacts.im.config.j.o(this.c)) {
            com.chinamobile.contacts.im.config.j.g(this.c, false);
            SharedPreferences.Editor edit = com.chinamobile.contacts.im.config.j.a(this.c).edit();
            edit.putString("useful_sms_0", this.c.getResources().getString(C0019R.string.useful_sms0));
            edit.putString("useful_sms_1", this.c.getResources().getString(C0019R.string.useful_sms1));
            edit.putString("useful_sms_2", this.c.getResources().getString(C0019R.string.useful_sms2));
            edit.putString("useful_sms_3", this.c.getResources().getString(C0019R.string.useful_sms3));
            com.chinamobile.contacts.im.config.b.a(edit);
            com.chinamobile.contacts.im.config.j.d(this.c, 4);
        }
    }

    public void a() {
        SpeechUtility.createUtility(this.c, "appid=5077de47,server_url=http://mcontact.lingxicloud.com/msp.do,besturl_search=0");
        long currentTimeMillis = System.currentTimeMillis();
        Main.f1278b.execute(new h(this));
        this.g.postDelayed(new i(this), 8000L);
        this.g.postDelayed(new j(this), 60000L);
        f();
        com.chinamobile.contacts.im.utils.aq.a("log", (System.currentTimeMillis() - currentTimeMillis) + "");
    }

    public void b() {
        long c = (-System.currentTimeMillis()) + com.chinamobile.contacts.im.utils.o.c(this.c) + 604800000;
        long f = (com.chinamobile.contacts.im.config.i.f(this.c) + 604800000) - System.currentTimeMillis();
        long f2 = (259200000 + com.chinamobile.contacts.im.utils.o.f(this.c)) - System.currentTimeMillis();
        long j = 1;
        long e = (864000000 + com.chinamobile.contacts.im.utils.o.e(this.c)) - System.currentTimeMillis();
        if (com.chinamobile.contacts.im.config.h.f1787a || e < 0) {
            j = (com.umeng.analytics.a.h + com.chinamobile.contacts.im.utils.o.d(this.c)) - System.currentTimeMillis();
        }
        if (j < 0) {
            Main.f1278b.execute(new k(this, com.chinamobile.contacts.im.utils.bp.a(this.c.getApplicationContext())));
            Main.f1278b.execute(new l(this));
            com.chinamobile.contacts.im.call.b.h.d();
        }
        if (f2 < 0) {
            Main.f1278b.execute(new m(this));
        }
        if (c < 0) {
            com.chinamobile.contacts.im.utils.o.a(this.c.getApplicationContext(), System.currentTimeMillis());
            Main.f1278b.execute(new n(this));
        }
        if (f < 0) {
            com.chinamobile.contacts.im.share.a.a(this.c).a();
            if (LoginInfoSP.isLogin(this.c)) {
                com.chinamobile.contacts.im.cloudserver.ah.a().a(this.c);
            }
        }
    }

    public void d() {
        com.chinamobile.contacts.im.contacts.d.q.a(this.c, this.c.getContentResolver(), this);
        if (com.chinamobile.contacts.im.contacts.d.q.f2023b.size() > 0 || com.chinamobile.contacts.im.contacts.d.q.f2022a.size() > 0 || com.chinamobile.contacts.im.contacts.d.q.e.size() > 0 || com.chinamobile.contacts.im.contacts.d.q.c.size() > 0) {
            com.chinamobile.contacts.im.utils.o.b(this.c.getApplicationContext(), true);
            com.chinamobile.contacts.im.utils.o.a(this.c.getApplicationContext(), e());
            e();
            com.chinamobile.contacts.im.cloudserver.al.a().a(10002, true);
            this.g.sendEmptyMessage(8210);
            com.chinamobile.contacts.im.utils.aq.a("ICloudInit", "******checkDuplicateContacts******");
            this.g.sendEmptyMessage(8211);
            this.g.sendEmptyMessage(8240);
        }
    }

    private String e() {
        int i;
        boolean z;
        int size = !com.chinamobile.contacts.im.contacts.d.q.f2022a.isEmpty() ? com.chinamobile.contacts.im.contacts.d.q.f2022a.size() + 0 : 0;
        if (!com.chinamobile.contacts.im.contacts.d.q.f2023b.isEmpty()) {
            size += com.chinamobile.contacts.im.contacts.d.q.f2023b.size();
        }
        if (!com.chinamobile.contacts.im.contacts.d.q.c.isEmpty() && !com.chinamobile.contacts.im.contacts.d.q.d.isEmpty()) {
            HashMap hashMap = new HashMap();
            Iterator<String> it = com.chinamobile.contacts.im.contacts.d.q.c.keySet().iterator();
            while (true) {
                i = size;
                if (!it.hasNext()) {
                    break;
                }
                com.chinamobile.contacts.im.d.a aVar = com.chinamobile.contacts.im.contacts.d.q.c.get(it.next());
                if (aVar != null && !hashMap.containsKey(aVar.c())) {
                    hashMap.put(aVar.c(), aVar);
                    HashSet<String> g = aVar.g();
                    if (g != null) {
                        Iterator<String> it2 = g.iterator();
                        while (it2.hasNext()) {
                            String next = it2.next();
                            if (!com.chinamobile.contacts.im.contacts.d.q.f2022a.isEmpty() && !TextUtils.isEmpty(next) && com.chinamobile.contacts.im.contacts.d.q.f2022a.containsKey(next)) {
                                z = false;
                                break;
                            }
                        }
                    }
                    z = true;
                    if (z) {
                        i++;
                    }
                }
                size = i;
            }
            size = i;
        }
        StringBuffer stringBuffer = new StringBuffer();
        if (size > 0) {
            stringBuffer.append("有" + size + "组重复联系人,");
        }
        if (com.chinamobile.contacts.im.contacts.d.q.e.size() > 0) {
            stringBuffer.append("有" + com.chinamobile.contacts.im.contacts.d.q.e.size() + "个资料不完整联系人,");
        }
        if (size > 0 || com.chinamobile.contacts.im.contacts.d.q.e.size() > 0) {
            stringBuffer.append("建议去重");
        } else {
            stringBuffer.append("无需进行联系人整理");
        }
        return stringBuffer.toString();
    }

    private void f() {
        String user = LoginInfoSP.getUser(this.c);
        if (!TextUtils.isEmpty(user)) {
            if (!TextUtils.isEmpty(this.f2351a.getSimSerialNumber()) && !this.f2351a.getSimSerialNumber().equals(user)) {
                com.chinamobile.contacts.im.utils.aq.a("TEST", "Sim Card Changed..........");
                this.f.b("CheckUser logout");
                this.g.sendEmptyMessage(8214);
                ContactAccessor.getInstance().loginOut();
                return;
            }
            return;
        }
        LoginInfoSP.saveUser(this.c, this.f2351a.getSimSerialNumber());
    }

    @Override
    public void notifyobserver(Object obj) {
        if (obj != null) {
            try {
                Integer.parseInt(obj.toString());
            } catch (Exception e) {
            }
        }
    }

    @Override
    public void a(Object... objArr) {
    }
}