diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-12-22 18:44:31 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-12-22 18:44:31 +0000 |
commit | 88518503c1351ba86f503ebd8742d6b292928ddd (patch) | |
tree | 97c6b6429cd3a0276ece3bba0ce022e4c6b92866 /java/com/android/dialer/telecom/TelecomUtil.java | |
parent | e2da6ef8a56bd9f7eedfa1c6d89e968590e0c09b (diff) | |
parent | 1e8275f3e6f57f285900ce35946064e0550b174a (diff) |
Merge changes I66342431,I5e579f11,I927711aa,Idd4cc115,If8cdbdfa, ...
* changes:
Automated rollback of changelist 179615699
Automated rollback of changelist 179847039
Differentiate read/unread voicemails in the NUI Voicemail by bolding.
Use CHAR_TO_KEY_MAPS in DialpadCharMappings in SmartDialMaps.
Reorganize classes related to smart dial.
Use the orientation obtained in onFinishInflate as the truth in DialpadView.
Added context menu for favorite contacts in new speed dial.
Update assisted dialing extras in preparation for platform implementation.
Quick fix for bugs on simulator voice call.
Fixed crash in UiListener when launching activity with screen off.
Handle contacts which have been disassociated with a number in Cp2PhoneLookup.
Fixed crash in PinnedShortcuts.
Bug: 70402588
Added copySubMessage method to PhoneLookup interface.
Bubble v2 changes.
Always have hardware acceration enabled for InCallActivity
Include inserted calls for consideration in PhoneLookupDataSource.
Don't use phone number in spam call notifications
Register content observer when voicemail table changes.
Add SmartDialMaps for the Bulgarian alphabet and the Ukrainian alphabet.
Remove voicemail from UI only after delete request.
Bubble v2 RTL language fixes.
Implemented SpeedDialEntry Room Database.
Diffstat (limited to 'java/com/android/dialer/telecom/TelecomUtil.java')
-rw-r--r-- | java/com/android/dialer/telecom/TelecomUtil.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/java/com/android/dialer/telecom/TelecomUtil.java b/java/com/android/dialer/telecom/TelecomUtil.java index 22f3727e6..c64a50231 100644 --- a/java/com/android/dialer/telecom/TelecomUtil.java +++ b/java/com/android/dialer/telecom/TelecomUtil.java @@ -178,6 +178,10 @@ public abstract class TelecomUtil { * are not included. */ public static boolean isInManagedCall(Context context) { + return instance.isInManagedCall(context); + } + + public static boolean isInCall(Context context) { return instance.isInCall(context); } @@ -289,7 +293,7 @@ public abstract class TelecomUtil { @VisibleForTesting() public static class TelecomUtilImpl { - public boolean isInCall(Context context) { + public boolean isInManagedCall(Context context) { if (hasReadPhoneStatePermission(context)) { // The TelecomManager#isInCall method returns true anytime the user is in a call. // Starting in O, the APIs include support for self-managed ConnectionServices so that other @@ -308,6 +312,10 @@ public abstract class TelecomUtil { return false; } + public boolean isInCall(Context context) { + return hasReadPhoneStatePermission(context) && getTelecomManager(context).isInCall(); + } + public boolean hasPermission(Context context, String permission) { return ContextCompat.checkSelfPermission(context, permission) == PackageManager.PERMISSION_GRANTED; |