Loading core/java/android/server/BluetoothEventLoop.java +5 −0 Original line number Diff line number Diff line Loading @@ -240,6 +240,11 @@ class BluetoothEventLoop { } /*package*/ void onPropertyChanged(String[] propValues) { if (mBluetoothService.isAdapterPropertiesEmpty()) { // We have got a property change before // we filled up our cache. mBluetoothService.getAllProperties(); } String name = propValues[0]; if (name.equals("Name")) { Intent intent = new Intent(BluetoothIntent.NAME_CHANGED_ACTION); Loading core/java/android/server/BluetoothService.java +4 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,10 @@ public class BluetoothService extends IBluetooth.Stub { } } /*package*/ synchronized boolean isAdapterPropertiesEmpty() { return mAdapterProperties.isEmpty(); } /*package*/synchronized void getAllProperties() { mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); mAdapterProperties.clear(); Loading Loading
core/java/android/server/BluetoothEventLoop.java +5 −0 Original line number Diff line number Diff line Loading @@ -240,6 +240,11 @@ class BluetoothEventLoop { } /*package*/ void onPropertyChanged(String[] propValues) { if (mBluetoothService.isAdapterPropertiesEmpty()) { // We have got a property change before // we filled up our cache. mBluetoothService.getAllProperties(); } String name = propValues[0]; if (name.equals("Name")) { Intent intent = new Intent(BluetoothIntent.NAME_CHANGED_ACTION); Loading
core/java/android/server/BluetoothService.java +4 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,10 @@ public class BluetoothService extends IBluetooth.Stub { } } /*package*/ synchronized boolean isAdapterPropertiesEmpty() { return mAdapterProperties.isEmpty(); } /*package*/synchronized void getAllProperties() { mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); mAdapterProperties.clear(); Loading