Merge "Address API council feedback" into sc-dev
This commit is contained in:
@@ -60,6 +60,10 @@ public final class AssociationRequest implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Device profile: watch.
|
* 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
|
* @see AssociationRequest.Builder#setDeviceProfile
|
||||||
*/
|
*/
|
||||||
public static final String DEVICE_PROFILE_WATCH =
|
public static final String DEVICE_PROFILE_WATCH =
|
||||||
|
|||||||
@@ -668,7 +668,7 @@ public final class PermissionControllerManager {
|
|||||||
public void getPrivilegesDescriptionStringForProfile(
|
public void getPrivilegesDescriptionStringForProfile(
|
||||||
@NonNull String profileName,
|
@NonNull String profileName,
|
||||||
@NonNull @CallbackExecutor Executor executor,
|
@NonNull @CallbackExecutor Executor executor,
|
||||||
@NonNull Consumer<String> callback) {
|
@NonNull Consumer<CharSequence> callback) {
|
||||||
mRemoteService.postAsync(service -> {
|
mRemoteService.postAsync(service -> {
|
||||||
AndroidFuture<String> future = new AndroidFuture<>();
|
AndroidFuture<String> future = new AndroidFuture<>();
|
||||||
service.getPrivilegesDescriptionStringForProfile(profileName, future);
|
service.getPrivilegesDescriptionStringForProfile(profileName, future);
|
||||||
|
|||||||
@@ -1330,7 +1330,7 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
|
|||||||
mPermissionControllerManager.getPrivilegesDescriptionStringForProfile(
|
mPermissionControllerManager.getPrivilegesDescriptionStringForProfile(
|
||||||
deviceProfile, FgThread.getExecutor(), desc -> {
|
deviceProfile, FgThread.getExecutor(), desc -> {
|
||||||
try {
|
try {
|
||||||
result.complete(desc);
|
result.complete(String.valueOf(desc));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
result.completeExceptionally(e);
|
result.completeExceptionally(e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user