Merge "Fix system crash when unpair app" into sc-dev
This commit is contained in:
@@ -753,9 +753,19 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
|
||||
}
|
||||
return notMatch;
|
||||
}));
|
||||
restartBleScan();
|
||||
}
|
||||
|
||||
void onAssociationPreRemove(Association association) {
|
||||
if (association.isNotifyOnDeviceNearby()) {
|
||||
ServiceConnector<ICompanionDeviceService> serviceConnector =
|
||||
mDeviceListenerServiceConnectors.forUser(association.getUserId())
|
||||
.get(association.getPackageName());
|
||||
if (serviceConnector != null) {
|
||||
serviceConnector.unbind();
|
||||
}
|
||||
}
|
||||
|
||||
String deviceProfile = association.getDeviceProfile();
|
||||
if (deviceProfile != null) {
|
||||
Association otherAssociationWithDeviceProfile = find(
|
||||
@@ -787,16 +797,6 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (association.isNotifyOnDeviceNearby()) {
|
||||
ServiceConnector<ICompanionDeviceService> serviceConnector =
|
||||
mDeviceListenerServiceConnectors.forUser(association.getUserId())
|
||||
.get(association.getPackageName());
|
||||
if (serviceConnector != null) {
|
||||
serviceConnector.unbind();
|
||||
restartBleScan();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSpecialAccessPermissionForAssociatedPackage(Association association) {
|
||||
|
||||
Reference in New Issue
Block a user