翰林优商.apk(点击下载) / d.java


package com.kwad.sdk.crash.utils;

import android.content.Context;
import android.content.SharedPreferences;

public final class d {
    private static Context KB;

    public static long NG() {
        long bz = bz(KB);
        d(KB, 1 + bz);
        return bz;
    }

    private static long bz(Context context) {
        SharedPreferences sharedPreferences;
        if (context == null || (sharedPreferences = context.getSharedPreferences("ksadsdk_crashseq", 0)) == null) {
            return 0;
        }
        return sharedPreferences.getLong("crashseq", 1);
    }

    private static boolean d(Context context, long j) {
        if (context == null) {
            return false;
        }
        SharedPreferences.Editor edit = context.getSharedPreferences("ksadsdk_crashseq", 0).edit();
        edit.putLong("crashseq", j);
        return edit.commit();
    }

    public static void init(Context context) {
        KB = context;
    }
}