Merge "Settings: switch to using ctl.start property instead of exec logcat" am: 5987a26e78

am: e938d6e6e7

* commit 'e938d6e6e7484d082878f493bdfbbce78eb597fc':
  Settings: switch to using ctl.start property instead of exec logcat
This commit is contained in:
Mark Salyzyn
2016-01-06 19:21:59 +00:00
committed by android-build-merger

View File

@@ -1413,14 +1413,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
final String size = (newValue != null) ? final String size = (newValue != null) ?
newValue.toString() : DEFAULT_LOG_RING_BUFFER_SIZE_IN_BYTES; newValue.toString() : DEFAULT_LOG_RING_BUFFER_SIZE_IN_BYTES;
SystemProperties.set(SELECT_LOGD_SIZE_PROPERTY, size); SystemProperties.set(SELECT_LOGD_SIZE_PROPERTY, size);
SystemProperties.set("ctl.start", "logd-reinit");
pokeSystemProperties(); pokeSystemProperties();
try {
Process p = Runtime.getRuntime().exec("logcat -b all -G " + size);
p.waitFor();
Log.i(TAG, "Logcat ring buffer sizes set to: " + size);
} catch (Exception e) {
Log.w(TAG, "Cannot set logcat ring buffer sizes", e);
}
updateLogdSizeValues(); updateLogdSizeValues();
} }