mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
added a function that generates pseudo-random numbers that change every x hours
This commit is contained in:
parent
a7fd7688ab
commit
40e9a6f778
4 changed files with 40 additions and 0 deletions
|
|
@ -34,6 +34,8 @@ public class PreferenceUtil {
|
|||
public static final String MAXIMUM_BITRATE = "maximum_bitrate";
|
||||
public static final String AUDIO_DUCKING = "audio_ducking";
|
||||
|
||||
public static final String SONG_NUMBER = "SONG_NUMBER";
|
||||
|
||||
private static PreferenceUtil sInstance;
|
||||
private final SharedPreferences mPreferences;
|
||||
|
||||
|
|
@ -175,4 +177,14 @@ public class PreferenceUtil {
|
|||
public final boolean getAudioDucking() {
|
||||
return mPreferences.getBoolean(AUDIO_DUCKING, true);
|
||||
}
|
||||
|
||||
public int getSongNumber() {
|
||||
return mPreferences.getInt(SONG_NUMBER, 0);
|
||||
}
|
||||
|
||||
public void setSongNumber(int number) {
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
editor.putInt(SONG_NUMBER, number);
|
||||
editor.apply();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue