Merge "Address API council feedback" into sc-dev am: 9076840750

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13743001

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1036f74d67ca7fefbb8cd87c2d24f94879dd72fb
This commit is contained in:
Eugene Susla
2021-03-04 19:55:51 +00:00
committed by Automerger Merge Worker
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

@@ -1370,7 +1370,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);
}