diff options
author | Evan Charlton <evanc@google.com> | 2014-05-14 12:42:42 -0700 |
---|---|---|
committer | Evan Charlton <evanc@google.com> | 2014-05-14 12:42:42 -0700 |
commit | 5781d94c2a8d599eca6d72f56d606c64ae3175fb (patch) | |
tree | fd654347fe179a5f11b7af20eab9a4cd8fe7b9a0 | |
parent | cb49ef96c203dbb162c8b1902c9183674bfaf524 (diff) | |
parent | 6bc8e8b3258b0397f621db266464f75945a710c5 (diff) |
resolved conflicts for merge of 8abea101 to master
Change-Id: Id21435a4d92864c8395846a82a7d8d1643d0125a
-rw-r--r-- | InCallUI/res/values/strings.xml | 3 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/Call.java | 4 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardFragment.java | 7 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallServiceImpl.java | 14 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/TelecommAdapter.java | 8 |
5 files changed, 36 insertions, 0 deletions
diff --git a/InCallUI/res/values/strings.xml b/InCallUI/res/values/strings.xml index ff004df7c..266ac582b 100644 --- a/InCallUI/res/values/strings.xml +++ b/InCallUI/res/values/strings.xml @@ -544,4 +544,7 @@ <string name="dialpad_star_letters"></string> <!-- Do not translate. --> <string name="dialpad_pound_letters"></string> + + <!-- Text for the onscreen connection handoff button --> + <string name="connection_handoff_text">Handoff</string> </resources> diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java index 947cb37e8..20075f75c 100644 --- a/InCallUI/src/com/android/incallui/Call.java +++ b/InCallUI/src/com/android/incallui/Call.java @@ -191,6 +191,10 @@ public final class Call { setCapabilities(capabilities | mCapabilities); } + public void removeCapabilities(int capabilities) { + setCapabilities(~capabilities & mCapabilities); + } + public void setConnectTime(long connectTime) { mConnectTime = connectTime; } diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index 9f14e265d..1de6fda51 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -28,6 +28,7 @@ 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; @@ -130,6 +131,12 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } @Override + public void setShowConnectionHandoff(boolean showConnectionHandoff) { + Log.v(this, "setShowConnectionHandoff: " + showConnectionHandoff); + mConnectionHandoffButton.setVisibility(showConnectionHandoff ? View.VISIBLE : View.GONE); + } + + @Override public void setPrimaryName(String name, boolean nameIsNumber) { if (TextUtils.isEmpty(name)) { mPrimaryName.setText(""); diff --git a/InCallUI/src/com/android/incallui/InCallServiceImpl.java b/InCallUI/src/com/android/incallui/InCallServiceImpl.java index a81369906..03d370972 100644 --- a/InCallUI/src/com/android/incallui/InCallServiceImpl.java +++ b/InCallUI/src/com/android/incallui/InCallServiceImpl.java @@ -133,6 +133,20 @@ public class InCallServiceImpl extends android.telecomm.InCallService { } /** {@inheritDoc} */ + @Override protected void setHandoffEnabled(String callId, boolean isHandoffEnabled) { + Call call = CallList.getInstance().getCall(callId); + Log.v(this, "setHandoffEnabled: " + call + " isEnabled: " + isHandoffEnabled); + if (null != call) { + if (isHandoffEnabled) { + call.addCapabilities(CallCapabilities.CONNECTION_HANDOFF); + } else { + call.removeCapabilities(CallCapabilities.CONNECTION_HANDOFF); + } + CallList.getInstance().onUpdate(call); + } + } + + /** {@inheritDoc} */ @Override protected void setDisconnected(String callId, int disconnectCause) { Log.v(this, "setDisconnected"); Call call = CallList.getInstance().getCall(callId); diff --git a/InCallUI/src/com/android/incallui/TelecommAdapter.java b/InCallUI/src/com/android/incallui/TelecommAdapter.java index 1bc581b88..f3a75465e 100644 --- a/InCallUI/src/com/android/incallui/TelecommAdapter.java +++ b/InCallUI/src/com/android/incallui/TelecommAdapter.java @@ -142,6 +142,14 @@ final class TelecommAdapter { Log.wtf(this, "postDialCancel not implemented"); } + void handoffCall(String callId) { + if (mAdapter != null) { + mAdapter.handoffCall(callId); + } else { + Log.e(this, "error handoffCall, mAdapter is null"); + } + } + void setSystemBarNavigationEnabled(boolean enable) { // TODO(sail): Implement this. } |