diff options
author | Suresh Kumar Sugguna <sureshk@codeaurora.org> | 2014-08-28 01:55:14 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2014-11-04 08:50:04 -0700 |
commit | 8825e5c21880be66a3f1938fd6e93ce43bf7a1b5 (patch) | |
tree | 1d0ce61e1eadfa6eb7e49b5020ebdbc99ed85d5d /src/com/android/incallui/AnswerPresenter.java | |
parent | dd7741709bc82da066efd184b14bdee828edfcd1 (diff) | |
download | packages_apps_InCallUI-8825e5c21880be66a3f1938fd6e93ce43bf7a1b5.tar.gz packages_apps_InCallUI-8825e5c21880be66a3f1938fd6e93ce43bf7a1b5.tar.bz2 packages_apps_InCallUI-8825e5c21880be66a3f1938fd6e93ce43bf7a1b5.zip |
Deflect call test using answer call button
1. Provide hooks to deflect call through answer
button in the UI for testing deflect call scenarios.
2. Use system property "persist.radio.deflect.number" to
set the number to which call should be delfected.
Change-Id: I1b3d039a587f6769939743a2fb307cdc6c650837
CRs-Fixed: 713856
Diffstat (limited to 'src/com/android/incallui/AnswerPresenter.java')
-rw-r--r-- | src/com/android/incallui/AnswerPresenter.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/com/android/incallui/AnswerPresenter.java b/src/com/android/incallui/AnswerPresenter.java index 619e75f3..a5db13ef 100644 --- a/src/com/android/incallui/AnswerPresenter.java +++ b/src/com/android/incallui/AnswerPresenter.java @@ -19,6 +19,7 @@ package com.android.incallui; import android.telecom.PhoneCapabilities; import android.app.KeyguardManager; import android.content.Context; +import android.os.SystemProperties; import java.util.List; @@ -181,6 +182,29 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi> return; } + /** + * To test call deflection this property has to be set with the + * number to which the call should be deflected. If this property is + * set to a number, on pressing the UI answer button, call deflect + * request will be sent. This is done to provide hooks to test call + * deflection through the UI answer button. For commercialization UI + * should be customized to call this API through the Call deflect UI + * button By default this property is not set and Answer button will + * work as expected. + * Example: + * To deflect call to number 12345 + * adb shell setprop persist.radio.deflect.number 12345 + * + * Toggle above property and to invoke answerCallWithCallType + * adb shell setprop persist.radio.deflect.number "" + */ + String deflectcall = SystemProperties.get("persist.radio.deflect.number"); + if (deflectcall != null && !deflectcall.isEmpty()) { + Log.i(this, "deflectCall " + mCallId + "to" + deflectcall); + TelecommAdapter.getInstance().deflectCall(mCall[phoneId].getId(), deflectcall); + return; + } + if (mCall[phoneId].getSessionModificationState() == Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST) { InCallPresenter.getInstance().acceptUpgradeRequest(context); |