Loading android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +8 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.bluetooth.btservice; import static android.Manifest.permission.BLUETOOTH_CONNECT; import static android.Manifest.permission.BLUETOOTH_SCAN; import android.annotation.RequiresPermission; import android.bluetooth.BluetoothA2dp; import android.bluetooth.BluetoothA2dpSink; import android.bluetooth.BluetoothAdapter; Loading Loading @@ -424,7 +425,7 @@ class AdapterProperties { } /** * @param mState the mState to set * @param state the mState to set */ void setState(int state) { debugLog("Setting state to " + BluetoothAdapter.nameForState(state)); Loading Loading @@ -598,8 +599,8 @@ class AdapterProperties { * @param codec the codecs to set * @param size the size to set */ boolean setBufferLengthMillis(int codec, int value) { return mService.setBufferLengthMillisNative(codec, value); boolean setBufferLengthMillis(int codec, int size) { return mService.setBufferLengthMillisNative(codec, size); } /** Loading Loading @@ -683,6 +684,7 @@ class AdapterProperties { return mDiscovering; } @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) private void sendConnectionStateChange(int profile, Intent connIntent) { BluetoothDevice device = connIntent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); int prevState = connIntent.getIntExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, -1); Loading @@ -702,6 +704,7 @@ class AdapterProperties { sendConnectionStateChange(device, profile, state, prevState); } @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) void sendConnectionStateChange(BluetoothDevice device, int profile, int state, int prevState) { if (!validateProfileConnectionState(state) || !validateProfileConnectionState(prevState)) { // Previously, an invalid state was broadcast anyway, Loading Loading @@ -880,6 +883,7 @@ class AdapterProperties { } } @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) void adapterPropertyChangedCallback(int[] types, byte[][] values) { Intent intent; int type; Loading Loading @@ -1099,6 +1103,7 @@ class AdapterProperties { } } @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) { writer.println(TAG); writer.println(" " + "Name: " + getName()); Loading Loading
android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +8 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.bluetooth.btservice; import static android.Manifest.permission.BLUETOOTH_CONNECT; import static android.Manifest.permission.BLUETOOTH_SCAN; import android.annotation.RequiresPermission; import android.bluetooth.BluetoothA2dp; import android.bluetooth.BluetoothA2dpSink; import android.bluetooth.BluetoothAdapter; Loading Loading @@ -424,7 +425,7 @@ class AdapterProperties { } /** * @param mState the mState to set * @param state the mState to set */ void setState(int state) { debugLog("Setting state to " + BluetoothAdapter.nameForState(state)); Loading Loading @@ -598,8 +599,8 @@ class AdapterProperties { * @param codec the codecs to set * @param size the size to set */ boolean setBufferLengthMillis(int codec, int value) { return mService.setBufferLengthMillisNative(codec, value); boolean setBufferLengthMillis(int codec, int size) { return mService.setBufferLengthMillisNative(codec, size); } /** Loading Loading @@ -683,6 +684,7 @@ class AdapterProperties { return mDiscovering; } @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) private void sendConnectionStateChange(int profile, Intent connIntent) { BluetoothDevice device = connIntent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); int prevState = connIntent.getIntExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, -1); Loading @@ -702,6 +704,7 @@ class AdapterProperties { sendConnectionStateChange(device, profile, state, prevState); } @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) void sendConnectionStateChange(BluetoothDevice device, int profile, int state, int prevState) { if (!validateProfileConnectionState(state) || !validateProfileConnectionState(prevState)) { // Previously, an invalid state was broadcast anyway, Loading Loading @@ -880,6 +883,7 @@ class AdapterProperties { } } @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) void adapterPropertyChangedCallback(int[] types, byte[][] values) { Intent intent; int type; Loading Loading @@ -1099,6 +1103,7 @@ class AdapterProperties { } } @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) { writer.println(TAG); writer.println(" " + "Name: " + getName()); Loading