diff options
Diffstat (limited to 'InCallUI')
17 files changed, 90 insertions, 88 deletions
diff --git a/InCallUI/res/values-af/strings.xml b/InCallUI/res/values-af/strings.xml index 291dadc56..3050c2f19 100644 --- a/InCallUI/res/values-af/strings.xml +++ b/InCallUI/res/values-af/strings.xml @@ -21,9 +21,9 @@ <string name="onHold" msgid="9035493194749959955">"Hou aan"</string> <string name="unknown" msgid="6878797917991465859">"Onbekend"</string> <string name="private_num" msgid="6713286113000232309">"Privaat nommer"</string> - <string name="payphone" msgid="4793877574636445118">"Betaalfoon"</string> + <string name="payphone" msgid="4793877574636445118">"Telefoonhokkie"</string> <string name="confCall" msgid="1904840547188336828">"Konferensie-oproep"</string> - <string name="call_lost" msgid="6183862117003999578">"Oproep laat val"</string> + <string name="call_lost" msgid="6183862117003999578">"Oproep is ontkoppel"</string> <string name="audio_mode_speaker" msgid="27649582100085266">"Luidspreker"</string> <string name="audio_mode_earpiece" msgid="4156527186373869107">"Selfoonoorstuk"</string> <string name="audio_mode_wired_headset" msgid="1465350758489175975">"Bedraade kopfoon"</string> @@ -87,11 +87,11 @@ <string name="incall_error_supp_service_transfer" msgid="7235952238189391438">"Kan nie deurskakel nie."</string> <string name="incall_error_supp_service_conference" msgid="7010354362202271726">"Kan nie konferensieoproep maak nie."</string> <string name="incall_error_supp_service_reject" msgid="8998568661508655638">"Kan nie oproep verwerp nie."</string> - <string name="incall_error_supp_service_hangup" msgid="7434513517153834426">"Kan nie oproep(e) laat los nie."</string> + <string name="incall_error_supp_service_hangup" msgid="7434513517153834426">"Kan nie oproep(e) vrystel nie."</string> <string name="incall_call_type_label_sip" msgid="4931428719494190371">"SIP-oproep"</string> <string name="emergency_enable_radio_dialog_title" msgid="4627849966634578257">"Noodoproep"</string> <string name="emergency_enable_radio_dialog_message" msgid="207613549344420291">"Skakel tans radio aan…"</string> - <string name="emergency_enable_radio_dialog_retry" msgid="5960061579996526883">"Geen diens nie. Probeer tans weer …"</string> + <string name="emergency_enable_radio_dialog_retry" msgid="5960061579996526883">"Geen sein nie. Probeer tans weer …"</string> <string name="dial_emergency_error" msgid="1509085166367420355">"Kan nie bel nie. <xliff:g id="NON_EMERGENCY_NUMBER">%s</xliff:g> is nie \'n noodnommer nie."</string> <string name="dial_emergency_empty_error" msgid="9130194953830414638">"Kan nie bel nie. Skakel \'n noodnommer."</string> <string name="dialerKeyboardHintText" msgid="9192914825413747792">"Gebruik sleutelbord om te bel"</string> @@ -134,7 +134,7 @@ <string name="accessibility_call_muted" msgid="2776111226185342220">"Oproep stilgemaak."</string> <string name="accessibility_call_unmuted" msgid="7496527089753980871">"Oproep ontdemp."</string> <string name="accessibility_call_put_on_hold" msgid="4226100429657528833">"Oproep is laat wag."</string> - <string name="accessibility_call_removed_from_hold" msgid="5107480079544990575">"Oproep word nie meer gehou nie."</string> + <string name="accessibility_call_removed_from_hold" msgid="5107480079544990575">"Oproep word nie meer laat wag nie"</string> <string name="description_target_answer" msgid="7205604197797472471">"Antwoord"</string> <string name="description_target_send_sms" msgid="2098326025587950144">"Stuur SMS"</string> <string name="description_target_decline" msgid="4789834364389731957">"Wys af"</string> diff --git a/InCallUI/res/values-hy-rAM/strings.xml b/InCallUI/res/values-hy-rAM/strings.xml index 33141325e..f420ddbb7 100644 --- a/InCallUI/res/values-hy-rAM/strings.xml +++ b/InCallUI/res/values-hy-rAM/strings.xml @@ -23,7 +23,7 @@ <string name="private_num" msgid="6713286113000232309">"Գաղտնի համար"</string> <string name="payphone" msgid="4793877574636445118">"Բջջային տերմինալ"</string> <string name="confCall" msgid="1904840547188336828">"Կոնֆերանս զանգ"</string> - <string name="call_lost" msgid="6183862117003999578">"Զանգն ավարտվեց"</string> + <string name="call_lost" msgid="6183862117003999578">"Զանգը դադարեցվեց"</string> <string name="audio_mode_speaker" msgid="27649582100085266">"Բարձրախոս"</string> <string name="audio_mode_earpiece" msgid="4156527186373869107">"Հեռախոսի ականջակալ"</string> <string name="audio_mode_wired_headset" msgid="1465350758489175975">"Լարային ականջակալ"</string> @@ -85,7 +85,7 @@ <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Հնարավոր չէ փոխանջատել զանգը:"</string> <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Հնարավոր չէ առանձնացնել զանգը:"</string> <string name="incall_error_supp_service_transfer" msgid="7235952238189391438">"Հնարավոր չէ փոխանցել:"</string> - <string name="incall_error_supp_service_conference" msgid="7010354362202271726">"Հնարավոր չէ համամիասնական զանգ կատարել:"</string> + <string name="incall_error_supp_service_conference" msgid="7010354362202271726">"Հնարավոր չէ խմբային զանգ կատարել:"</string> <string name="incall_error_supp_service_reject" msgid="8998568661508655638">"Հնարավոր չէ մերժել զանգը:"</string> <string name="incall_error_supp_service_hangup" msgid="7434513517153834426">"Հնարավոր չէ անջատել զանգ(եր)ը:"</string> <string name="incall_call_type_label_sip" msgid="4931428719494190371">"SIP զանգ"</string> @@ -93,7 +93,7 @@ <string name="emergency_enable_radio_dialog_message" msgid="207613549344420291">"Ռադիոն միացվում է..."</string> <string name="emergency_enable_radio_dialog_retry" msgid="5960061579996526883">"Ծառայությունը մատչելի չէ: Նորից փորձեք…"</string> <string name="dial_emergency_error" msgid="1509085166367420355">"Հնարավոր չէ զանգել: <xliff:g id="NON_EMERGENCY_NUMBER">%s</xliff:g> համարը արտակարգ իրավիճակի համար չէ:"</string> - <string name="dial_emergency_empty_error" msgid="9130194953830414638">"Հնարավոր չէ զանգել: Հավաքեք արտակարգ իրավիճակի համարը:"</string> + <string name="dial_emergency_empty_error" msgid="9130194953830414638">"Հնարավոր չէ զանգել: Հավաքեք արտակարգ իրավիճակի որևէ համար:"</string> <string name="dialerKeyboardHintText" msgid="9192914825413747792">"Օգտագործեք ստեղնաշարը՝ համարհավաքման համար"</string> <string name="overflowHoldMenuItemText" msgid="7382457697092158039">"Պահել զանգը"</string> <string name="overflowResumeMenuItemText" msgid="8826360006222366843">"Վերսկսել զանգը"</string> diff --git a/InCallUI/res/values-in/strings.xml b/InCallUI/res/values-in/strings.xml index 1d5541667..c34c62eb1 100644 --- a/InCallUI/res/values-in/strings.xml +++ b/InCallUI/res/values-in/strings.xml @@ -135,11 +135,11 @@ <string name="accessibility_call_unmuted" msgid="7496527089753980871">"Panggilan disuarakan lagi."</string> <string name="accessibility_call_put_on_hold" msgid="4226100429657528833">"Panggilan ditahan."</string> <string name="accessibility_call_removed_from_hold" msgid="5107480079544990575">"Panggilan tidak lagi ditunda."</string> - <string name="description_target_answer" msgid="7205604197797472471">"Menjawab"</string> + <string name="description_target_answer" msgid="7205604197797472471">"Jawab"</string> <string name="description_target_send_sms" msgid="2098326025587950144">"Mengirim SMS"</string> <string name="description_target_decline" msgid="4789834364389731957">"Menolak"</string> - <string name="description_target_answer_video_call" msgid="3495965588512395026">"Menjawab sebagai video call"</string> - <string name="description_target_answer_audio_call" msgid="8396296303320994450">"Menjawab sebagai panggilan audio"</string> + <string name="description_target_answer_video_call" msgid="3495965588512395026">"Jawab sebagai video call"</string> + <string name="description_target_answer_audio_call" msgid="8396296303320994450">"Jawab sebagai panggilan audio"</string> <string name="description_target_accept_upgrade_to_video_request" msgid="2894072808324604062">"Terima permintaan video"</string> <string name="description_target_decline_upgrade_to_video_request" msgid="4093888612888538776">"Tolak permintaan video"</string> <string name="description_direction_up" msgid="4441409581444516690">"Geser ke atas untuk <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string> diff --git a/InCallUI/res/values-ms-rMY/strings.xml b/InCallUI/res/values-ms-rMY/strings.xml index 9540e6251..0310409de 100644 --- a/InCallUI/res/values-ms-rMY/strings.xml +++ b/InCallUI/res/values-ms-rMY/strings.xml @@ -84,7 +84,7 @@ <string name="incall_error_supp_service_unknown" msgid="323435289607131929">"Perkhidmatan tidak disokong."</string> <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Tidak dapat menukar panggilan."</string> <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Tidak dapat mengasingkan panggilan."</string> - <string name="incall_error_supp_service_transfer" msgid="7235952238189391438">"Tidak dapat memindahkan."</string> + <string name="incall_error_supp_service_transfer" msgid="7235952238189391438">"Tidak dapat memindahkan panggilan."</string> <string name="incall_error_supp_service_conference" msgid="7010354362202271726">"Tidak dapat membuat panggilan persidangan."</string> <string name="incall_error_supp_service_reject" msgid="8998568661508655638">"Tidak dapat menolak panggilan."</string> <string name="incall_error_supp_service_hangup" msgid="7434513517153834426">"Tidak dapat melepaskan panggilan."</string> diff --git a/InCallUI/res/values-ta-rIN/strings.xml b/InCallUI/res/values-ta-rIN/strings.xml index e7db946ab..f5ef486c7 100644 --- a/InCallUI/res/values-ta-rIN/strings.xml +++ b/InCallUI/res/values-ta-rIN/strings.xml @@ -87,7 +87,7 @@ <string name="incall_error_supp_service_transfer" msgid="7235952238189391438">"மாற்ற முடியாது."</string> <string name="incall_error_supp_service_conference" msgid="7010354362202271726">"குழு அழைப்பு செய்ய முடியாது."</string> <string name="incall_error_supp_service_reject" msgid="8998568661508655638">"அழைப்பை நிராகரிக்க முடியாது."</string> - <string name="incall_error_supp_service_hangup" msgid="7434513517153834426">"அழைப்பை(களை) விடுவிக்க முடியாது."</string> + <string name="incall_error_supp_service_hangup" msgid="7434513517153834426">"அழைப்பை(அழைப்புகளை) விடுவிக்க முடியாது."</string> <string name="incall_call_type_label_sip" msgid="4931428719494190371">"SIP அழைப்பு"</string> <string name="emergency_enable_radio_dialog_title" msgid="4627849966634578257">"அவசரகால அழைப்பு"</string> <string name="emergency_enable_radio_dialog_message" msgid="207613549344420291">"ரேடியோவை இயக்குகிறது…"</string> diff --git a/InCallUI/res/values-zh-rTW/strings.xml b/InCallUI/res/values-zh-rTW/strings.xml index 42a0178a8..f986157b7 100644 --- a/InCallUI/res/values-zh-rTW/strings.xml +++ b/InCallUI/res/values-zh-rTW/strings.xml @@ -83,15 +83,15 @@ <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"開始 MMI 序列…"</string> <string name="incall_error_supp_service_unknown" msgid="323435289607131929">"不支援的服務。"</string> <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"無法切換通話。"</string> - <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"無法區分通話。"</string> + <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"無法分割通話。"</string> <string name="incall_error_supp_service_transfer" msgid="7235952238189391438">"無法轉接。"</string> - <string name="incall_error_supp_service_conference" msgid="7010354362202271726">"無法加入會議。"</string> + <string name="incall_error_supp_service_conference" msgid="7010354362202271726">"無法進行電話會議。"</string> <string name="incall_error_supp_service_reject" msgid="8998568661508655638">"無法拒接來電。"</string> <string name="incall_error_supp_service_hangup" msgid="7434513517153834426">"無法掛斷電話。"</string> <string name="incall_call_type_label_sip" msgid="4931428719494190371">"SIP 通話"</string> <string name="emergency_enable_radio_dialog_title" msgid="4627849966634578257">"緊急電話"</string> <string name="emergency_enable_radio_dialog_message" msgid="207613549344420291">"開啟無線通訊中…"</string> - <string name="emergency_enable_radio_dialog_retry" msgid="5960061579996526883">"沒有服務,正在重試…"</string> + <string name="emergency_enable_radio_dialog_retry" msgid="5960061579996526883">"找不到服務訊號,正在重試…"</string> <string name="dial_emergency_error" msgid="1509085166367420355">"無法通話。<xliff:g id="NON_EMERGENCY_NUMBER">%s</xliff:g> 不是緊急號碼。"</string> <string name="dial_emergency_empty_error" msgid="9130194953830414638">"無法通話。只能撥打緊急號碼。"</string> <string name="dialerKeyboardHintText" msgid="9192914825413747792">"使用鍵盤撥號"</string> diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java index 84e63048d..e579d643a 100644 --- a/InCallUI/src/com/android/incallui/AnswerPresenter.java +++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java @@ -16,8 +16,6 @@ package com.android.incallui; -import android.telecom.PhoneCapabilities; -import android.app.KeyguardManager; import android.content.Context; import android.telecom.TelecomManager; @@ -180,7 +178,9 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi> final Context context = getUi().getContext(); mHasTextMessages = textMsgs != null; - boolean withSms = call.can(PhoneCapabilities.RESPOND_VIA_TEXT) && mHasTextMessages; + boolean withSms = + call.can(android.telecom.Call.Details.CAPABILITY_RESPOND_VIA_TEXT) + && mHasTextMessages; if (call.isVideoCall(context)) { if (withSms) { getUi().showTargets(AnswerFragment.TARGET_SET_FOR_VIDEO_WITH_SMS); diff --git a/InCallUI/src/com/android/incallui/AudioModeProvider.java b/InCallUI/src/com/android/incallui/AudioModeProvider.java index de22ccb0e..c823fda3c 100644 --- a/InCallUI/src/com/android/incallui/AudioModeProvider.java +++ b/InCallUI/src/com/android/incallui/AudioModeProvider.java @@ -40,8 +40,8 @@ import java.util.List; private Phone.Listener mPhoneListener = new Phone.Listener() { @Override public void onAudioStateChanged(Phone phone, AudioState audioState) { - onAudioModeChange(audioState.route, audioState.isMuted); - onSupportedAudioModeChange(audioState.supportedRouteMask); + onAudioModeChange(audioState.getRoute(), audioState.isMuted()); + onSupportedAudioModeChange(audioState.getSupportedRouteMask()); } }; diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java index 36f6f4e2a..663c4120a 100644 --- a/InCallUI/src/com/android/incallui/Call.java +++ b/InCallUI/src/com/android/incallui/Call.java @@ -22,7 +22,6 @@ import android.content.Context; import android.net.Uri; import android.telecom.CallProperties; import android.telecom.DisconnectCause; -import android.telecom.PhoneCapabilities; import android.telecom.GatewayInfo; import android.telecom.InCallService.VideoCall; import android.telecom.PhoneAccountHandle; @@ -316,15 +315,16 @@ public final class Call { public boolean can(int capabilities) { int supportedCapabilities = mTelecommCall.getDetails().getCallCapabilities(); - if ((capabilities & PhoneCapabilities.MERGE_CONFERENCE) != 0) { + if ((capabilities & android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE) != 0) { // We allow you to merge if the capabilities allow it or if it is a call with // conferenceable calls. if (mTelecommCall.getConferenceableCalls().isEmpty() && - ((PhoneCapabilities.MERGE_CONFERENCE & supportedCapabilities) == 0)) { + ((android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE + & supportedCapabilities) == 0)) { // Cannot merge calls if there are no calls to merge with. return false; } - capabilities &= ~PhoneCapabilities.MERGE_CONFERENCE; + capabilities &= ~android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE; } return (capabilities == (capabilities & mTelecommCall.getDetails().getCallCapabilities())); } @@ -405,7 +405,8 @@ public final class Call { "videoState:%d]", mId, State.toString(getState()), - PhoneCapabilities.toString(mTelecommCall.getDetails().getCallCapabilities()), + android.telecom.Call.Details + .capabilitiesToString(mTelecommCall.getDetails().getCallCapabilities()), mChildCallIds, getParentId(), this.mTelecommCall.getConferenceableCalls(), diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java index 8c3829403..9897d3744 100644 --- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java +++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java @@ -20,7 +20,6 @@ import android.content.Context; import android.os.Bundle; import android.telecom.AudioState; import android.telecom.InCallService.VideoCall; -import android.telecom.PhoneCapabilities; import android.telecom.VideoProfile; import com.android.incallui.AudioModeProvider.AudioModeListener; @@ -329,7 +328,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto updateCallButtons(call, ui.getContext()); - ui.enableMute(call.can(PhoneCapabilities.MUTE)); + ui.enableMute(call.can(android.telecom.Call.Details.CAPABILITY_MUTE)); } /** @@ -365,8 +364,8 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto ui.showSwitchCameraButton(true); ui.showPauseVideoButton(true); - final boolean supportHold = call.can(PhoneCapabilities.SUPPORT_HOLD); - final boolean enableHoldOption = call.can(PhoneCapabilities.HOLD); + final boolean supportHold = call.can(android.telecom.Call.Details.CAPABILITY_SUPPORT_HOLD); + final boolean enableHoldOption = call.can(android.telecom.Call.Details.CAPABILITY_HOLD); ui.showHoldButton(supportHold); ui.enableHold(enableHoldOption); ui.setHold(call.getState() == Call.State.ONHOLD); @@ -385,30 +384,34 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto ui.showAudioButton(true); ui.showDialpadButton(true); - Log.v(this, "Show hold ", call.can(PhoneCapabilities.SUPPORT_HOLD)); - Log.v(this, "Enable hold", call.can(PhoneCapabilities.HOLD)); - Log.v(this, "Show merge ", call.can(PhoneCapabilities.MERGE_CONFERENCE)); - Log.v(this, "Show swap ", call.can(PhoneCapabilities.SWAP_CONFERENCE)); + Log.v(this, "Show hold ", call.can(android.telecom.Call.Details.CAPABILITY_SUPPORT_HOLD)); + Log.v(this, "Enable hold", call.can(android.telecom.Call.Details.CAPABILITY_HOLD)); + Log.v(this, "Show merge ", call.can( + android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE)); + Log.v(this, "Show swap ", call.can( + android.telecom.Call.Details.CAPABILITY_SWAP_CONFERENCE)); Log.v(this, "Show add call ", TelecomAdapter.getInstance().canAddCall()); - Log.v(this, "Show mute ", call.can(PhoneCapabilities.MUTE)); + Log.v(this, "Show mute ", call.can(android.telecom.Call.Details.CAPABILITY_MUTE)); final boolean canAdd = TelecomAdapter.getInstance().canAddCall(); - final boolean enableHoldOption = call.can(PhoneCapabilities.HOLD); - final boolean supportHold = call.can(PhoneCapabilities.SUPPORT_HOLD); + final boolean enableHoldOption = call.can(android.telecom.Call.Details.CAPABILITY_HOLD); + final boolean supportHold = call.can(android.telecom.Call.Details.CAPABILITY_SUPPORT_HOLD); final boolean isCallOnHold = call.getState() == Call.State.ONHOLD; - boolean canVideoCall = call.can(PhoneCapabilities.SUPPORTS_VT_LOCAL) - && call.can(PhoneCapabilities.SUPPORTS_VT_REMOTE); + boolean canVideoCall = call.can(android.telecom.Call.Details.CAPABILITY_SUPPORTS_VT_LOCAL) + && call.can(android.telecom.Call.Details.CAPABILITY_SUPPORTS_VT_REMOTE); ui.showChangeToVideoButton(canVideoCall); ui.enableChangeToVideoButton(!isCallOnHold); - final boolean showMergeOption = call.can(PhoneCapabilities.MERGE_CONFERENCE); + final boolean showMergeOption = call.can( + android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE); final boolean showAddCallOption = canAdd; // Show either HOLD or SWAP, but not both. If neither HOLD or SWAP is available: // (1) If the device normally can hold, show HOLD in a disabled state. // (2) If the device doesn't have the concept of hold/swap, remove the button. - final boolean showSwapOption = call.can(PhoneCapabilities.SWAP_CONFERENCE); + final boolean showSwapOption = call.can( + android.telecom.Call.Details.CAPABILITY_SWAP_CONFERENCE); final boolean showHoldOption = !showSwapOption && (enableHoldOption || supportHold); ui.setHold(isCallOnHold); diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java index f3c597056..aead4c866 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -25,7 +25,6 @@ import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.telecom.DisconnectCause; -import android.telecom.PhoneCapabilities; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.StatusHints; @@ -267,8 +266,10 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> public void onDetailsChanged(Call call, android.telecom.Call.Details details) { updatePrimaryCallState(); - if (call.can(PhoneCapabilities.MANAGE_CONFERENCE) != PhoneCapabilities.can( - details.getCallCapabilities(), PhoneCapabilities.MANAGE_CONFERENCE)) { + if (call.can(android.telecom.Call.Details.CAPABILITY_MANAGE_CONFERENCE) != + android.telecom.Call.Details.can( + details.getCallCapabilities(), + android.telecom.Call.Details.CAPABILITY_MANAGE_CONFERENCE)) { maybeShowManageConferenceCallButton(); } } @@ -320,7 +321,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> return false; } - return mPrimary.can(PhoneCapabilities.MANAGE_CONFERENCE); + return mPrimary.can(android.telecom.Call.Details.CAPABILITY_MANAGE_CONFERENCE); } private void setCallbackNumber() { @@ -693,7 +694,8 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> } private String getConferenceString(Call call) { - boolean isGenericConference = call.can(PhoneCapabilities.GENERIC_CONFERENCE); + boolean isGenericConference = call.can( + android.telecom.Call.Details.CAPABILITY_GENERIC_CONFERENCE); Log.v(this, "getConferenceString: " + isGenericConference); final int resId = isGenericConference @@ -702,7 +704,8 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> } private Drawable getConferencePhoto(Call call) { - boolean isGenericConference = call.can(PhoneCapabilities.GENERIC_CONFERENCE); + boolean isGenericConference = call.can( + android.telecom.Call.Details.CAPABILITY_GENERIC_CONFERENCE); Log.v(this, "getConferencePhoto: " + isGenericConference); final int resId = isGenericConference diff --git a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java index 40c2dcdaf..5640ad7b5 100644 --- a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java +++ b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java @@ -17,11 +17,7 @@ package com.android.incallui; import android.content.Context; -import android.net.Uri; -import android.telecom.PhoneCapabilities; -import android.text.TextUtils; -import com.android.incallui.ContactInfoCache.ContactCacheEntry; import com.android.incallui.InCallPresenter.InCallDetailsListener; import com.android.incallui.InCallPresenter.InCallState; import com.android.incallui.InCallPresenter.InCallStateListener; @@ -76,18 +72,20 @@ public class ConferenceManagerPresenter @Override public void onDetailsChanged(Call call, android.telecom.Call.Details details) { - boolean canDisconnect = PhoneCapabilities.can( - details.getCallCapabilities(), PhoneCapabilities.DISCONNECT_FROM_CONFERENCE); - boolean canSeparate = PhoneCapabilities.can( - details.getCallCapabilities(), PhoneCapabilities.SEPARATE_FROM_CONFERENCE); - - if (call.can(PhoneCapabilities.DISCONNECT_FROM_CONFERENCE) != canDisconnect - || call.can(PhoneCapabilities.SEPARATE_FROM_CONFERENCE) != canSeparate) { + boolean canDisconnect = details.can( + android.telecom.Call.Details.CAPABILITY_DISCONNECT_FROM_CONFERENCE); + boolean canSeparate = details.can( + android.telecom.Call.Details.CAPABILITY_SEPARATE_FROM_CONFERENCE); + + if (call.can(android.telecom.Call.Details.CAPABILITY_DISCONNECT_FROM_CONFERENCE) + != canDisconnect + || call.can(android.telecom.Call.Details.CAPABILITY_SEPARATE_FROM_CONFERENCE) + != canSeparate) { getUi().refreshCall(call); } - if (!PhoneCapabilities.can( - details.getCallCapabilities(), PhoneCapabilities.MANAGE_CONFERENCE)) { + if (!details.can( + android.telecom.Call.Details.CAPABILITY_MANAGE_CONFERENCE)) { getUi().setVisible(false); } } diff --git a/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java b/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java index 641261e0f..0d5977210 100644 --- a/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java +++ b/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java @@ -18,7 +18,6 @@ package com.android.incallui; import android.content.Context; import android.net.Uri; -import android.telecom.PhoneCapabilities; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -42,7 +41,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.Set; /** * Adapter for a ListView containing conference call participant information. @@ -336,11 +334,10 @@ public class ConferenceParticipantListAdapter extends BaseAdapter { new ContactLookupCallback(this)); } - int callCapabilities = call.getTelecommCall().getDetails().getCallCapabilities(); - boolean thisRowCanSeparate = mParentCanSeparate && PhoneCapabilities.can( - callCapabilities, PhoneCapabilities.SEPARATE_FROM_CONFERENCE); - boolean thisRowCanDisconnect = PhoneCapabilities.can( - callCapabilities, PhoneCapabilities.DISCONNECT_FROM_CONFERENCE); + boolean thisRowCanSeparate = mParentCanSeparate && call.getTelecommCall().getDetails().can( + android.telecom.Call.Details.CAPABILITY_SEPARATE_FROM_CONFERENCE); + boolean thisRowCanDisconnect = call.getTelecommCall().getDetails().can( + android.telecom.Call.Details.CAPABILITY_DISCONNECT_FROM_CONFERENCE); setCallerInfoForRow(result, contactCache.name, contactCache.number, contactCache.label, contactCache.lookupKey, contactCache.displayPhotoUri, thisRowCanSeparate, diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java index 9461e64f0..858f2136f 100644 --- a/InCallUI/src/com/android/incallui/InCallPresenter.java +++ b/InCallUI/src/com/android/incallui/InCallPresenter.java @@ -22,7 +22,6 @@ import android.content.pm.ActivityInfo; import android.os.Bundle; import android.telecom.DisconnectCause; import android.telecom.PhoneAccount; -import android.telecom.PhoneCapabilities; import android.telecom.Phone; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; @@ -750,8 +749,10 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener { if (activeCall != null) { // TODO: This logic is repeated from CallButtonPresenter.java. We should // consolidate this logic. - final boolean canMerge = activeCall.can(PhoneCapabilities.MERGE_CONFERENCE); - final boolean canSwap = activeCall.can(PhoneCapabilities.SWAP_CONFERENCE); + final boolean canMerge = activeCall.can( + android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE); + final boolean canSwap = activeCall.can( + android.telecom.Call.Details.CAPABILITY_SWAP_CONFERENCE); Log.v(this, "activeCall: " + activeCall + ", canMerge: " + canMerge + ", canSwap: " + canSwap); @@ -773,7 +774,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener { if (heldCall != null) { // We have a hold call so presumeable it will always support HOLD...but // there is no harm in double checking. - final boolean canHold = heldCall.can(PhoneCapabilities.HOLD); + final boolean canHold = heldCall.can(android.telecom.Call.Details.CAPABILITY_HOLD); Log.v(this, "heldCall: " + heldCall + ", canHold: " + canHold); @@ -1168,7 +1169,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener { Call call = CallList.getInstance().getFirstCall(); TelecomManager tm = getTelecomManager(); - int highlightColor = PhoneAccount.NO_COLOR; + int highlightColor = PhoneAccount.NO_HIGHLIGHT_COLOR; if (call != null && tm != null && tm.hasMultipleCallCapableAccounts()) { PhoneAccount account = tm.getPhoneAccount(call.getAccountHandle()); diff --git a/InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java b/InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java index ca4f9b7ec..1f61070ed 100644 --- a/InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java +++ b/InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java @@ -28,7 +28,7 @@ public class InCallUIMaterialColorMapUtils extends MaterialColorMapUtils { */ @Override public MaterialPalette calculatePrimaryAndSecondaryColor(int color) { - if (color == PhoneAccount.NO_COLOR) { + if (color == PhoneAccount.NO_HIGHLIGHT_COLOR) { return getDefaultPrimaryAndSecondaryColors(mResources); } diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java index 0c48c1939..a0eddcc57 100644 --- a/InCallUI/src/com/android/incallui/StatusBarNotifier.java +++ b/InCallUI/src/com/android/incallui/StatusBarNotifier.java @@ -260,15 +260,12 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { } final int state = call.getState(); - final boolean isConference = call.isConferenceCall(); - final boolean isVideoUpgradeRequest = call.getSessionModificationState() - == Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST; // Check if data has changed; if nothing is different, don't issue another notification. final int iconResId = getIconToDisplay(call); - final Bitmap largeIcon = getLargeIconToDisplay(contactInfo, isConference); + final Bitmap largeIcon = getLargeIconToDisplay(contactInfo, call); final int contentResId = getContentString(call); - final String contentTitle = getContentTitle(contactInfo, isConference); + final String contentTitle = getContentTitle(contactInfo, call); if (!checkForChangeAndSaveData(iconResId, contentResId, largeIcon, contentTitle, state)) { return; @@ -296,6 +293,8 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { builder.setLargeIcon(largeIcon); builder.setColor(mContext.getResources().getColor(R.color.dialer_theme_color)); + final boolean isVideoUpgradeRequest = call.getSessionModificationState() + == Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST; if (isVideoUpgradeRequest) { builder.setUsesChronometer(false); addDismissUpgradeRequestAction(builder); @@ -382,8 +381,9 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { /** * Returns the main string to use in the notification. */ - private String getContentTitle(ContactCacheEntry contactInfo, boolean isConference) { - if (isConference) { + private String getContentTitle(ContactCacheEntry contactInfo, Call call) { + if (call.isConferenceCall() + && !call.can(android.telecom.Call.Details.CAPABILITY_GENERIC_CONFERENCE)) { return mContext.getResources().getString(R.string.card_title_conf_call); } if (TextUtils.isEmpty(contactInfo.name)) { @@ -406,9 +406,10 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { /** * Gets a large icon from the contact info object to display in the notification. */ - private Bitmap getLargeIconToDisplay(ContactCacheEntry contactInfo, boolean isConference) { + private Bitmap getLargeIconToDisplay(ContactCacheEntry contactInfo, Call call) { Bitmap largeIcon = null; - if (isConference) { + if (call.isConferenceCall() + && !call.can(android.telecom.Call.Details.CAPABILITY_GENERIC_CONFERENCE)) { largeIcon = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.img_conference); } diff --git a/InCallUI/src/com/android/incallui/TelecomAdapter.java b/InCallUI/src/com/android/incallui/TelecomAdapter.java index 291466ded..373bd7874 100644 --- a/InCallUI/src/com/android/incallui/TelecomAdapter.java +++ b/InCallUI/src/com/android/incallui/TelecomAdapter.java @@ -24,8 +24,6 @@ import android.telecom.InCallAdapter; import android.telecom.Phone; import android.telecom.PhoneAccountHandle; -import android.telecom.PhoneCapabilities; - import com.google.common.base.Preconditions; import java.util.List; @@ -165,8 +163,8 @@ final class TelecomAdapter implements InCallPhoneListener { if (!conferenceable.isEmpty()) { call.conference(conferenceable.get(0)); } else { - int capabilities = call.getDetails().getCallCapabilities(); - if (0 != (capabilities & PhoneCapabilities.MERGE_CONFERENCE)) { + if (call.getDetails().can( + android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE)) { call.mergeConference(); } } @@ -178,8 +176,8 @@ final class TelecomAdapter implements InCallPhoneListener { void swap(String callId) { if (mPhone != null) { android.telecom.Call call = getTelecommCallById(callId); - int capabilities = call.getDetails().getCallCapabilities(); - if (0 != (capabilities & PhoneCapabilities.SWAP_CONFERENCE)) { + if (call.getDetails().can( + android.telecom.Call.Details.CAPABILITY_SWAP_CONFERENCE)) { call.swapConference(); } } else { |