Merge "Fix potential NPE in CompanionDeviceDiscoveryService" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
682aa90930
@@ -317,6 +317,9 @@ public class CompanionDeviceDiscoveryService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void onDeviceSelected(String callingPackage, String deviceAddress) {
|
void onDeviceSelected(String callingPackage, String deviceAddress) {
|
||||||
|
if (callingPackage == null || deviceAddress == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
mServiceCallback.complete(new Association(
|
mServiceCallback.complete(new Association(
|
||||||
getUserId(), deviceAddress, callingPackage, mRequest.getDeviceProfile(), false,
|
getUserId(), deviceAddress, callingPackage, mRequest.getDeviceProfile(), false,
|
||||||
System.currentTimeMillis()));
|
System.currentTimeMillis()));
|
||||||
|
|||||||
Reference in New Issue
Block a user