diff options
author | Brandon Maxwell <maxwelb@google.com> | 2016-01-21 22:55:41 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-01-21 22:55:41 +0000 |
commit | e8b7032e0c7c4fbb834f8bda9e5823bd8d32ada0 (patch) | |
tree | db8858394ffc763ce42f768dde111eff9784e174 | |
parent | d05ac12ca3e94a52afbe31fe01f83b817eebea85 (diff) | |
parent | 3917ad157ba21d024ec3232c9891f1f0a170bcaf (diff) |
Merge "Hiding addCall button while the device is fbe locked" into ub-contactsdialer-b-dev
-rw-r--r-- | InCallUI/src/com/android/incallui/CallButtonPresenter.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java index 7e5f7c63f..34298c3fa 100644 --- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java +++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java @@ -35,6 +35,7 @@ import android.telecom.VideoProfile; import com.android.contacts.common.compat.SdkVersionOverride; import com.android.dialer.compat.CallAudioStateCompat; +import com.android.dialer.compat.UserManagerCompat; import com.android.incallui.AudioModeProvider.AudioModeListener; import com.android.incallui.InCallCameraManager.Listener; import com.android.incallui.InCallPresenter.CanAddCallListener; @@ -378,7 +379,8 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto && call.can(android.telecom.Call.Details.CAPABILITY_HOLD); final boolean isCallOnHold = call.getState() == Call.State.ONHOLD; - final boolean showAddCall = TelecomAdapter.getInstance().canAddCall(call); + final boolean showAddCall = TelecomAdapter.getInstance().canAddCall(call) + && UserManagerCompat.isUserUnlocked(ui.getContext()); final boolean showMerge = call.can( android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE); final boolean showUpgradeToVideo = !isVideo && hasVideoCallCapabilities(call); |