Merge "Fix potential NPE in CompanionDeviceDiscoveryService" into sc-dev am: 682aa90930

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15223919

Change-Id: I9a4808010a5062b27b4410b722ba66f2caf998a8
This commit is contained in:
TreeHugger Robot
2021-07-08 03:47:38 +00:00
committed by Automerger Merge Worker

View File

@@ -317,6 +317,9 @@ public class CompanionDeviceDiscoveryService extends Service {
}
void onDeviceSelected(String callingPackage, String deviceAddress) {
if (callingPackage == null || deviceAddress == null) {
return;
}
mServiceCallback.complete(new Association(
getUserId(), deviceAddress, callingPackage, mRequest.getDeviceProfile(), false,
System.currentTimeMillis()));