Merge "Fix mCachedAssociations for multiple users" into sc-dev

This commit is contained in:
Evan Chen
2021-06-16 18:36:36 +00:00
committed by Android (Google) Code Review

View File

@@ -454,9 +454,6 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
}).cancelTimeout(); }).cancelTimeout();
}, FgThread.getExecutor()).whenComplete(uncheckExceptions((association, err) -> { }, FgThread.getExecutor()).whenComplete(uncheckExceptions((association, err) -> {
final long callingIdentity = Binder.clearCallingIdentity();
try {
if (err == null) { if (err == null) {
addAssociation(association); addAssociation(association);
} else { } else {
@@ -464,9 +461,6 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
callback.onFailure("No devices found: " + err.getMessage()); callback.onFailure("No devices found: " + err.getMessage());
} }
cleanup(); cleanup();
} finally {
Binder.restoreCallingIdentity(callingIdentity);
}
})); }));
} }