Merge "Add more log for analysis" into tm-qpr-dev am: 2de34a740c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19894991 Change-Id: If1215a83e6242e3f6406d3886098d8142a7bcff5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -398,6 +398,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
|
|||||||
* @param id the group id from the CSIP.
|
* @param id the group id from the CSIP.
|
||||||
*/
|
*/
|
||||||
public void setGroupId(int id) {
|
public void setGroupId(int id) {
|
||||||
|
Log.d(TAG, this.getDevice().getAnonymizedAddress() + " set GroupId " + id);
|
||||||
mGroupId = id;
|
mGroupId = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -357,8 +357,12 @@ public class CachedBluetoothDeviceManager {
|
|||||||
* {@code false}.
|
* {@code false}.
|
||||||
*/
|
*/
|
||||||
public synchronized boolean shouldPairByCsip(BluetoothDevice device, int groupId) {
|
public synchronized boolean shouldPairByCsip(BluetoothDevice device, int groupId) {
|
||||||
if (mOngoingSetMemberPair != null || device.getBondState() != BluetoothDevice.BOND_NONE
|
boolean isOngoingSetMemberPair = mOngoingSetMemberPair != null;
|
||||||
|
int bondState = device.getBondState();
|
||||||
|
if (isOngoingSetMemberPair || bondState != BluetoothDevice.BOND_NONE
|
||||||
|| !mCsipDeviceManager.isExistedGroupId(groupId)) {
|
|| !mCsipDeviceManager.isExistedGroupId(groupId)) {
|
||||||
|
Log.d(TAG, "isOngoingSetMemberPair: " + isOngoingSetMemberPair
|
||||||
|
+ " , device.getBondState: " + bondState);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,9 +102,12 @@ public class CsipDeviceManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private CachedBluetoothDevice getCachedDevice(int groupId) {
|
private CachedBluetoothDevice getCachedDevice(int groupId) {
|
||||||
|
log("getCachedDevice: groupId: " + groupId);
|
||||||
for (int i = mCachedDevices.size() - 1; i >= 0; i--) {
|
for (int i = mCachedDevices.size() - 1; i >= 0; i--) {
|
||||||
CachedBluetoothDevice cachedDevice = mCachedDevices.get(i);
|
CachedBluetoothDevice cachedDevice = mCachedDevices.get(i);
|
||||||
if (cachedDevice.getGroupId() == groupId) {
|
if (cachedDevice.getGroupId() == groupId) {
|
||||||
|
log("getCachedDevice: found cachedDevice with the groupId: "
|
||||||
|
+ cachedDevice.getDevice().getAnonymizedAddress());
|
||||||
return cachedDevice;
|
return cachedDevice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user