Merge "Address API council feedback" into sc-dev

This commit is contained in:
Eugene Susla
2021-03-04 19:09:23 +00:00
committed by Android (Google) Code Review
3 changed files with 6 additions and 2 deletions

View File

@@ -60,6 +60,10 @@ public final class AssociationRequest implements Parcelable {
/**
* Device profile: watch.
*
* If specified, the current request may have a modified UI to highlight that the device being
* set up is a specific kind of device, and some extra permissions may be granted to the app
* as a result.
*
* @see AssociationRequest.Builder#setDeviceProfile
*/
public static final String DEVICE_PROFILE_WATCH =

View File

@@ -668,7 +668,7 @@ public final class PermissionControllerManager {
public void getPrivilegesDescriptionStringForProfile(
@NonNull String profileName,
@NonNull @CallbackExecutor Executor executor,
@NonNull Consumer<String> callback) {
@NonNull Consumer<CharSequence> callback) {
mRemoteService.postAsync(service -> {
AndroidFuture<String> future = new AndroidFuture<>();
service.getPrivilegesDescriptionStringForProfile(profileName, future);

View File

@@ -1330,7 +1330,7 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
mPermissionControllerManager.getPrivilegesDescriptionStringForProfile(
deviceProfile, FgThread.getExecutor(), desc -> {
try {
result.complete(desc);
result.complete(String.valueOf(desc));
} catch (Exception e) {
result.completeExceptionally(e);
}