号簿助手 v4.6.31版本的 MD5 值为:9d7ff98a6bb5cc178eac2df4d1b2f0e0

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


package com.cn21.ued.apm.util;

import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import com.chinatelecom.pim.core.IConstant;
import com.cn21.ued.apm.constants.UedApplicaionData;
import org.json.JSONObject;

public class p {
    private static final String Tag = p.class.getName();

    public static void C(Context context) {
        Cursor cursor;
        Throwable th;
        Cursor cursor2 = null;
        try {
            try {
                SQLiteDatabase readableDatabase = o.B(context).getReadableDatabase();
                Cursor rawQuery = readableDatabase.rawQuery("select * from exception_cache limit 20", null);
                try {
                    rawQuery.moveToFirst();
                    s.e(Tag, "exception数据库有" + rawQuery.getCount() + "条数据。");
                    if (!rawQuery.isAfterLast()) {
                        StringBuilder sb = new StringBuilder();
                        do {
                            sb.append(rawQuery.getString(1)).append("\n");
                            rawQuery.moveToNext();
                        } while (!rawQuery.isAfterLast());
                        String a = com.cn21.ued.apm.b.a.b.a("http://ux.21cn.com/api/appReportRest/errorReport", System.currentTimeMillis() + UedApplicaionData.deltaBetweenServerAndClientTime, com.cn21.ued.apm.b.a.b.f(com.cn21.ued.apm.b.a.b.d(sb.toString().substring(0, sb.toString().length() - 1), UedApplicaionData.key)), k.F(context, readableDatabase), 2, 1, k.G(context, readableDatabase), UedApplicaionData.EXCEPTION_VERSION);
                        s.e(Tag, "exception_cache rep:" + a);
                        if (!y.aC(a)) {
                            JSONObject jSONObject = new JSONObject(a);
                            int a2 = y.a(String.valueOf(jSONObject.getInt("code")), -5);
                            if (a2 == -1) {
                                UedApplicaionData.isStart = true;
                                UedApplicaionData.sid = "";
                                if (rawQuery == null || rawQuery.isClosed()) {
                                    return;
                                }
                                rawQuery.close();
                                return;
                            }
                            if (a2 == 0) {
                                UedApplicaionData.key = y.f(jSONObject.getString(IConstant.VoiceRecognition.EXTRA_KEY), "");
                            }
                            for (int i = 0; i < rawQuery.getCount(); i++) {
                                s.e(Tag, "exception_cache共" + rawQuery.getCount() + "条,这是第" + i + "条");
                                readableDatabase.execSQL("delete from exception_cache where insertTime in (select insertTime from exception_cache limit 1) and insertData in (select insertData from exception_cache limit 1)");
                            }
                        }
                    }
                    if (rawQuery == null || rawQuery.isClosed()) {
                        return;
                    }
                    rawQuery.close();
                } catch (Throwable th2) {
                    cursor = rawQuery;
                    th = th2;
                    if (cursor == null) {
                        throw th;
                    }
                    if (cursor.isClosed()) {
                        throw th;
                    }
                    cursor.close();
                    throw th;
                }
            } catch (Throwable th3) {
                cursor = null;
                th = th3;
            }
        } catch (Exception e) {
            if (0 == 0 || cursor2.isClosed()) {
                return;
            }
            cursor2.close();
        }
    }

    public static void c(Context context, String str) {
        try {
            s.e("服务器 异常数据", str);
            o.B(context).getWritableDatabase().execSQL("insert into exception_cache values(datetime('now','localtime'),?)", new String[]{str});
        } catch (Exception e) {
        }
    }
}