diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2014-09-01 20:02:54 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2014-09-01 20:02:54 +0000 |
commit | cd21e27153c81952b8499447875db8c73a63a536 (patch) | |
tree | a82547ec62b877eff65f076d1b5aaf2c74062ae8 /src/org | |
parent | 83a0f2a89ebb8f37d71251d38e013b9f680b90ca (diff) | |
parent | fafd2e1e2cb8f3839740ac42e657875b036806e3 (diff) | |
download | android_packages_wallpapers_PhotoPhase-cd21e27153c81952b8499447875db8c73a63a536.tar.gz android_packages_wallpapers_PhotoPhase-cd21e27153c81952b8499447875db8c73a63a536.tar.bz2 android_packages_wallpapers_PhotoPhase-cd21e27153c81952b8499447875db8c73a63a536.zip |
Merge "photophase: allow to choose more than one minute for transition timers" into cm-11.0
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/cyanogenmod/wallpapers/photophase/preferences/GeneralPreferenceFragment.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/org/cyanogenmod/wallpapers/photophase/preferences/GeneralPreferenceFragment.java b/src/org/cyanogenmod/wallpapers/photophase/preferences/GeneralPreferenceFragment.java index e559ba7..71f3190 100644 --- a/src/org/cyanogenmod/wallpapers/photophase/preferences/GeneralPreferenceFragment.java +++ b/src/org/cyanogenmod/wallpapers/photophase/preferences/GeneralPreferenceFragment.java @@ -120,6 +120,8 @@ public class GeneralPreferenceFragment extends PreferenceFragment { final String formatDisabled = getString(R.string.format_disabled); final String formatSeconds = getString(R.string.format_seconds); final String formatMinutes = getString(R.string.format_minutes); + final String formatHours = getString(R.string.format_hours); + final String formatDays = getString(R.string.format_days); final String formatDim = getString(R.string.format_dim); // Change the preference manager @@ -174,10 +176,18 @@ public class GeneralPreferenceFragment extends PreferenceFragment { // Seconds mTransitionsInterval.setFormat(formatSeconds); return String.valueOf(interval / 1000); + } else if (interval < 3600000) { + // Minutes + mTransitionsInterval.setFormat(formatMinutes); + return String.valueOf(interval / 1000 / 60); + } else if (interval < 86400000) { + // Hours + mTransitionsInterval.setFormat(formatHours); + return String.valueOf(interval / 1000 / 60 / 60); } - // Minutes - mTransitionsInterval.setFormat(formatMinutes); - return String.valueOf(interval / 1000 / 60); + // Days + mTransitionsInterval.setFormat(formatDays); + return String.valueOf(interval / 1000 / 60 / 60 / 24); } }); mTransitionsInterval.setOnPreferenceChangeListener(mOnChangeListener); |