Code Cleanup
This commit is contained in:
parent
6ff3eb2e2a
commit
520b6b74ca
22 changed files with 155 additions and 139 deletions
|
@ -36,7 +36,7 @@ public class BlacklistStore extends SQLiteOpenHelper {
|
|||
public static final String DATABASE_NAME = "blacklist.db";
|
||||
private static final int VERSION = 2;
|
||||
private static BlacklistStore sInstance = null;
|
||||
private Context context;
|
||||
private final Context context;
|
||||
|
||||
public BlacklistStore(final Context context) {
|
||||
super(context, DATABASE_NAME, null, VERSION);
|
||||
|
|
|
@ -34,24 +34,27 @@ public class SongPlayCountStore extends SQLiteOpenHelper {
|
|||
private static final int VERSION = 3;
|
||||
// how many weeks worth of playback to track
|
||||
private static final int NUM_WEEKS = 52;
|
||||
@Nullable private static SongPlayCountStore sInstance = null;
|
||||
@Nullable
|
||||
private static SongPlayCountStore sInstance = null;
|
||||
// interpolator curve applied for measuring the curve
|
||||
@NonNull private static Interpolator sInterpolator = new AccelerateInterpolator(1.5f);
|
||||
@NonNull
|
||||
private static final Interpolator sInterpolator = new AccelerateInterpolator(1.5f);
|
||||
// how high to multiply the interpolation curve
|
||||
@SuppressWarnings("FieldCanBeLocal")
|
||||
private static int INTERPOLATOR_HEIGHT = 50;
|
||||
private static final int INTERPOLATOR_HEIGHT = 50;
|
||||
|
||||
// how high the base value is. The ratio of the Height to Base is what really matters
|
||||
@SuppressWarnings("FieldCanBeLocal")
|
||||
private static int INTERPOLATOR_BASE = 25;
|
||||
private static final int INTERPOLATOR_BASE = 25;
|
||||
|
||||
@SuppressWarnings("FieldCanBeLocal")
|
||||
private static int ONE_WEEK_IN_MS = 1000 * 60 * 60 * 24 * 7;
|
||||
private static final int ONE_WEEK_IN_MS = 1000 * 60 * 60 * 24 * 7;
|
||||
|
||||
@NonNull private static String WHERE_ID_EQUALS = SongPlayCountColumns.ID + "=?";
|
||||
@NonNull
|
||||
private static final String WHERE_ID_EQUALS = SongPlayCountColumns.ID + "=?";
|
||||
|
||||
// number of weeks since epoch time
|
||||
private int mNumberOfWeeksSinceEpoch;
|
||||
private final int mNumberOfWeeksSinceEpoch;
|
||||
|
||||
// used to track if we've walked through the db and updated all the rows
|
||||
private boolean mDatabaseUpdated;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue