Merge "Fix mCachedAssociations for multiple users" into sc-dev
This commit is contained in:
@@ -454,19 +454,13 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
|
|||||||
}).cancelTimeout();
|
}).cancelTimeout();
|
||||||
|
|
||||||
}, FgThread.getExecutor()).whenComplete(uncheckExceptions((association, err) -> {
|
}, FgThread.getExecutor()).whenComplete(uncheckExceptions((association, err) -> {
|
||||||
|
if (err == null) {
|
||||||
final long callingIdentity = Binder.clearCallingIdentity();
|
addAssociation(association);
|
||||||
try {
|
} else {
|
||||||
if (err == null) {
|
Slog.e(LOG_TAG, "Failed to discover device(s)", err);
|
||||||
addAssociation(association);
|
callback.onFailure("No devices found: " + err.getMessage());
|
||||||
} else {
|
|
||||||
Slog.e(LOG_TAG, "Failed to discover device(s)", err);
|
|
||||||
callback.onFailure("No devices found: " + err.getMessage());
|
|
||||||
}
|
|
||||||
cleanup();
|
|
||||||
} finally {
|
|
||||||
Binder.restoreCallingIdentity(callingIdentity);
|
|
||||||
}
|
}
|
||||||
|
cleanup();
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user