InCallUI: customize video call UI
Include following customization for video call UI:
1. Prevent make video call for some carrier:
To meet some regional carriers requirement, check if phone number
less than 7 or contains #, * or non-digit characters before making
a video call.
2. UI enhancement for IncallUI of video call:
Add UIs for answer_rx, answer_tx, answer_video, decline_video to make
the UI more friendly to end user.
Change-Id: I310bcbf021f1217a6e2a648d33b266297d7d9212
CRs-Fixed: 1039326
diff --git a/InCallUI/res/layout/call_button_fragment.xml b/InCallUI/res/layout/call_button_fragment.xml
index 2e9e40b..9e3ec0a 100644
--- a/InCallUI/res/layout/call_button_fragment.xml
+++ b/InCallUI/res/layout/call_button_fragment.xml
@@ -197,6 +197,24 @@
android:contentDescription="@string/onscreenManageConferenceText"
android:visibility="gone" />
+ <ImageButton android:id="@+id/rxtxVideoCallButton"
+ style="@style/InCallButton"
+ android:background="@drawable/btn_change_to_video"
+ android:contentDescription="@string/overflowBothCallMenuItemText"
+ android:visibility="gone" />
+
+ <ImageButton android:id="@+id/rxVedioCallButton"
+ style="@style/InCallButton"
+ android:background="@drawable/btn_change_to_hm_video"
+ android:contentDescription="@string/overflowRXCallMenuItemText"
+ android:visibility="gone" />
+
+ <ImageButton android:id="@+id/volteCallButton"
+ style="@style/InCallButton"
+ android:background="@drawable/btn_compound_audio"
+ android:contentDescription="@string/overflowVOCallMenuItemText"
+ android:visibility="gone" />
+
</LinearLayout>
</LinearLayout>
diff --git a/InCallUI/res/layout/video_call_views.xml b/InCallUI/res/layout/video_call_views.xml
index d514f6d..1926fcc 100644
--- a/InCallUI/res/layout/video_call_views.xml
+++ b/InCallUI/res/layout/video_call_views.xml
@@ -20,11 +20,15 @@
android:layout_width="match_parent"
android:layout_height="match_parent" >
- <TextureView
- android:id="@+id/incomingVideo"
- android:layout_gravity="center"
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent">
+ <TextureView
+ android:id="@+id/incomingVideo"
+ android:layout_gravity="center"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+ </FrameLayout>
<!-- The width and height are replaced at runtime based on the selected camera. -->
<FrameLayout
android:id="@+id/previewVideoContainer"
diff --git a/InCallUI/res/values/array.xml b/InCallUI/res/values/array.xml
index 7877ec8..afd9f55 100644
--- a/InCallUI/res/values/array.xml
+++ b/InCallUI/res/values/array.xml
@@ -132,4 +132,38 @@
<item>@string/description_direction_left</item>
<item>@null</item>
</array>
+
+ <array name="enhance_incoming_call_widget_video_without_sms_targets">
+ <item>@drawable/ic_lockscreen_answer</item>
+ <item>@drawable/ic_enhance_answer_rx_video</item>
+ <item>@drawable/ic_lockscreen_decline</item>
+ <item>@drawable/ic_enhance_answer_video</item>
+ </array>
+ <array name="enhance_incoming_call_widget_video_with_sms_targets">
+ <item>@drawable/ic_enhance_answer_video</item>
+ <item>@drawable/ic_lockscreen_text</item>
+ <item>@drawable/ic_lockscreen_decline</item>
+ <item>@drawable/ic_lockscreen_answer</item>
+ <item>@drawable/ic_enhance_answer_rx_video</item>
+ <item>@null</item>
+ </array>
+ <array name="enhance_incoming_call_widget_video_upgrade_request_targets">
+ <item>@drawable/ic_enhance_answer_video</item>
+ <item>@null</item>
+ <item>@drawable/ic_enhance_decline_video</item>
+ <item>@drawable/ic_enhance_answer_rx_video</item>
+ </array>
+ <array name="enhance_incoming_call_bidirectional_video_accept_request_targets">
+ <item>@drawable/ic_enhance_answer_video</item>
+ <item>@drawable/ic_enhance_decline_video</item>
+ </array>
+ <array name="enhance_incoming_call_video_transmit_accept_request_targets">
+ <item>@drawable/ic_enhance_answer_tx_video</item>
+ <item>@drawable/ic_enhance_decline_video</item>
+ </array>
+ <array name="enhance_incoming_call_video_receive_accept_request_targets">
+ <item>@drawable/ic_enhance_answer_rx_video</item>
+ <item>@drawable/ic_enhance_decline_video</item>
+ </array>
+
</resources>
diff --git a/InCallUI/res/values/config.xml b/InCallUI/res/values/config.xml
index 1512f6c..763b0e2 100644
--- a/InCallUI/res/values/config.xml
+++ b/InCallUI/res/values/config.xml
@@ -26,4 +26,8 @@
<integer name="video_call_auto_fullscreen_timeout">5000</integer>
<!-- When international prefix is enabled in CDMA mode, whether with international prefix -->
<bool name="phone_number_with_intl_prefix">false</bool>
+
+ <bool name="config_regional_number_patterns_video_call">false</bool>
+ <!-- When set to true, this config enables enhance videocall ui -->
+ <bool name="config_enable_enhance_video_call_ui">false</bool>
</resources>
diff --git a/InCallUI/res/values/qtistrings.xml b/InCallUI/res/values/qtistrings.xml
index 203286d..ea8a952 100644
--- a/InCallUI/res/values/qtistrings.xml
+++ b/InCallUI/res/values/qtistrings.xml
@@ -177,4 +177,7 @@
<string-array name="international_idp_values" translatable="false">
<item>"0033"</item>
</string-array>
+ <string name="video_call_downgrade_without_lte_toast">Move out of LTE coverage area downgrade the call.</string>
+ <string name="video_call">Video Calling</string>
+ <string name="video_call_cannot_upgrade">cannot accept video calls at this time</string>
</resources>
diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java
index d7289a2..db597b2 100644
--- a/InCallUI/src/com/android/incallui/CallButtonFragment.java
+++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java
@@ -33,6 +33,9 @@
import static com.android.incallui.CallButtonFragment.Buttons.BUTTON_TRANSFER_CONSULTATIVE;
import static com.android.incallui.CallButtonFragment.Buttons.BUTTON_UPGRADE_TO_VIDEO;
import static com.android.incallui.CallButtonFragment.Buttons.BUTTON_RECORD;
+import static com.android.incallui.CallButtonFragment.Buttons.BUTTON_RXTX_VIDEO_CALL;
+import static com.android.incallui.CallButtonFragment.Buttons.BUTTON_RX_VIDEO_CALL;
+import static com.android.incallui.CallButtonFragment.Buttons.BUTTON_VO_VIDEO_CALL;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -44,6 +47,8 @@
import android.graphics.drawable.StateListDrawable;
import android.os.Bundle;
import android.telecom.CallAudioState;
+import android.telecom.VideoProfile;
+import android.telephony.PhoneNumberUtils;
import android.util.SparseIntArray;
import android.view.ContextThemeWrapper;
import android.view.HapticFeedbackConstants;
@@ -57,7 +62,9 @@
import android.widget.PopupMenu;
import android.widget.PopupMenu.OnDismissListener;
import android.widget.PopupMenu.OnMenuItemClickListener;
+import android.widget.Toast;
+import com.android.contacts.common.CallUtil;
import com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette;
import com.android.dialer.R;
@@ -98,7 +105,10 @@
public static final int BUTTON_TRANSFER_ASSURED = 13;
public static final int BUTTON_TRANSFER_CONSULTATIVE = 14;
public static final int BUTTON_RECORD = 15;
- public static final int BUTTON_COUNT = 16;
+ public static final int BUTTON_RXTX_VIDEO_CALL = 16;
+ public static final int BUTTON_RX_VIDEO_CALL = 17;
+ public static final int BUTTON_VO_VIDEO_CALL = 18;
+ public static final int BUTTON_COUNT = 19;
}
private SparseIntArray mButtonVisibilityMap = new SparseIntArray(BUTTON_COUNT);
@@ -121,6 +131,9 @@
private ImageButton mConsultativeTransferButton;
private ImageButton mAddParticipantButton;
private ImageButton mRecordButton;
+ private ImageButton mRxTxVideoCallButton;
+ private ImageButton mRxVideoCallButton;
+ private ImageButton mVoVideoCallButton;
private PopupMenu mAudioModePopup;
private boolean mAudioModePopupVisible;
@@ -199,6 +212,12 @@
mManageVideoCallConferenceButton.setOnClickListener(this);
mRecordButton = (ImageButton) parent.findViewById(R.id.recordButton);
mRecordButton.setOnClickListener(this);
+ mRxTxVideoCallButton = (ImageButton) parent.findViewById(R.id.rxtxVideoCallButton);
+ mRxTxVideoCallButton.setOnClickListener(this);
+ mRxVideoCallButton = (ImageButton) parent.findViewById(R.id.rxVedioCallButton);
+ mRxVideoCallButton.setOnClickListener(this);
+ mVoVideoCallButton = (ImageButton) parent.findViewById(R.id.volteCallButton);
+ mVoVideoCallButton.setOnClickListener(this);
return parent;
}
@@ -273,6 +292,12 @@
((InCallActivity) getActivity()).stopInCallRecorder();
mRecordButton.setBackgroundResource(R.drawable.btn_start_record);
}
+ } else if(id == R.id.rxtxVideoCallButton){
+ getPresenter().changeToVideo(VideoProfile.STATE_BIDIRECTIONAL);
+ } else if(id == R.id.rxVedioCallButton){
+ getPresenter().changeToVideo(VideoProfile.STATE_RX_ENABLED);
+ } else if(id == R.id.volteCallButton){
+ getPresenter().changeToVideo(VideoProfile.STATE_AUDIO_ONLY);
} else {
Log.wtf(this, "onClick: unexpected");
return;
@@ -430,6 +455,9 @@
mManageVideoCallConferenceButton.setEnabled(isEnabled);
mAddParticipantButton.setEnabled(isEnabled);
mRecordButton.setEnabled(isEnabled);
+ mRxTxVideoCallButton.setEnabled(isEnabled);
+ mRxVideoCallButton.setEnabled(isEnabled);
+ mVoVideoCallButton.setEnabled(isEnabled);
}
@Override
@@ -478,6 +506,12 @@
return mConsultativeTransferButton;
} else if (id == BUTTON_RECORD) {
return mRecordButton;
+ } else if (id == BUTTON_RXTX_VIDEO_CALL) {
+ return mRxTxVideoCallButton;
+ } else if (id == BUTTON_RX_VIDEO_CALL) {
+ return mRxVideoCallButton;
+ } else if (id == BUTTON_VO_VIDEO_CALL) {
+ return mVoVideoCallButton;
} else {
Log.w(this, "Invalid button id");
return null;
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
index 7f8e171..d21cab5 100644
--- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
@@ -31,6 +31,9 @@
import static com.android.incallui.CallButtonFragment.Buttons.BUTTON_TRANSFER_CONSULTATIVE;
import static com.android.incallui.CallButtonFragment.Buttons.BUTTON_UPGRADE_TO_VIDEO;
import static com.android.incallui.CallButtonFragment.Buttons.BUTTON_RECORD;
+import static com.android.incallui.CallButtonFragment.Buttons.BUTTON_RXTX_VIDEO_CALL;
+import static com.android.incallui.CallButtonFragment.Buttons.BUTTON_RX_VIDEO_CALL;
+import static com.android.incallui.CallButtonFragment.Buttons.BUTTON_VO_VIDEO_CALL;
import android.content.Context;
import android.os.Build;
@@ -44,6 +47,7 @@
import com.android.contacts.common.compat.CallSdkCompat;
import com.android.contacts.common.compat.SdkVersionOverride;
+import com.android.dialer.util.PresenceHelper;
import com.android.dialer.compat.UserManagerCompat;
import com.android.incallui.AudioModeProvider.AudioModeListener;
import com.android.incallui.InCallCameraManager.Listener;
@@ -69,6 +73,7 @@
private boolean mAutomaticallyMuted = false;
private boolean mPreviousMuteState = false;
private static final int MAX_PARTICIPANTS_LIMIT = 6;
+ private boolean mEnhanceEnable = false;
// NOTE: Capability constant definition has been duplicated to avoid bundling
// the Dialer with Frameworks.
@@ -81,6 +86,8 @@
public void onUiReady(CallButtonUi ui) {
super.onUiReady(ui);
+ mEnhanceEnable = ui.getContext().getResources().getBoolean(
+ R.bool.config_enable_enhance_video_call_ui);
AudioModeProvider.getInstance().addListener(this);
// register for call state changes last
@@ -335,6 +342,21 @@
mCall.setSessionModificationState(Call.SessionModificationState.WAITING_FOR_RESPONSE);
}
+ public void changeToVideo(int videoState) {
+ if(mCall == null) {
+ return;
+ }
+
+ if(VideoProfile.isVideo(videoState) &&
+ !PresenceHelper.getVTCapability(mCall.getNumber())) {
+ Context context = getUi().getContext();
+ Toast.makeText(context,context.getString(R.string.video_call_cannot_upgrade),
+ Toast.LENGTH_SHORT).show();
+ return;
+ }
+ final VideoProfile videoProfile = new VideoProfile(videoState);
+ QtiCallUtils.changeToVideoCall(mCall, videoProfile);
+ }
/**
* Switches the camera between the front-facing and back-facing camera.
* @param useFrontFacingCamera True if we should switch to using the front-facing camera, or
@@ -478,19 +500,33 @@
showAddParticipant = showAddParticipant&&(call.isConferenceCall());
}
+ boolean showRxTx = false;
+ boolean showRx = false;
+ boolean showVolte = false;
+
+ if (mEnhanceEnable && showUpgradeToVideo) {
+ boolean isAudioAndVtCap = (VideoProfile.isAudioOnly(mCall.getVideoState()) &&
+ PresenceHelper.getVTCapability(call.getNumber()));
+ showRxTx = (VideoProfile.isReceptionEnabled(mCall.getVideoState()) || isAudioAndVtCap);
+ showRx = (VideoProfile.isBidirectional(mCall.getVideoState()) || isAudioAndVtCap);
+ showVolte = VideoProfile.isVideo(mCall.getVideoState());
+ Log.v(this, "updateButtonsState showRxTx = " + showRxTx +
+ " showRx" + showRx + " showVolte = " + showVolte);
+ }
+
ui.showButton(BUTTON_AUDIO, true);
ui.showButton(BUTTON_SWAP, showSwap);
ui.showButton(BUTTON_HOLD, showHold);
ui.setHold(isCallOnHold);
ui.showButton(BUTTON_MUTE, showMute);
ui.showButton(BUTTON_ADD_CALL, showAddCall);
- ui.showButton(BUTTON_UPGRADE_TO_VIDEO, showUpgradeToVideo);
+ ui.showButton(BUTTON_UPGRADE_TO_VIDEO, showUpgradeToVideo && !mEnhanceEnable);
ui.showButton(BUTTON_DOWNGRADE_TO_AUDIO, showDowngradeToAudio && !useExt);
ui.showButton(BUTTON_SWITCH_CAMERA, isVideo);
ui.showButton(BUTTON_PAUSE_VIDEO, isVideo && !useExt);
ui.showButton(BUTTON_DIALPAD, true);
ui.showButton(BUTTON_MERGE, showMerge);
- ui.enableAddParticipant(showAddParticipant);
+ ui.enableAddParticipant(showAddParticipant && !mEnhanceEnable);
ui.showButton(BUTTON_RECORD, showRecord);
/* Depending on the transfer capabilities, display the corresponding buttons */
@@ -507,6 +543,12 @@
ui.showButton(BUTTON_TRANSFER_ASSURED, false);
ui.showButton(BUTTON_TRANSFER_CONSULTATIVE, false);
}
+ if (mEnhanceEnable) {
+ Log.v(this, "Add three new buttons");
+ ui.showButton(BUTTON_RXTX_VIDEO_CALL, showRxTx);
+ ui.showButton(BUTTON_RX_VIDEO_CALL, showRx);
+ ui.showButton(BUTTON_VO_VIDEO_CALL, showVolte);
+ }
ui.updateButtonStates();
}
diff --git a/InCallUI/src/com/android/incallui/GlowPadAnswerFragment.java b/InCallUI/src/com/android/incallui/GlowPadAnswerFragment.java
index 48e4730..d9b4dda 100644
--- a/InCallUI/src/com/android/incallui/GlowPadAnswerFragment.java
+++ b/InCallUI/src/com/android/incallui/GlowPadAnswerFragment.java
@@ -91,6 +91,8 @@
final int directionDescriptionsResourceId;
final int handleDrawableResourceId;
mGlowpad.setVideoState(videoState);
+ final boolean isEnhanceUIEnabled = getContext().getResources().getBoolean(
+ R.bool.config_enable_enhance_video_call_ui);
switch (targetSet) {
case TARGET_SET_FOR_AUDIO_WITH_SMS:
@@ -127,7 +129,12 @@
handleDrawableResourceId = R.drawable.ic_incall_video_handle;
break;
case TARGET_SET_FOR_QTI_VIDEO_WITHOUT_SMS:
- targetResourceId = R.array.qti_incoming_call_widget_video_without_sms_targets;
+ if (isEnhanceUIEnabled) {
+ targetResourceId =
+ R.array.enhance_incoming_call_widget_video_without_sms_targets;
+ } else {
+ targetResourceId = R.array.qti_incoming_call_widget_video_without_sms_targets;
+ }
targetDescriptionsResourceId =
R.array.qti_incoming_call_widget_video_without_sms_target_descriptions;
directionDescriptionsResourceId =
@@ -135,7 +142,11 @@
handleDrawableResourceId = R.drawable.ic_incall_video_handle;
break;
case TARGET_SET_FOR_QTI_VIDEO_WITH_SMS:
- targetResourceId = R.array.qti_incoming_call_widget_video_with_sms_targets;
+ if (isEnhanceUIEnabled) {
+ targetResourceId = R.array.enhance_incoming_call_widget_video_with_sms_targets;
+ } else {
+ targetResourceId = R.array.qti_incoming_call_widget_video_with_sms_targets;
+ }
targetDescriptionsResourceId =
R.array.qti_incoming_call_widget_video_with_sms_target_descriptions;
directionDescriptionsResourceId =
@@ -179,7 +190,12 @@
handleDrawableResourceId = R.drawable.ic_incall_video_handle;
break;
case TARGET_SET_FOR_QTI_VIDEO_ACCEPT_REJECT_REQUEST:
- targetResourceId = R.array.qti_incoming_call_widget_video_request_targets;
+ if (isEnhanceUIEnabled) {
+ targetResourceId =
+ R.array.enhance_incoming_call_widget_video_upgrade_request_targets;
+ } else {
+ targetResourceId = R.array.qti_incoming_call_widget_video_request_targets;
+ }
targetDescriptionsResourceId =
R.array.qti_incoming_call_widget_video_request_target_descriptions;
directionDescriptionsResourceId = R.array.
@@ -187,8 +203,13 @@
handleDrawableResourceId = R.drawable.ic_incall_video_handle;
break;
case TARGET_SET_FOR_QTI_BIDIRECTIONAL_VIDEO_ACCEPT_REJECT_REQUEST:
- targetResourceId = R.array.
+ if (isEnhanceUIEnabled) {
+ targetResourceId = R.array.
+ enhance_incoming_call_bidirectional_video_accept_request_targets;
+ } else {
+ targetResourceId = R.array.
qti_incoming_call_widget_bidirectional_video_accept_reject_request_targets;
+ }
targetDescriptionsResourceId =
R.array.qti_incoming_call_widget_video_request_target_descriptions;
directionDescriptionsResourceId = R.array.
@@ -196,8 +217,13 @@
handleDrawableResourceId = R.drawable.ic_incall_video_handle;
break;
case TARGET_SET_FOR_QTI_VIDEO_TRANSMIT_ACCEPT_REJECT_REQUEST:
- targetResourceId = R.array.
- qti_incoming_call_widget_video_transmit_accept_reject_request_targets;
+ if (isEnhanceUIEnabled) {
+ targetResourceId =
+ R.array.enhance_incoming_call_video_transmit_accept_request_targets;
+ } else {
+ targetResourceId = R.array.
+ qti_incoming_call_widget_video_transmit_accept_reject_request_targets;
+ }
targetDescriptionsResourceId = R.array.
qti_incoming_call_widget_video_transmit_request_target_descriptions;
directionDescriptionsResourceId = R.array
@@ -205,8 +231,13 @@
handleDrawableResourceId = R.drawable.ic_incall_video_handle;
break;
case TARGET_SET_FOR_QTI_VIDEO_RECEIVE_ACCEPT_REJECT_REQUEST:
- targetResourceId = R.array.
- qti_incoming_call_widget_video_receive_accept_reject_request_targets;
+ if (isEnhanceUIEnabled) {
+ targetResourceId = R.array.
+ enhance_incoming_call_video_receive_accept_request_targets;
+ } else {
+ targetResourceId = R.array.
+ qti_incoming_call_widget_video_receive_accept_reject_request_targets;
+ }
targetDescriptionsResourceId =
R.array.qti_incoming_call_widget_video_receive_request_target_descriptions;
directionDescriptionsResourceId = R.array
diff --git a/InCallUI/src/com/android/incallui/GlowPadWrapper.java b/InCallUI/src/com/android/incallui/GlowPadWrapper.java
index bc2d4da..c88a984 100644
--- a/InCallUI/src/com/android/incallui/GlowPadWrapper.java
+++ b/InCallUI/src/com/android/incallui/GlowPadWrapper.java
@@ -115,22 +115,27 @@
if (resId == R.drawable.ic_lockscreen_answer) {
mAnswerFragment.onAnswer(VideoProfile.STATE_AUDIO_ONLY, getContext());
mTargetTriggered = true;
- } else if (resId == R.drawable.ic_lockscreen_decline) {
+ } else if (resId == R.drawable.ic_lockscreen_decline ||
+ resId == R.drawable.ic_enhance_decline_video) {
mAnswerFragment.onDecline(getContext());
mTargetTriggered = true;
} else if (resId == R.drawable.ic_lockscreen_text) {
mAnswerFragment.onText();
mTargetTriggered = true;
- } else if (resId == R.drawable.ic_videocam || resId == R.drawable.ic_lockscreen_answer_video) {
+ } else if (resId == R.drawable.ic_videocam ||
+ resId == R.drawable.ic_lockscreen_answer_video ||
+ resId == R.drawable.ic_enhance_answer_video) {
mAnswerFragment.onAnswer(mVideoState, getContext());
mTargetTriggered = true;
} else if (resId == R.drawable.ic_lockscreen_decline_video) {
mAnswerFragment.onDeclineUpgradeRequest(getContext());
mTargetTriggered = true;
- } else if (resId == R.drawable.qti_ic_lockscreen_answer_tx_video) {
+ } else if (resId == R.drawable.qti_ic_lockscreen_answer_tx_video ||
+ resId == R.drawable.ic_enhance_answer_tx_video) {
mAnswerFragment.onAnswer(VideoProfile.STATE_TX_ENABLED, getContext());
mTargetTriggered = true;
- } else if (resId == R.drawable.qti_ic_lockscreen_answer_rx_video) {
+ } else if (resId == R.drawable.qti_ic_lockscreen_answer_rx_video ||
+ resId == R.drawable.ic_enhance_answer_rx_video) {
mAnswerFragment.onAnswer(VideoProfile.STATE_RX_ENABLED, getContext());
mTargetTriggered = true;
} else if (resId == R.drawable.qti_ic_lockscreen_deflect) {
diff --git a/InCallUI/src/com/android/incallui/QtiCallUtils.java b/InCallUI/src/com/android/incallui/QtiCallUtils.java
index d6085b5..f3a88f1 100644
--- a/InCallUI/src/com/android/incallui/QtiCallUtils.java
+++ b/InCallUI/src/com/android/incallui/QtiCallUtils.java
@@ -193,6 +193,9 @@
alert.show();
}
+ public static void changeToVideoCall(Call call, VideoProfile videoProfile) {
+ changeToVideoClicked(call, videoProfile);
+ }
/**
* Converts the call type to string
*/
diff --git a/res/drawable-hdpi/ic_hm_videocam.png b/res/drawable-hdpi/ic_hm_videocam.png
new file mode 100644
index 0000000..f80c2f3
--- /dev/null
+++ b/res/drawable-hdpi/ic_hm_videocam.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_m_videocam.png b/res/drawable-hdpi/ic_m_videocam.png
new file mode 100644
index 0000000..7724a8d
--- /dev/null
+++ b/res/drawable-hdpi/ic_m_videocam.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_videocam_off.png b/res/drawable-hdpi/ic_videocam_off.png
new file mode 100644
index 0000000..f59144c
--- /dev/null
+++ b/res/drawable-hdpi/ic_videocam_off.png
Binary files differ
diff --git a/res/drawable/btn_change_to_hm_video.xml b/res/drawable/btn_change_to_hm_video.xml
new file mode 100644
index 0000000..af23bc2
--- /dev/null
+++ b/res/drawable/btn_change_to_hm_video.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:id="@+id/backgroundItem"
+ android:drawable="@drawable/btn_background" />
+
+ <item>
+ <bitmap android:src="@drawable/ic_hm_videocam"
+ android:gravity="center"
+ android:tint="@color/selectable_icon_tint"
+ android:autoMirrored="true" />
+ </item>
+
+</layer-list>
diff --git a/res/drawable/ic_enhance_answer_rx_video.xml b/res/drawable/ic_enhance_answer_rx_video.xml
new file mode 100644
index 0000000..0dedbcb
--- /dev/null
+++ b/res/drawable/ic_enhance_answer_rx_video.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<!-- Used with incoming call wigdet. -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:state_enabled="true" android:state_active="false" android:state_focused="false"
+ android:drawable="@drawable/ic_enhance_answer_rx_video_normal_layer"/>
+ <item
+ android:state_enabled="true" android:state_active="true" android:state_focused="false"
+ android:drawable="@drawable/ic_enhance_answer_rx_video_activated_layer" />
+ <item
+ android:state_enabled="true" android:state_active="false" android:state_focused="true"
+ android:drawable="@drawable/ic_enhance_answer_rx_video_activated_layer" />
+</selector>
diff --git a/res/drawable/ic_enhance_answer_rx_video_activated_layer.xml b/res/drawable/ic_enhance_answer_rx_video_activated_layer.xml
new file mode 100644
index 0000000..e0e19d5
--- /dev/null
+++ b/res/drawable/ic_enhance_answer_rx_video_activated_layer.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/fab_blue" />
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_hm_videocam"
+ android:tint="@color/glowpad_widget_active_color"
+ android:autoMirrored="true" />
+ </item>
+</layer-list>
diff --git a/res/drawable/ic_enhance_answer_rx_video_normal_layer.xml b/res/drawable/ic_enhance_answer_rx_video_normal_layer.xml
new file mode 100644
index 0000000..2d49b1d
--- /dev/null
+++ b/res/drawable/ic_enhance_answer_rx_video_normal_layer.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- A fake circle to fix the size of this layer asset. -->
+ <item>
+ <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
+ <solid android:color="#00000000"/>
+ <size
+ android:width="@dimen/incoming_call_widget_circle_size"
+ android:height="@dimen/incoming_call_widget_circle_size" />
+ </shape>
+ </item>
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_hm_videocam"
+ android:tint="@color/glowpad_call_widget_normal_tint"
+ android:autoMirrored="true" />
+ </item>
+</layer-list>
diff --git a/res/drawable/ic_enhance_answer_tx_video.xml b/res/drawable/ic_enhance_answer_tx_video.xml
new file mode 100644
index 0000000..33ba0e1
--- /dev/null
+++ b/res/drawable/ic_enhance_answer_tx_video.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<!-- Used with incoming call wigdet. -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:state_enabled="true" android:state_active="false" android:state_focused="false"
+ android:drawable="@drawable/ic_enhance_answer_tx_video_normal_layer"/>
+ <item
+ android:state_enabled="true" android:state_active="true" android:state_focused="false"
+ android:drawable="@drawable/ic_enhance_answer_tx_video_activated_layer" />
+ <item
+ android:state_enabled="true" android:state_active="false" android:state_focused="true"
+ android:drawable="@drawable/ic_enhance_answer_tx_video_activated_layer" />
+</selector>
diff --git a/res/drawable/ic_enhance_answer_tx_video_activated_layer.xml b/res/drawable/ic_enhance_answer_tx_video_activated_layer.xml
new file mode 100644
index 0000000..76e04e9
--- /dev/null
+++ b/res/drawable/ic_enhance_answer_tx_video_activated_layer.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/fab_blue" />
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_m_videocam"
+ android:tint="@color/glowpad_widget_active_color"
+ android:autoMirrored="true" />
+ </item>
+</layer-list>
diff --git a/res/drawable/ic_enhance_answer_tx_video_normal_layer.xml b/res/drawable/ic_enhance_answer_tx_video_normal_layer.xml
new file mode 100644
index 0000000..95d6c81
--- /dev/null
+++ b/res/drawable/ic_enhance_answer_tx_video_normal_layer.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- A fake circle to fix the size of this layer asset. -->
+ <item>
+ <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
+ <solid android:color="#00000000"/>
+ <size
+ android:width="@dimen/incoming_call_widget_circle_size"
+ android:height="@dimen/incoming_call_widget_circle_size" />
+ </shape>
+ </item>
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_m_videocam"
+ android:tint="@color/glowpad_call_widget_normal_tint"
+ android:autoMirrored="true" />
+ </item>
+</layer-list>
diff --git a/res/drawable/ic_enhance_answer_video.xml b/res/drawable/ic_enhance_answer_video.xml
new file mode 100644
index 0000000..a79cd97
--- /dev/null
+++ b/res/drawable/ic_enhance_answer_video.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<!-- Used with incoming call wigdet. -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:state_enabled="true" android:state_active="false" android:state_focused="false"
+ android:drawable="@drawable/ic_enhance_answer_video_normal_layer"/>
+ <item
+ android:state_enabled="true" android:state_active="true" android:state_focused="false"
+ android:drawable="@drawable/ic_enhance_answer_video_activated_layer" />
+ <item
+ android:state_enabled="true" android:state_active="false" android:state_focused="true"
+ android:drawable="@drawable/ic_enhance_answer_video_activated_layer" />
+</selector>
diff --git a/res/drawable/ic_enhance_answer_video_activated_layer.xml b/res/drawable/ic_enhance_answer_video_activated_layer.xml
new file mode 100644
index 0000000..76e04e9
--- /dev/null
+++ b/res/drawable/ic_enhance_answer_video_activated_layer.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/fab_blue" />
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_m_videocam"
+ android:tint="@color/glowpad_widget_active_color"
+ android:autoMirrored="true" />
+ </item>
+</layer-list>
diff --git a/res/drawable/ic_enhance_answer_video_normal_layer.xml b/res/drawable/ic_enhance_answer_video_normal_layer.xml
new file mode 100644
index 0000000..95d6c81
--- /dev/null
+++ b/res/drawable/ic_enhance_answer_video_normal_layer.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- A fake circle to fix the size of this layer asset. -->
+ <item>
+ <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
+ <solid android:color="#00000000"/>
+ <size
+ android:width="@dimen/incoming_call_widget_circle_size"
+ android:height="@dimen/incoming_call_widget_circle_size" />
+ </shape>
+ </item>
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_m_videocam"
+ android:tint="@color/glowpad_call_widget_normal_tint"
+ android:autoMirrored="true" />
+ </item>
+</layer-list>
diff --git a/res/drawable/ic_enhance_decline_video.xml b/res/drawable/ic_enhance_decline_video.xml
new file mode 100644
index 0000000..854f7a2
--- /dev/null
+++ b/res/drawable/ic_enhance_decline_video.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<!-- Used with incoming call wigdet. -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:state_enabled="true" android:state_active="false" android:state_focused="false"
+ android:drawable="@drawable/ic_enhance_decline_video_normal_layer"/>
+ <item
+ android:state_enabled="true" android:state_active="true" android:state_focused="false"
+ android:drawable="@drawable/ic_enhance_decline_video_activated_layer" />
+ <item
+ android:state_enabled="true" android:state_active="false" android:state_focused="true"
+ android:drawable="@drawable/ic_enhance_decline_video_activated_layer" />
+</selector>
diff --git a/res/drawable/ic_enhance_decline_video_activated_layer.xml b/res/drawable/ic_enhance_decline_video_activated_layer.xml
new file mode 100644
index 0000000..074fe95
--- /dev/null
+++ b/res/drawable/ic_enhance_decline_video_activated_layer.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/fab_red" />
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_videocam_off"
+ android:tint="#ffffff"
+ android:autoMirrored="true" />
+ </item>
+</layer-list>
diff --git a/res/drawable/ic_enhance_decline_video_normal_layer.xml b/res/drawable/ic_enhance_decline_video_normal_layer.xml
new file mode 100644
index 0000000..30c7d9c
--- /dev/null
+++ b/res/drawable/ic_enhance_decline_video_normal_layer.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- A fake circle to fix the size of this layer asset. -->
+ <item>
+ <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
+ <solid android:color="#00000000"/>
+ <size
+ android:width="56dp"
+ android:height="56dp" />
+ </shape>
+ </item>
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_videocam_off"
+ android:tint="#0288d1"
+ android:autoMirrored="true" />
+ </item>
+</layer-list>
diff --git a/res/values-zh-rCN/qtistrings.xml b/res/values-zh-rCN/qtistrings.xml
new file mode 100644
index 0000000..25f18c0
--- /dev/null
+++ b/res/values-zh-rCN/qtistrings.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
+ ~
+ ~ Redistribution and use in source and binary forms, with or without
+ ~ modification, are permitted provided that the following conditions are
+ ~ met:
+ ~ Redistributions of source code must retain the above copyright
+ ~ notice, this list of conditions and the following disclaimer.
+ ~ Redistributions in binary form must reproduce the above
+ ~ copyright notice, this list of conditions and the following
+ ~ disclaimer in the documentation and/or other materials provided
+ ~ with the distribution.
+ ~ Neither the name of The Linux Foundation nor the names of its
+ ~ contributors may be used to endorse or promote products derived
+ ~ from this software without specific prior written permission.
+ ~
+ ~ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ ~ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ ~ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ~ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ ~ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ ~ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ ~ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ ~ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ ~ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ ~ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ ~ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ ~
+ -->
+
+<!-- The xml contains Qti specific resource strings neede for any value added features. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="video_call_upgrade">不能升级!</string>
+</resources>
diff --git a/res/values/symbols.xml b/res/values/symbols.xml
new file mode 100644
index 0000000..2b1c756
--- /dev/null
+++ b/res/values/symbols.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ ~
+ ~ Redistribution and use in source and binary forms, with or without
+ ~ modification, are permitted provided that the following conditions are
+ ~ met:
+ ~ * Redistributions of source code must retain the above copyright
+ ~ notice, this list of conditions and the following disclaimer.
+ ~ * Redistributions in binary form must reproduce the above
+ ~ copyright notice, this list of conditions and the following
+ ~ disclaimer in the documentation and/or other materials provided
+ ~ with the distribution.
+ ~ * Neither the name of The Linux Foundation nor the names of its
+ ~ contributors may be used to endorse or promote products derived
+ ~ from this software without specific prior written permission.
+ ~
+ ~ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ ~ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ ~ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ~ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ ~ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ ~ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ ~ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ ~ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ ~ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ ~ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ ~ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <java-symbol type="bool" name="config_regional_number_patterns_video_call" />
+</resources>
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 5627b99..12304c0 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -58,6 +58,7 @@
import android.widget.TextView;
import android.widget.Toast;
+import com.android.contacts.common.CallUtil;
import com.android.contacts.common.dialog.ClearFrequentsDialog;
import com.android.contacts.common.interactions.ImportExportDialogFragment;
import com.android.contacts.common.interactions.TouchPointManager;
@@ -1438,6 +1439,12 @@
// an error message.
phoneNumber = "";
}
+ if (getResources().getBoolean(R.bool.config_regional_number_patterns_video_call) &&
+ !CallUtil.isVideoCallNumValid(phoneNumber) &&
+ isVideoCall && (CallUtil.isVideoEnabled(this))) {
+ Toast.makeText(this,R.string.toast_make_video_call_failed, Toast.LENGTH_LONG).show();
+ return;
+ }
final Intent intent = new CallIntentBuilder(phoneNumber)
.setIsVideoCall(isVideoCall)