diff options
Diffstat (limited to 'InCallUI/src/com/android')
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardFragment.java | 11 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardPresenter.java | 11 |
2 files changed, 15 insertions, 7 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index efd4818a4..1a9f283b1 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -714,11 +714,12 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr Drawable callStateIcon, String gatewayNumber, boolean isWifi, - boolean isConference) { + boolean isConference, + boolean isWorkCall) { boolean isGatewayCall = !TextUtils.isEmpty(gatewayNumber); CallStateLabel callStateLabel = getCallStateLabelFromState(state, videoState, sessionModificationState, disconnectCause, connectionLabel, isGatewayCall, isWifi, - isConference); + isConference, isWorkCall); Log.v(this, "setCallState " + callStateLabel.getCallStateLabel()); Log.v(this, "AutoDismiss " + callStateLabel.isAutoDismissing()); @@ -1010,7 +1011,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr */ private CallStateLabel getCallStateLabelFromState(int state, int videoState, int sessionModificationState, DisconnectCause disconnectCause, String label, - boolean isGatewayCall, boolean isWifi, boolean isConference) { + boolean isGatewayCall, boolean isWifi, boolean isConference, boolean isWorkCall) { final Context context = getView().getContext(); CharSequence callStateLabel = null; // Label to display as part of the call banner @@ -1068,7 +1069,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } else if (VideoUtils.isVideoCall(videoState)) { callStateLabel = context.getString(R.string.notification_incoming_video_call); } else { - callStateLabel = context.getString(R.string.card_title_incoming_call); + callStateLabel = + context.getString(isWorkCall ? R.string.card_title_incoming_work_call + : R.string.card_title_incoming_call); } break; case Call.State.DISCONNECTING: diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java index fed229d76..f54c633b3 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -318,7 +318,8 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> null, null, false /* isWifi */, - false /* isConference */); + false /* isConference */, + false /* isWorkCall */); getUi().showHdAudioIndicator(false); } @@ -410,6 +411,9 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> private void updatePrimaryCallState() { if (getUi() != null && mPrimary != null) { + boolean isWorkCall = mPrimary.hasProperty(PROPERTY_WORK_CALL) + || (mPrimaryContactInfo == null ? false + : mPrimaryContactInfo.userType == ContactsUtils.USER_TYPE_WORK); getUi().setCallState( mPrimary.getState(), mPrimary.getVideoState(), @@ -419,7 +423,8 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> getCallStateIcon(), getGatewayNumber(), mPrimary.hasProperty(Details.PROPERTY_WIFI), - mPrimary.isConferenceCall()); + mPrimary.isConferenceCall(), + isWorkCall); maybeShowHdAudioIcon(); setCallbackNumber(); @@ -1108,7 +1113,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> void setCallState(int state, int videoState, int sessionModificationState, DisconnectCause disconnectCause, String connectionLabel, Drawable connectionIcon, String gatewayNumber, boolean isWifi, - boolean isConference); + boolean isConference, boolean isWorkCall); void setPrimaryCallElapsedTime(boolean show, long duration); void setPrimaryName(String name, boolean nameIsNumber); void setPrimaryImage(Drawable image, boolean isVisible); |