Merge "Fix mCachedAssociations for multiple users" into sc-dev am: 10778dd4d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14972608 Change-Id: Ieba25bbfbb185e3613b69c6b238aabcbf43609cf
This commit is contained in:
@@ -454,19 +454,13 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
|
||||
}).cancelTimeout();
|
||||
|
||||
}, FgThread.getExecutor()).whenComplete(uncheckExceptions((association, err) -> {
|
||||
|
||||
final long callingIdentity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
if (err == null) {
|
||||
addAssociation(association);
|
||||
} else {
|
||||
Slog.e(LOG_TAG, "Failed to discover device(s)", err);
|
||||
callback.onFailure("No devices found: " + err.getMessage());
|
||||
}
|
||||
cleanup();
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(callingIdentity);
|
||||
if (err == null) {
|
||||
addAssociation(association);
|
||||
} else {
|
||||
Slog.e(LOG_TAG, "Failed to discover device(s)", err);
|
||||
callback.onFailure("No devices found: " + err.getMessage());
|
||||
}
|
||||
cleanup();
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user