diff options
author | Ravindra <c_rthat@codeaurora.org> | 2015-10-07 17:00:57 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-10-08 00:01:50 -0700 |
commit | 1b2b754a3100c0aab4afffe5890276a3f91eb4cc (patch) | |
tree | d186bf9caef7c25cbcec663ac527ec6c7c172a1e | |
parent | 09ecabc3ea7a13d140a0c050afdafc6e9e2884a3 (diff) | |
download | frameworks_base-1b2b754a3100c0aab4afffe5890276a3f91eb4cc.zip frameworks_base-1b2b754a3100c0aab4afffe5890276a3f91eb4cc.tar.gz frameworks_base-1b2b754a3100c0aab4afffe5890276a3f91eb4cc.tar.bz2 |
Fix to display merge icon on failure.
Trigger a state change to incallui with the existing state
on an unsuccessful merge in order to enable merge icon.
Change-Id: I1c7baa7a2c2ccf277eff06d68da0b419ae587a19
CRs-Fixed: 815642
4 files changed, 22 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index 29f3061..7633daf 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -1169,6 +1169,11 @@ public final class Call { } } + /** {@hide} */ + final void onMergeFailed() { + fireStateChanged(mState); + } + private void fireStateChanged(final int newState) { for (CallbackRecord<Callback> record : mCallbackRecords) { final Call call = this; diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java index b89490e..1b6a98f 100644 --- a/telecomm/java/android/telecom/InCallService.java +++ b/telecomm/java/android/telecom/InCallService.java @@ -73,6 +73,7 @@ public abstract class InCallService extends Service { private static final int MSG_ON_CALL_AUDIO_STATE_CHANGED = 5; private static final int MSG_BRING_TO_FOREGROUND = 6; private static final int MSG_ON_CAN_ADD_CALL_CHANGED = 7; + private static final int MSG_ON_MERGE_FAILED = 8; /** Default Handler used to consolidate binder method calls onto a single thread. */ private final Handler mHandler = new Handler(Looper.getMainLooper()) { @@ -91,6 +92,9 @@ public abstract class InCallService extends Service { case MSG_ADD_CALL: mPhone.internalAddCall((ParcelableCall) msg.obj); break; + case MSG_ON_MERGE_FAILED: + mPhone.onMergeFailed((ParcelableCall) msg.obj); + break; case MSG_UPDATE_CALL: mPhone.internalUpdateCall((ParcelableCall) msg.obj); break; @@ -156,6 +160,11 @@ public abstract class InCallService extends Service { } @Override + public void onMergeFailed(ParcelableCall call) { + mHandler.obtainMessage(MSG_ON_MERGE_FAILED, call).sendToTarget(); + } + + @Override public void bringToForeground(boolean showDialpad) { mHandler.obtainMessage(MSG_BRING_TO_FOREGROUND, showDialpad ? 1 : 0, 0).sendToTarget(); } diff --git a/telecomm/java/android/telecom/Phone.java b/telecomm/java/android/telecom/Phone.java index 2ec6c91..0fd124d 100644 --- a/telecomm/java/android/telecom/Phone.java +++ b/telecomm/java/android/telecom/Phone.java @@ -179,6 +179,12 @@ public final class Phone { } } + final void onMergeFailed(ParcelableCall parcelableCall) { + Call call = mCallByTelecomCallId.get(parcelableCall.getId()); + if (call != null) { + call.onMergeFailed(); + } + } /** * Called to destroy the phone and cleanup any lingering calls. */ diff --git a/telecomm/java/com/android/internal/telecom/IInCallService.aidl b/telecomm/java/com/android/internal/telecom/IInCallService.aidl index ded47d5..f4ba9a0 100644 --- a/telecomm/java/com/android/internal/telecom/IInCallService.aidl +++ b/telecomm/java/com/android/internal/telecom/IInCallService.aidl @@ -45,4 +45,6 @@ oneway interface IInCallService { void bringToForeground(boolean showDialpad); void onCanAddCallChanged(boolean canAddCall); + + void onMergeFailed(in ParcelableCall call); } |