Loading res/values/arrays.xml +27 −0 Original line number Diff line number Diff line Loading @@ -895,6 +895,33 @@ <item>Use ART debug build</item> </string-array> <!-- Titles for logd limit size selection preference. [CHAR LIMIT=14] --> <string-array name="select_logd_size_titles"> <item>64K</item> <item>256K</item> <item>1M</item> <item>4M</item> <item>16M</item> </string-array> <!-- Values for logd limit size selection preference. --> <string-array name="select_logd_size_values" translatable="false" > <item>65536</item> <item>262144</item> <item>1048576</item> <item>4194304</item> <item>16777216</item> </string-array> <!-- Summaries for logd limit size selection preference. [CHAR LIMIT=19]--> <string-array name="select_logd_size_summaries" > <item>64K per log buffer</item> <item>256K per log buffer</item> <item>1M per log buffer</item> <item>4M per log buffer</item> <item>16M per log buffer</item> </string-array> <!-- Titles for HDCP checking preference. [CHAR LIMIT=35] --> <string-array name="hdcp_checking_titles"> <item>Never check</item> Loading res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -3171,6 +3171,10 @@ <string name="wifi_display_certification_summary">Show options for wireless display certification</string> <!-- Setting Checkbox title whether to enable Wifi verbose Logging [CHAR LIMIT=80] --> <string name="wifi_verbose_logging_summary">Increase Wifi logging level, show per SSID RSSI in WiFi Picker</string> <!-- UI debug setting: limit size of Android logger buffers --> <string name="select_logd_size_title">Logger buffer sizes</string> <!-- UI debug setting: limit size of Android logger buffers [CHAR LIMIT=34] --> <string name="select_logd_size_dialog_title">Select Logger sizes per log buffer</string> <!-- Setting Checkbox title whether to allow mock locations --> <string name="allow_mock_location">Allow mock locations</string> <!-- setting Checkbox summary whether to allow mock locations --> Loading res/xml/development_prefs.xml +7 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,13 @@ android:title="@string/wifi_verbose_logging" /> android:summary="@string/wifi_verbose_logging_summary"/> <ListPreference android:key="select_logd_size" android:title="@string/select_logd_size_title" android:dialogTitle="@string/select_logd_size_dialog_title" android:entries="@array/select_logd_size_titles" android:entryValues="@array/select_logd_size_values" /> </PreferenceCategory> <PreferenceCategory android:key="debug_input_category" Loading src/com/android/settings/DevelopmentSettings.java +48 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private static final String DEBUG_APPLICATIONS_CATEGORY_KEY = "debug_applications_category"; private static final String WIFI_DISPLAY_CERTIFICATION_KEY = "wifi_display_certification"; private static final String WIFI_VERBOSE_LOGGING_KEY = "wifi_verbose_logging"; private static final String SELECT_LOGD_SIZE_KEY = "select_logd_size"; private static final String SELECT_LOGD_SIZE_PROPERTY = "persist.logd.size"; private static final String SELECT_LOGD_DEFAULT_SIZE_PROPERTY = "ro.logd.size"; private static final String OPENGL_TRACES_KEY = "enable_opengl_traces"; Loading Loading @@ -201,6 +204,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private CheckBoxPreference mDebugLayout; private CheckBoxPreference mForceRtlLayout; private ListPreference mDebugHwOverdraw; private ListPreference mLogdSize; private ListPreference mTrackFrameTime; private ListPreference mShowNonRectClip; private ListPreference mWindowAnimationScale; Loading Loading @@ -316,6 +320,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment mDebugHwOverdraw = addListPreference(DEBUG_HW_OVERDRAW_KEY); mWifiDisplayCertification = findAndInitCheckboxPref(WIFI_DISPLAY_CERTIFICATION_KEY); mWifiVerboseLogging = findAndInitCheckboxPref(WIFI_VERBOSE_LOGGING_KEY); mLogdSize = addListPreference(SELECT_LOGD_SIZE_KEY); mWindowAnimationScale = addListPreference(WINDOW_ANIMATION_SCALE_KEY); mTransitionAnimationScale = addListPreference(TRANSITION_ANIMATION_SCALE_KEY); mAnimatorDurationScale = addListPreference(ANIMATOR_DURATION_SCALE_KEY); Loading Loading @@ -520,6 +526,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment updateVerifyAppsOverUsbOptions(); updateBugreportOptions(); updateForceRtlOptions(); updateLogdSizeValues(); updateWifiDisplayCertificationOptions(); updateWifiVerboseLoggingOptions(); updateSimulateColorSpace(); Loading @@ -536,6 +543,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment } } resetDebuggerOptions(); writeLogdSizeOption(null); writeAnimationScaleOption(0, mWindowAnimationScale, null); writeAnimationScaleOption(1, mTransitionAnimationScale, null); writeAnimationScaleOption(2, mAnimatorDurationScale, null); Loading Loading @@ -1037,6 +1045,43 @@ public class DevelopmentSettings extends SettingsPreferenceFragment mWifiManager.enableVerboseLogging(mWifiVerboseLogging.isChecked() ? 1 : 0); } private void updateLogdSizeValues() { if (mLogdSize != null) { String currentValue = SystemProperties.get(SELECT_LOGD_SIZE_PROPERTY); if (currentValue == null) { currentValue = SystemProperties.get(SELECT_LOGD_DEFAULT_SIZE_PROPERTY); if (currentValue == null) { currentValue = "256K"; } } String[] values = getResources().getStringArray(R.array.select_logd_size_values); String[] titles = getResources().getStringArray(R.array.select_logd_size_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++) { if (currentValue.equals(values[i]) || currentValue.equals(titles[i])) { index = i; break; } } mLogdSize.setValue(values[index]); mLogdSize.setSummary(summaries[index]); mLogdSize.setOnPreferenceChangeListener(this); } } private void writeLogdSizeOption(Object newValue) { SystemProperties.set(SELECT_LOGD_SIZE_PROPERTY, newValue.toString()); pokeSystemProperties(); try { Process p = Runtime.getRuntime().exec("logcat -b all -G " + newValue.toString()); int status = p.waitFor(); } catch (Exception e) { } updateLogdSizeValues(); } private void updateCpuUsageOptions() { updateCheckBox(mShowCpuUsage, Settings.Global.getInt(getActivity().getContentResolver(), Settings.Global.SHOW_PROCESSES, 0) != 0); Loading Loading @@ -1383,6 +1428,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment updateHdcpValues(); pokeSystemProperties(); return true; } else if (preference == mLogdSize) { writeLogdSizeOption(newValue); return true; } else if (preference == mWindowAnimationScale) { writeAnimationScaleOption(0, mWindowAnimationScale, newValue); return true; Loading Loading
res/values/arrays.xml +27 −0 Original line number Diff line number Diff line Loading @@ -895,6 +895,33 @@ <item>Use ART debug build</item> </string-array> <!-- Titles for logd limit size selection preference. [CHAR LIMIT=14] --> <string-array name="select_logd_size_titles"> <item>64K</item> <item>256K</item> <item>1M</item> <item>4M</item> <item>16M</item> </string-array> <!-- Values for logd limit size selection preference. --> <string-array name="select_logd_size_values" translatable="false" > <item>65536</item> <item>262144</item> <item>1048576</item> <item>4194304</item> <item>16777216</item> </string-array> <!-- Summaries for logd limit size selection preference. [CHAR LIMIT=19]--> <string-array name="select_logd_size_summaries" > <item>64K per log buffer</item> <item>256K per log buffer</item> <item>1M per log buffer</item> <item>4M per log buffer</item> <item>16M per log buffer</item> </string-array> <!-- Titles for HDCP checking preference. [CHAR LIMIT=35] --> <string-array name="hdcp_checking_titles"> <item>Never check</item> Loading
res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -3171,6 +3171,10 @@ <string name="wifi_display_certification_summary">Show options for wireless display certification</string> <!-- Setting Checkbox title whether to enable Wifi verbose Logging [CHAR LIMIT=80] --> <string name="wifi_verbose_logging_summary">Increase Wifi logging level, show per SSID RSSI in WiFi Picker</string> <!-- UI debug setting: limit size of Android logger buffers --> <string name="select_logd_size_title">Logger buffer sizes</string> <!-- UI debug setting: limit size of Android logger buffers [CHAR LIMIT=34] --> <string name="select_logd_size_dialog_title">Select Logger sizes per log buffer</string> <!-- Setting Checkbox title whether to allow mock locations --> <string name="allow_mock_location">Allow mock locations</string> <!-- setting Checkbox summary whether to allow mock locations --> Loading
res/xml/development_prefs.xml +7 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,13 @@ android:title="@string/wifi_verbose_logging" /> android:summary="@string/wifi_verbose_logging_summary"/> <ListPreference android:key="select_logd_size" android:title="@string/select_logd_size_title" android:dialogTitle="@string/select_logd_size_dialog_title" android:entries="@array/select_logd_size_titles" android:entryValues="@array/select_logd_size_values" /> </PreferenceCategory> <PreferenceCategory android:key="debug_input_category" Loading
src/com/android/settings/DevelopmentSettings.java +48 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private static final String DEBUG_APPLICATIONS_CATEGORY_KEY = "debug_applications_category"; private static final String WIFI_DISPLAY_CERTIFICATION_KEY = "wifi_display_certification"; private static final String WIFI_VERBOSE_LOGGING_KEY = "wifi_verbose_logging"; private static final String SELECT_LOGD_SIZE_KEY = "select_logd_size"; private static final String SELECT_LOGD_SIZE_PROPERTY = "persist.logd.size"; private static final String SELECT_LOGD_DEFAULT_SIZE_PROPERTY = "ro.logd.size"; private static final String OPENGL_TRACES_KEY = "enable_opengl_traces"; Loading Loading @@ -201,6 +204,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private CheckBoxPreference mDebugLayout; private CheckBoxPreference mForceRtlLayout; private ListPreference mDebugHwOverdraw; private ListPreference mLogdSize; private ListPreference mTrackFrameTime; private ListPreference mShowNonRectClip; private ListPreference mWindowAnimationScale; Loading Loading @@ -316,6 +320,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment mDebugHwOverdraw = addListPreference(DEBUG_HW_OVERDRAW_KEY); mWifiDisplayCertification = findAndInitCheckboxPref(WIFI_DISPLAY_CERTIFICATION_KEY); mWifiVerboseLogging = findAndInitCheckboxPref(WIFI_VERBOSE_LOGGING_KEY); mLogdSize = addListPreference(SELECT_LOGD_SIZE_KEY); mWindowAnimationScale = addListPreference(WINDOW_ANIMATION_SCALE_KEY); mTransitionAnimationScale = addListPreference(TRANSITION_ANIMATION_SCALE_KEY); mAnimatorDurationScale = addListPreference(ANIMATOR_DURATION_SCALE_KEY); Loading Loading @@ -520,6 +526,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment updateVerifyAppsOverUsbOptions(); updateBugreportOptions(); updateForceRtlOptions(); updateLogdSizeValues(); updateWifiDisplayCertificationOptions(); updateWifiVerboseLoggingOptions(); updateSimulateColorSpace(); Loading @@ -536,6 +543,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment } } resetDebuggerOptions(); writeLogdSizeOption(null); writeAnimationScaleOption(0, mWindowAnimationScale, null); writeAnimationScaleOption(1, mTransitionAnimationScale, null); writeAnimationScaleOption(2, mAnimatorDurationScale, null); Loading Loading @@ -1037,6 +1045,43 @@ public class DevelopmentSettings extends SettingsPreferenceFragment mWifiManager.enableVerboseLogging(mWifiVerboseLogging.isChecked() ? 1 : 0); } private void updateLogdSizeValues() { if (mLogdSize != null) { String currentValue = SystemProperties.get(SELECT_LOGD_SIZE_PROPERTY); if (currentValue == null) { currentValue = SystemProperties.get(SELECT_LOGD_DEFAULT_SIZE_PROPERTY); if (currentValue == null) { currentValue = "256K"; } } String[] values = getResources().getStringArray(R.array.select_logd_size_values); String[] titles = getResources().getStringArray(R.array.select_logd_size_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++) { if (currentValue.equals(values[i]) || currentValue.equals(titles[i])) { index = i; break; } } mLogdSize.setValue(values[index]); mLogdSize.setSummary(summaries[index]); mLogdSize.setOnPreferenceChangeListener(this); } } private void writeLogdSizeOption(Object newValue) { SystemProperties.set(SELECT_LOGD_SIZE_PROPERTY, newValue.toString()); pokeSystemProperties(); try { Process p = Runtime.getRuntime().exec("logcat -b all -G " + newValue.toString()); int status = p.waitFor(); } catch (Exception e) { } updateLogdSizeValues(); } private void updateCpuUsageOptions() { updateCheckBox(mShowCpuUsage, Settings.Global.getInt(getActivity().getContentResolver(), Settings.Global.SHOW_PROCESSES, 0) != 0); Loading Loading @@ -1383,6 +1428,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment updateHdcpValues(); pokeSystemProperties(); return true; } else if (preference == mLogdSize) { writeLogdSizeOption(newValue); return true; } else if (preference == mWindowAnimationScale) { writeAnimationScaleOption(0, mWindowAnimationScale, newValue); return true; Loading