diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-09-17 14:05:15 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-09-17 22:26:16 +0000 |
commit | 894af268def8a817306ea83f21cb25b6f0edf2e3 (patch) | |
tree | 4490984c6684cf4ee865730e770a06b8128c3fd6 /src/com/android/settings/DevelopmentSettings.java | |
parent | 69b674656af869219189fe0f7985c011d29d9b7e (diff) | |
download | packages_apps_Settings-894af268def8a817306ea83f21cb25b6f0edf2e3.tar.gz packages_apps_Settings-894af268def8a817306ea83f21cb25b6f0edf2e3.tar.bz2 packages_apps_Settings-894af268def8a817306ea83f21cb25b6f0edf2e3.zip |
logd: settings: ro.config.low_ram support
- limit settings to 64K, 256K and 1M if ro.config.low_ram true
- Correctly handle ro.logd.size
Bug: 17526187
Change-Id: I2380b649516b29c2a98f54de18e5a4780b3421ce
Diffstat (limited to 'src/com/android/settings/DevelopmentSettings.java')
-rw-r--r-- | src/com/android/settings/DevelopmentSettings.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index d801ae0c8..8bc4b6468 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -1107,9 +1107,13 @@ public class DevelopmentSettings extends SettingsPreferenceFragment } String[] values = getResources().getStringArray(R.array.select_logd_size_values); String[] titles = getResources().getStringArray(R.array.select_logd_size_titles); + if (SystemProperties.get("ro.config.low_ram").equals("true")) { + mLogdSize.setEntries(R.array.select_logd_size_lowram_titles); + titles = getResources().getStringArray(R.array.select_logd_size_lowram_titles); + } String[] summaries = getResources().getStringArray(R.array.select_logd_size_summaries); int index = 1; // punt to second entry if not found - for (int i = 0; i < values.length; i++) { + for (int i = 0; i < titles.length; i++) { if (currentValue.equals(values[i]) || currentValue.equals(titles[i])) { index = i; @@ -1123,6 +1127,10 @@ public class DevelopmentSettings extends SettingsPreferenceFragment } private void writeLogdSizeOption(Object newValue) { + String currentValue = SystemProperties.get(SELECT_LOGD_DEFAULT_SIZE_PROPERTY); + if (currentValue != null) { + DEFAULT_LOG_RING_BUFFER_SIZE_IN_BYTES = currentValue; + } final String size = (newValue != null) ? newValue.toString() : DEFAULT_LOG_RING_BUFFER_SIZE_IN_BYTES; SystemProperties.set(SELECT_LOGD_SIZE_PROPERTY, size); |