am 100f0861: Merge change 24376 into eclair
Merge commit '100f08613392c225b8dff3f1e1d586f981884e29' into eclair-plus-aosp * commit '100f08613392c225b8dff3f1e1d586f981884e29': Query for all properties if a property change is received and cache is empty.
This commit is contained in:
@@ -240,6 +240,11 @@ class BluetoothEventLoop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*package*/ void onPropertyChanged(String[] propValues) {
|
/*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];
|
String name = propValues[0];
|
||||||
if (name.equals("Name")) {
|
if (name.equals("Name")) {
|
||||||
Intent intent = new Intent(BluetoothIntent.NAME_CHANGED_ACTION);
|
Intent intent = new Intent(BluetoothIntent.NAME_CHANGED_ACTION);
|
||||||
|
|||||||
@@ -538,6 +538,10 @@ public class BluetoothService extends IBluetooth.Stub {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*package*/ synchronized boolean isAdapterPropertiesEmpty() {
|
||||||
|
return mAdapterProperties.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
/*package*/synchronized void getAllProperties() {
|
/*package*/synchronized void getAllProperties() {
|
||||||
mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
|
mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
|
||||||
mAdapterProperties.clear();
|
mAdapterProperties.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user