diff options
| author | Shuo Qian <shuoq@google.com> | 2021-02-10 15:12:09 -0800 |
|---|---|---|
| committer | Shuo Qian <shuoq@google.com> | 2021-02-25 22:01:27 +0000 |
| commit | 93273fd60d13a44b9b64dd430bebba1855df525a (patch) | |
| tree | 203559b2b54f0c481d36b85810c30c5d761cc6e4 /telecomm/java/android/telecom/TelecomManager.java | |
| parent | 84fc40ad8176ac46c8ea77cfa8331af35bf4b513 (diff) | |
Companion InCallService API review
Test: atest; make docs
Bug: 179116441
Change-Id: Id75e727f6c3fc42132a80f7258bf790be79acf19
Merged-In: Id75e727f6c3fc42132a80f7258bf790be79acf19
Diffstat (limited to 'telecomm/java/android/telecom/TelecomManager.java')
| -rw-r--r-- | telecomm/java/android/telecom/TelecomManager.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 472d63946ebc..17749e8b0a8f 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -1702,22 +1702,22 @@ public class TelecomManager { } /** - * Returns whether the caller has {@link InCallService} access for companion apps. - * - * A companion app is an app associated with a physical wearable device via the - * {@link android.companion.CompanionDeviceManager} API. + * Returns whether the caller has {@link android.Manifest.permission#MANAGE_ONGOING_CALLS} + * permission. The permission can be obtained by associating with a physical wearable device + * via the {@link android.companion.CompanionDeviceManager} API as a companion app. If the + * caller app has the permission, it has {@link InCallService} access to manage ongoing calls. * * @return {@code true} if the caller has {@link InCallService} access for * companion app; {@code false} otherwise. */ - public boolean hasCompanionInCallServiceAccess() { + public boolean hasManageOngoingCallsPermission() { ITelecomService service = getTelecomService(); if (service != null) { try { - return service.hasCompanionInCallServiceAccess( + return service.hasManageOngoingCallsPermission( mContext.getOpPackageName()); } catch (RemoteException e) { - Log.e(TAG, "RemoteException calling hasCompanionInCallServiceAccess().", e); + Log.e(TAG, "RemoteException calling hasManageOngoingCallsPermission().", e); if (!isSystemProcess()) { e.rethrowAsRuntimeException(); } |
