diff options
author | Sailesh Nepal <sail@google.com> | 2014-02-18 20:04:15 -0800 |
---|---|---|
committer | Sailesh Nepal <sail@google.com> | 2014-02-18 20:04:15 -0800 |
commit | 4d611662e17878203be2770142409829c1a2d4e4 (patch) | |
tree | f7a28dea15512fe4aad8dac3781a9e37c85868ff | |
parent | 9dc84d13635393508ead9d11b65df692f0c856b0 (diff) |
Revert "Add handoff buttons"
This reverts commit 36b5e5f96678bafc325491d5294b2d97e0a0e499.
15 files changed, 6 insertions, 101 deletions
diff --git a/InCallUI/res/drawable-hdpi/ic_in_call_video_handoff.png b/InCallUI/res/drawable-hdpi/ic_in_call_video_handoff.png Binary files differdeleted file mode 100644 index fb76e3c69..000000000 --- a/InCallUI/res/drawable-hdpi/ic_in_call_video_handoff.png +++ /dev/null diff --git a/InCallUI/res/drawable-hdpi/ic_in_call_wifi.png b/InCallUI/res/drawable-hdpi/ic_in_call_wifi.png Binary files differdeleted file mode 100644 index 93e086dab..000000000 --- a/InCallUI/res/drawable-hdpi/ic_in_call_wifi.png +++ /dev/null diff --git a/InCallUI/res/drawable-mdpi/ic_in_call_video_handoff.png b/InCallUI/res/drawable-mdpi/ic_in_call_video_handoff.png Binary files differdeleted file mode 100644 index 8b1ff4e02..000000000 --- a/InCallUI/res/drawable-mdpi/ic_in_call_video_handoff.png +++ /dev/null diff --git a/InCallUI/res/drawable-mdpi/ic_in_call_wifi.png b/InCallUI/res/drawable-mdpi/ic_in_call_wifi.png Binary files differdeleted file mode 100644 index 339d4ed27..000000000 --- a/InCallUI/res/drawable-mdpi/ic_in_call_wifi.png +++ /dev/null diff --git a/InCallUI/res/drawable-xhdpi/ic_in_call_video_handoff.png b/InCallUI/res/drawable-xhdpi/ic_in_call_video_handoff.png Binary files differdeleted file mode 100644 index 38d6220b1..000000000 --- a/InCallUI/res/drawable-xhdpi/ic_in_call_video_handoff.png +++ /dev/null diff --git a/InCallUI/res/drawable-xhdpi/ic_in_call_wifi.png b/InCallUI/res/drawable-xhdpi/ic_in_call_wifi.png Binary files differdeleted file mode 100644 index 692726fbe..000000000 --- a/InCallUI/res/drawable-xhdpi/ic_in_call_wifi.png +++ /dev/null diff --git a/InCallUI/res/drawable-xxhdpi/ic_in_call_video_handoff.png b/InCallUI/res/drawable-xxhdpi/ic_in_call_video_handoff.png Binary files differdeleted file mode 100644 index 4cbdbbb57..000000000 --- a/InCallUI/res/drawable-xxhdpi/ic_in_call_video_handoff.png +++ /dev/null diff --git a/InCallUI/res/layout/call_button_fragment.xml b/InCallUI/res/layout/call_button_fragment.xml index 944c3147a..013d1b22a 100644 --- a/InCallUI/res/layout/call_button_fragment.xml +++ b/InCallUI/res/layout/call_button_fragment.xml @@ -164,19 +164,7 @@ android:visibility="gone" /> - <!-- Separator between 5th and 6th button --> - <View android:id="@+id/videoHandoffSpacer" - style="@style/VerticalSeparator" - android:visibility="gone" /> - - <ImageButton android:id="@+id/videoHandoffButton" - style="@style/InCallButton" - android:src="@drawable/ic_in_call_video_handoff" - android:contentDescription="@string/video_handoff_text" - android:visibility="gone" - /> - - <!-- Separator between last button and right padding --> + <!-- Separator between 4th (or 5th) button and right padding --> <View style="@style/VerticalSeparator"/> </LinearLayout> diff --git a/InCallUI/res/layout/primary_call_info.xml b/InCallUI/res/layout/primary_call_info.xml index d3f6db307..d013f7022 100644 --- a/InCallUI/res/layout/primary_call_info.xml +++ b/InCallUI/res/layout/primary_call_info.xml @@ -119,7 +119,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical|right" - android:orientation="horizontal" + android:orientation="vertical" android:background="@color/incall_secondary_info_background" android:animateLayoutChanges="true"> @@ -127,9 +127,8 @@ indication like "Dialing" or "Incoming call" or "Call ended". It's unused for the normal case of an active ongoing call. --> <TextView android:id="@+id/callStateLabel" - android:layout_width="0dp" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" android:paddingTop="@dimen/provider_info_top_bottom_padding" android:paddingBottom="@dimen/provider_info_top_bottom_padding" android:paddingStart="@dimen/call_banner_side_padding" @@ -141,13 +140,6 @@ android:background="@android:color/transparent" android:singleLine="true" android:ellipsize="end"/> - - <Button android:id="@+id/connectionHandoffButton" - android:text="@string/connection_handoff_text" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:visibility="gone" /> - </LinearLayout> </LinearLayout> diff --git a/InCallUI/res/values/strings.xml b/InCallUI/res/values/strings.xml index ddfec2c07..bbcbbe962 100644 --- a/InCallUI/res/values/strings.xml +++ b/InCallUI/res/values/strings.xml @@ -519,10 +519,4 @@ <string name="emergency_call_dialog_number_for_display">Emergency number</string> <string name="in_call_wifi_connected">Connected via <xliff:g id="wifi_ssid">%s</xliff:g></string> - - <!-- Text for the onscreen video handoff button --> - <string name="video_handoff_text">Video</string> - - <!-- Text for the onscreen connection handoff button --> - <string name="connection_handoff_text">Handoff</string> </resources> diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java index 536680c5a..ed7690334 100644 --- a/InCallUI/src/com/android/incallui/CallButtonFragment.java +++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java @@ -48,8 +48,6 @@ public class CallButtonFragment private ImageButton mMergeButton; private ImageButton mAddCallButton; private ImageButton mSwapButton; - private ImageButton mVideoHandoffButton; - private View mVideoHandoffSpacer; private PopupMenu mAudioModePopup; private boolean mAudioModePopupVisible; @@ -143,9 +141,6 @@ public class CallButtonFragment mMergeButton.setOnClickListener(this); mSwapButton = (ImageButton) parent.findViewById(R.id.swapButton); mSwapButton.setOnClickListener(this); - mVideoHandoffButton = (ImageButton) parent.findViewById(R.id.videoHandoffButton); - mVideoHandoffButton.setOnClickListener(this); - mVideoHandoffSpacer = parent.findViewById(R.id.videoHandoffSpacer); return parent; } @@ -188,9 +183,6 @@ public class CallButtonFragment case R.id.dialpadButton: getPresenter().showDialpadClicked(mShowDialpadButton.isChecked()); break; - case R.id.videoHandoffButton: - getPresenter().videoHandoffClicked(); - break; default: Log.wtf(this, "onClick: unexpected"); break; @@ -534,11 +526,6 @@ public class CallButtonFragment } } - @Override - public void showVideoHandoff(boolean show) { - mVideoHandoffButton.setVisibility(show ? View.VISIBLE : View.GONE); - mVideoHandoffSpacer.setVisibility(show ? View.VISIBLE : View.GONE); - } @Override public void showManageConferenceCallButton() { diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java index 0a0330629..67a642b06 100644 --- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java +++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java @@ -219,10 +219,6 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto updateExtraButtonRow(); } - public void videoHandoffClicked() { - CallCommandClient.getInstance().videoHandoff(mCall.getCallId()); - } - private void updateUi(InCallState state, Call call) { final CallButtonUi ui = getUi(); if (ui == null) { @@ -243,12 +239,12 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto Log.v(this, "Show swap ", call.can(Capabilities.SWAP_CALLS)); Log.v(this, "Show add call ", call.can(Capabilities.ADD_CALL)); Log.v(this, "Show mute ", call.can(Capabilities.MUTE)); - Log.v(this, "Show video handoff ", call.can(Capabilities.VIDEO_HANDOFF)); final boolean canMerge = call.can(Capabilities.MERGE_CALLS); final boolean canAdd = call.can(Capabilities.ADD_CALL); final boolean isGenericConference = call.can(Capabilities.GENERIC_CONFERENCE); + final boolean showMerge = !isGenericConference && canMerge; if (showMerge) { @@ -295,7 +291,6 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto } ui.enableMute(call.can(Capabilities.MUTE)); - ui.showVideoHandoff(call.can(Capabilities.VIDEO_HANDOFF)); // Finally, update the "extra button row": It's displayed above the // "End" button, but only if necessary. Also, it's never displayed @@ -362,6 +357,5 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto void showGenericMergeButton(); void hideExtraRow(); void displayManageConferencePanel(boolean on); - void showVideoHandoff(boolean show); } } diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index c50e64aa0..76cdf2ca9 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -30,7 +30,6 @@ import android.view.View.OnClickListener; import android.view.ViewGroup; import android.view.ViewStub; import android.view.accessibility.AccessibilityEvent; -import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; @@ -53,7 +52,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr private ImageView mPhoto; private TextView mElapsedTime; private ViewGroup mSupplementaryInfoContainer; - private Button mConnectionHandoffButton; // Secondary caller info private ViewStub mSecondaryCallInfo; @@ -113,13 +111,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr mElapsedTime = (TextView) view.findViewById(R.id.elapsedTime); mSupplementaryInfoContainer = (ViewGroup) view.findViewById(R.id.supplementary_info_container); - mConnectionHandoffButton = (Button) view.findViewById(R.id.connectionHandoffButton); - mConnectionHandoffButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - getPresenter().connectionHandoffClicked(); - } - }); } @Override @@ -179,11 +170,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } @Override - public void setShowConnectionHandoff(boolean showConnectionHandoff) { - mConnectionHandoffButton.setVisibility(showConnectionHandoff ? View.VISIBLE : View.GONE); - } - - @Override public void setPrimary(String number, String name, boolean nameIsNumber, String label, Drawable photo, boolean isConference, boolean isGeneric, boolean isSipCall) { Log.d(this, "Setting primary call"); @@ -272,12 +258,13 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr mCallStateLabel.setText(getResources().getString(R.string.in_call_wifi_connected, wifiConnection)); mCallStateLabel.setGravity(Gravity.START | Gravity.CENTER_VERTICAL); + mCallStateLabel.setBackgroundResource(R.color.wifi_connected_background); mCallStateLabel.setCompoundDrawablesRelativeWithIntrinsicBounds( R.drawable.ic_in_call_wifi, 0, 0, 0); mCallStateLabel.setCompoundDrawablePadding(5); mCallStateLabel.setAllCaps(false); mCallStateLabel.setVisibility(View.VISIBLE); - mSupplementaryInfoContainer.setBackgroundResource(R.color.wifi_connected_background); + } else if (!TextUtils.isEmpty(callStateLabel)) { mCallStateLabel.setGravity(Gravity.END); mCallStateLabel.setAllCaps(true); @@ -287,8 +274,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr if (Call.State.INCOMING == state) { setBluetoothOn(bluetoothOn); } - mSupplementaryInfoContainer.setBackgroundResource( - R.color.incall_secondary_info_background); } else { mCallStateLabel.setVisibility(View.GONE); mCallStateLabel.setCompoundDrawables(null, null, null, null); diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java index 4c010a565..e81ec8526 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -195,9 +195,6 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> } else { ui.setCallState(Call.State.IDLE, Call.DisconnectCause.UNKNOWN, false, null, null, null); } - - ui.setShowConnectionHandoff(mPrimary != null && mPrimary.can( - Capabilities.CONNECTION_HANDOFF)); } @Override @@ -472,12 +469,6 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> CallCommandClient.getInstance().swap(); } - public void connectionHandoffClicked() { - if (mPrimary != null) { - CallCommandClient.getInstance().connectionHandoff(mPrimary.getCallId()); - } - } - public interface CallCardUi extends Ui { void setVisible(boolean on); void setPrimary(String number, String name, boolean nameIsNumber, String label, @@ -492,6 +483,5 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> void setPrimaryImage(Drawable image); void setPrimaryPhoneNumber(String phoneNumber); void setPrimaryLabel(String label); - void setShowConnectionHandoff(boolean showConnectionHandoff); } } diff --git a/InCallUI/src/com/android/incallui/CallCommandClient.java b/InCallUI/src/com/android/incallui/CallCommandClient.java index 234c518de..52d2100c8 100644 --- a/InCallUI/src/com/android/incallui/CallCommandClient.java +++ b/InCallUI/src/com/android/incallui/CallCommandClient.java @@ -243,29 +243,4 @@ public class CallCommandClient { } } - public void videoHandoff(int callId) { - Log.i(this, "video handoff"); - if (mCommandService == null) { - Log.e(this, "Cannot perform video handoff; CallCommandService == null"); - return; - } - try { - mCommandService.videoHandoff(callId); - } catch (RemoteException e) { - Log.e(this, "Error performing video handoff.", e); - } - } - - public void connectionHandoff(int callId) { - Log.i(this, "connection handoff"); - if (mCommandService == null) { - Log.e(this, "Cannot perform connection handoff; CallCommandService == null"); - return; - } - try { - mCommandService.connectionHandoff(callId); - } catch (RemoteException e) { - Log.e(this, "Error performing connection handoff.", e); - } - } } |