package epson.print;

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

import androidx.annotation.NonNull;


@Deprecated
public class ScanFileNumber {
    private static SharedPreferences getPreferences(@NonNull Context context) {
        return context.getSharedPreferences(CommonDefine.PREFS_NAME_COUNT_NUMBER, 0);
    }

    public static void addCount(@NonNull Context context, int i) {
        SharedPreferences preferences = getPreferences(context);
        int i2 = preferences.getInt(CommonDefine.PREFS_NAME_COUNT_NUMBER, 1);
        SharedPreferences.Editor edit = preferences.edit();
        edit.putInt(CommonDefine.PREFS_NAME_COUNT_NUMBER, i2 + i);
        edit.commit();
    }

    public static int getCount(@NonNull Context context) {
        return getPreferences(context).getInt(CommonDefine.PREFS_NAME_COUNT_NUMBER, 1);
    }
}
