diff options
author | Yorke Lee <yorkelee@google.com> | 2014-09-03 15:01:18 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-09-03 17:04:54 -0700 |
commit | cc5179f0e3725a5f3c140fc57d719e18b7aa104f (patch) | |
tree | 690284a021466e26b80706a5e58a97cbff28457a /core/java/com/android/internal/widget/LockPatternUtils.java | |
parent | 09cfeaff8e0c744085f0d068e41ad59f2639907f (diff) | |
download | frameworks_base-cc5179f0e3725a5f3c140fc57d719e18b7aa104f.zip frameworks_base-cc5179f0e3725a5f3c140fc57d719e18b7aa104f.tar.gz frameworks_base-cc5179f0e3725a5f3c140fc57d719e18b7aa104f.tar.bz2 |
Use TelecommManager APIs to detect if we are in a call
Bug: 17335666
Change-Id: I5f443c76041e51a2eca903db924fb26031dde055
Diffstat (limited to 'core/java/com/android/internal/widget/LockPatternUtils.java')
-rw-r--r-- | core/java/com/android/internal/widget/LockPatternUtils.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index 2114ff6..c84708e 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -1449,7 +1449,7 @@ public class LockPatternUtils { } int textId; - if (getTelecommManager().isInCall()) { + if (isInCall()) { // show "return to call" text and show phone icon textId = R.string.lockscreen_return_to_call; int phoneCallIcon = showIcon ? R.drawable.stat_sys_phone_call : 0; @@ -1470,6 +1470,13 @@ public class LockPatternUtils { getTelecommManager().showInCallScreen(false); } + /** + * @return {@code true} if there is a call currently in progress, {@code false} otherwise. + */ + public boolean isInCall() { + return getTelecommManager().isInCall(); + } + private TelecommManager getTelecommManager() { return (TelecommManager) mContext.getSystemService(Context.TELECOMM_SERVICE); } |