diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-02-08 18:51:54 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-02-08 18:51:54 -0800 |
commit | e696190dcf4ad31476f7018d59ace23eea68d505 (patch) | |
tree | 7539ffc8f88f7d3567c991d7121552e88ba38277 /src | |
parent | 12c277209fb81ba578d59551e1954ddca73cbaaa (diff) | |
download | dsub-e696190dcf4ad31476f7018d59ace23eea68d505.tar.gz dsub-e696190dcf4ad31476f7018d59ace23eea68d505.tar.bz2 dsub-e696190dcf4ad31476f7018d59ace23eea68d505.zip |
Updated custom sort message, removed buffer length option
Diffstat (limited to 'src')
3 files changed, 1 insertions, 12 deletions
diff --git a/src/github/daneren2005/dsub/activity/SettingsActivity.java b/src/github/daneren2005/dsub/activity/SettingsActivity.java index 7cebdbdd..40ca5570 100644 --- a/src/github/daneren2005/dsub/activity/SettingsActivity.java +++ b/src/github/daneren2005/dsub/activity/SettingsActivity.java @@ -77,7 +77,6 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer private EditTextPreference randomSize; private ListPreference tempLoss; private ListPreference pauseDisconnect; - private EditTextPreference bufferLength; private Preference addServerPreference; private PreferenceCategory serversCategory; private EditTextPreference chatRefreshRate; @@ -119,7 +118,6 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer randomSize = (EditTextPreference) findPreference(Constants.PREFERENCES_KEY_RANDOM_SIZE); tempLoss = (ListPreference) findPreference(Constants.PREFERENCES_KEY_TEMP_LOSS); pauseDisconnect = (ListPreference) findPreference(Constants.PREFERENCES_KEY_PAUSE_DISCONNECT); - bufferLength = (EditTextPreference) findPreference(Constants.PREFERENCES_KEY_BUFFER_LENGTH); serversCategory = (PreferenceCategory) findPreference(Constants.PREFERENCES_KEY_SERVER_KEY); addServerPreference = (Preference) findPreference(Constants.PREFERENCES_KEY_SERVER_ADD); chatRefreshRate = (EditTextPreference) findPreference(Constants.PREFERENCES_KEY_CHAT_REFRESH); @@ -303,7 +301,6 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer randomSize.setSummary(randomSize.getText()); tempLoss.setSummary(tempLoss.getEntry()); pauseDisconnect.setSummary(pauseDisconnect.getEntry()); - bufferLength.setSummary(bufferLength.getText() + " seconds"); chatRefreshRate.setSummary(chatRefreshRate.getText()); videoPlayer.setSummary(videoPlayer.getEntry()); syncInterval.setSummary(syncInterval.getEntry()); diff --git a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index 19e7625c..9f1e5ee9 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -1622,16 +1622,9 @@ public class DownloadServiceImpl extends Service implements DownloadService { this.position = position; partialFile = downloadFile.getPartialFile(); - SharedPreferences prefs = Util.getPreferences(DownloadServiceImpl.this); - long bufferLength = Integer.parseInt(prefs.getString(Constants.PREFERENCES_KEY_BUFFER_LENGTH, "5")); - if(bufferLength == 0) { - // Set to seconds in a day, basically infinity - bufferLength = 86400L; - } - // Calculate roughly how many bytes BUFFER_LENGTH_SECONDS corresponds to. int bitRate = downloadFile.getBitRate(); - long byteCount = Math.max(100000, bitRate * 1024L / 8L * bufferLength); + long byteCount = Math.max(100000, bitRate * 1024L / 8L * 5L); // Find out how large the file should grow before resuming playback. Log.i(TAG, "Buffering from position " + position + " and bitrate " + bitRate); diff --git a/src/github/daneren2005/dsub/util/Constants.java b/src/github/daneren2005/dsub/util/Constants.java index c6dd49f2..aa4fe62a 100644 --- a/src/github/daneren2005/dsub/util/Constants.java +++ b/src/github/daneren2005/dsub/util/Constants.java @@ -112,7 +112,6 @@ public final class Constants { public static final String PREFERENCES_KEY_SHUFFLE_END_YEAR = "endYear"; public static final String PREFERENCES_KEY_SHUFFLE_GENRE = "genre"; public static final String PREFERENCES_KEY_KEEP_SCREEN_ON = "keepScreenOn"; - public static final String PREFERENCES_KEY_BUFFER_LENGTH = "bufferLength"; public static final String PREFERENCES_EQUALIZER_ON = "equalizerOn"; public static final String PREFERENCES_VISUALIZER_ON = "visualizerOn"; public static final String PREFERENCES_EQUALIZER_SETTINGS = "equalizerSettings"; |