From 8f3a25bf7d81e48a7f23f0df2b2e27b311a18a97 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Tue, 5 Jan 2016 15:51:46 -0800 Subject: [PATCH] Settings: switch to using ctl.start property instead of exec logcat - Moves policy of what to do with buffer size changes to logd Bug: 23685592 Change-Id: Ib80a755213742dbf806a6f4423d5a709de2da645 --- src/com/android/settings/DevelopmentSettings.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index ff24fa9b959..9a9b50df4a9 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -1311,14 +1311,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment final String size = (newValue != null) ? newValue.toString() : DEFAULT_LOG_RING_BUFFER_SIZE_IN_BYTES; SystemProperties.set(SELECT_LOGD_SIZE_PROPERTY, size); + SystemProperties.set("ctl.start", "logd-reinit"); 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(); }