Loading core/java/android/bluetooth/BluetoothAdapter.java +19 −0 Original line number Diff line number Diff line Loading @@ -599,6 +599,25 @@ public final class BluetoothAdapter { return null; } /** * enable or disable Bluetooth HCI snoop log. * * <p>Requires the {@link android.Manifest.permission#BLUETOOTH_ADMIN} * permission * * @return true to indicate configure HCI log successfully, or false on * immediate error * @hide */ public boolean configHciSnoopLog(boolean enable) { try { synchronized(mManagerCallback) { if (mService != null) return mService.configHciSnoopLog(enable); } } catch (RemoteException e) {Log.e(TAG, "", e);} return false; } /** * Get the UUIDs supported by the local Bluetooth adapter. * Loading core/java/android/bluetooth/IBluetooth.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -80,4 +80,6 @@ interface IBluetooth // For Socket ParcelFileDescriptor connectSocket(in BluetoothDevice device, int type, in ParcelUuid uuid, int port, int flag); ParcelFileDescriptor createSocketChannel(int type, in String serviceName, in ParcelUuid uuid, int port, int flag); boolean configHciSnoopLog(boolean enable); } core/java/android/provider/Settings.java +7 −0 Original line number Diff line number Diff line Loading @@ -3191,6 +3191,13 @@ public final class Settings { public static final String INPUT_METHOD_SELECTOR_VISIBILITY = "input_method_selector_visibility"; /** * bluetooth HCI snoop log configuration * @hide */ public static final String BLUETOOTH_HCI_LOG = "bluetooth_hci_log"; /** * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead */ Loading services/java/com/android/server/BluetoothManagerService.java +11 −1 Original line number Diff line number Diff line Loading @@ -793,6 +793,16 @@ class BluetoothManagerService extends IBluetoothManager.Stub { mBinding = false; mBluetooth = IBluetooth.Stub.asInterface(service); try { boolean enableHciSnoopLog = (Settings.Secure.getInt(mContentResolver, Settings.Secure.BLUETOOTH_HCI_LOG, 0) == 1); if (!mBluetooth.configHciSnoopLog(enableHciSnoopLog)) { Log.e(TAG,"IBluetooth.configHciSnoopLog return false"); } } catch (RemoteException e) { Log.e(TAG,"Unable to call configHciSnoopLog", e); } if (mConnection.isGetNameAddressOnly()) { //Request GET NAME AND ADDRESS Message getMsg = mHandler.obtainMessage(MESSAGE_GET_NAME_AND_ADDRESS); Loading Loading
core/java/android/bluetooth/BluetoothAdapter.java +19 −0 Original line number Diff line number Diff line Loading @@ -599,6 +599,25 @@ public final class BluetoothAdapter { return null; } /** * enable or disable Bluetooth HCI snoop log. * * <p>Requires the {@link android.Manifest.permission#BLUETOOTH_ADMIN} * permission * * @return true to indicate configure HCI log successfully, or false on * immediate error * @hide */ public boolean configHciSnoopLog(boolean enable) { try { synchronized(mManagerCallback) { if (mService != null) return mService.configHciSnoopLog(enable); } } catch (RemoteException e) {Log.e(TAG, "", e);} return false; } /** * Get the UUIDs supported by the local Bluetooth adapter. * Loading
core/java/android/bluetooth/IBluetooth.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -80,4 +80,6 @@ interface IBluetooth // For Socket ParcelFileDescriptor connectSocket(in BluetoothDevice device, int type, in ParcelUuid uuid, int port, int flag); ParcelFileDescriptor createSocketChannel(int type, in String serviceName, in ParcelUuid uuid, int port, int flag); boolean configHciSnoopLog(boolean enable); }
core/java/android/provider/Settings.java +7 −0 Original line number Diff line number Diff line Loading @@ -3191,6 +3191,13 @@ public final class Settings { public static final String INPUT_METHOD_SELECTOR_VISIBILITY = "input_method_selector_visibility"; /** * bluetooth HCI snoop log configuration * @hide */ public static final String BLUETOOTH_HCI_LOG = "bluetooth_hci_log"; /** * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead */ Loading
services/java/com/android/server/BluetoothManagerService.java +11 −1 Original line number Diff line number Diff line Loading @@ -793,6 +793,16 @@ class BluetoothManagerService extends IBluetoothManager.Stub { mBinding = false; mBluetooth = IBluetooth.Stub.asInterface(service); try { boolean enableHciSnoopLog = (Settings.Secure.getInt(mContentResolver, Settings.Secure.BLUETOOTH_HCI_LOG, 0) == 1); if (!mBluetooth.configHciSnoopLog(enableHciSnoopLog)) { Log.e(TAG,"IBluetooth.configHciSnoopLog return false"); } } catch (RemoteException e) { Log.e(TAG,"Unable to call configHciSnoopLog", e); } if (mConnection.isGetNameAddressOnly()) { //Request GET NAME AND ADDRESS Message getMsg = mHandler.obtainMessage(MESSAGE_GET_NAME_AND_ADDRESS); Loading