Limit btsnoop file size (4/8)
Limit btsnoop file size by rotating between snoop files. The rotation occurrs when a fixed number of packets have been logged and will start overwriting the older file. Bug: 35998031 Test: Enable snoop logs from developer options and let logs get large Change-Id: I94f8f6bc12ab3f7ff406c9392934ecb7209cd635
This commit is contained in:
@@ -207,6 +207,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
|||||||
"persist.bluetooth.avrcpversion";
|
"persist.bluetooth.avrcpversion";
|
||||||
private static final String BLUETOOTH_ENABLE_INBAND_RINGING_PROPERTY =
|
private static final String BLUETOOTH_ENABLE_INBAND_RINGING_PROPERTY =
|
||||||
"persist.bluetooth.enableinbandringing";
|
"persist.bluetooth.enableinbandringing";
|
||||||
|
private static final String BLUETOOTH_BTSNOOP_ENABLE_PROPERTY =
|
||||||
|
"persist.bluetooth.btsnoopenable";
|
||||||
|
|
||||||
private static final String BLUETOOTH_ENABLE_INBAND_RINGING_KEY = "bluetooth_enable_inband_ringing";
|
private static final String BLUETOOTH_ENABLE_INBAND_RINGING_KEY = "bluetooth_enable_inband_ringing";
|
||||||
private static final String BLUETOOTH_SELECT_AVRCP_VERSION_KEY = "bluetooth_select_avrcp_version";
|
private static final String BLUETOOTH_SELECT_AVRCP_VERSION_KEY = "bluetooth_select_avrcp_version";
|
||||||
@@ -765,8 +767,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
|||||||
mHaveDebugSettings |= mTelephonyMonitorController.updatePreference();
|
mHaveDebugSettings |= mTelephonyMonitorController.updatePreference();
|
||||||
updateSwitchPreference(mKeepScreenOn, Settings.Global.getInt(cr,
|
updateSwitchPreference(mKeepScreenOn, Settings.Global.getInt(cr,
|
||||||
Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0) != 0);
|
Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0) != 0);
|
||||||
updateSwitchPreference(mBtHciSnoopLog, Settings.Secure.getInt(cr,
|
updateSwitchPreference(mBtHciSnoopLog, SystemProperties.getBoolean(
|
||||||
Settings.Secure.BLUETOOTH_HCI_LOG, 0) != 0);
|
BLUETOOTH_BTSNOOP_ENABLE_PROPERTY, false));
|
||||||
updateSwitchPreference(mDebugViewAttributes, Settings.Global.getInt(cr,
|
updateSwitchPreference(mDebugViewAttributes, Settings.Global.getInt(cr,
|
||||||
Settings.Global.DEBUG_VIEW_ATTRIBUTES, 0) != 0);
|
Settings.Global.DEBUG_VIEW_ATTRIBUTES, 0) != 0);
|
||||||
updateSwitchPreference(mForceAllowOnExternal, Settings.Global.getInt(cr,
|
updateSwitchPreference(mForceAllowOnExternal, Settings.Global.getInt(cr,
|
||||||
@@ -879,10 +881,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
|||||||
|
|
||||||
private void writeBtHciSnoopLogOptions() {
|
private void writeBtHciSnoopLogOptions() {
|
||||||
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
||||||
adapter.configHciSnoopLog(mBtHciSnoopLog.isChecked());
|
SystemProperties.set(BLUETOOTH_BTSNOOP_ENABLE_PROPERTY,
|
||||||
Settings.Secure.putInt(getActivity().getContentResolver(),
|
Boolean.toString(mBtHciSnoopLog.isChecked()));
|
||||||
Settings.Secure.BLUETOOTH_HCI_LOG,
|
|
||||||
mBtHciSnoopLog.isChecked() ? 1 : 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeDebuggerOptions() {
|
private void writeDebuggerOptions() {
|
||||||
|
Reference in New Issue
Block a user