Merge "[CDM] Expose logs for devices found while discovering" into tm-qpr-dev

This commit is contained in:
Guojing Yuan
2022-10-17 18:23:40 +00:00
committed by Android (Google) Code Review

View File

@@ -350,7 +350,7 @@ public class CompanionDeviceDiscoveryService extends Service {
} }
return; return;
} }
if (DEBUG) Log.i(TAG, "onDeviceFound() " + device.toShortString() + " - New device."); Log.i(TAG, "onDeviceFound() " + device.toShortString() + " - New device.");
// First: make change. // First: make change.
mDevicesFound.add(device); mDevicesFound.add(device);
@@ -363,9 +363,9 @@ public class CompanionDeviceDiscoveryService extends Service {
}); });
} }
private void onDeviceLost(@Nullable DeviceFilterPair<?> device) { private void onDeviceLost(@NonNull DeviceFilterPair<?> device) {
runOnMainThread(() -> { runOnMainThread(() -> {
if (DEBUG) Log.i(TAG, "onDeviceLost(), device=" + device.toShortString()); Log.i(TAG, "onDeviceLost(), device=" + device.toShortString());
// First: make change. // First: make change.
mDevicesFound.remove(device); mDevicesFound.remove(device);