diff options
| author | Pavan Kumar Tatavarthi <ctpavan@codeaurora.org> | 2014-02-05 13:08:49 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-02-27 17:52:52 -0800 |
| commit | 5bbc60d489937af554e7b0ff56ff37b6fd06804b (patch) | |
| tree | 0f04d96350567130d1ab27abb041d92e9a503382 /src | |
| parent | d55e26ab8c7ba404992d2da1bc0540979b7f8202 (diff) | |
| download | packages_apps_InCallUI-5bbc60d489937af554e7b0ff56ff37b6fd06804b.tar.gz packages_apps_InCallUI-5bbc60d489937af554e7b0ff56ff37b6fd06804b.tar.bz2 packages_apps_InCallUI-5bbc60d489937af554e7b0ff56ff37b6fd06804b.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. Define system property to set the number to which
call should be delfected.
3. Define property to deflect call as "persist.radio.deflect.number"
Change-Id: Iee3c845bdcd5e5a7bb488a05b89758fa0fa6a6ba
CRs-Fixed: 609140
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/incallui/CallCommandClient.java | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/com/android/incallui/CallCommandClient.java b/src/com/android/incallui/CallCommandClient.java index c6b1910d..92cf6d67 100644 --- a/src/com/android/incallui/CallCommandClient.java +++ b/src/com/android/incallui/CallCommandClient.java @@ -17,6 +17,7 @@ package com.android.incallui; import android.os.RemoteException; +import android.os.SystemProperties; import com.android.internal.telephony.MSimConstants; @@ -252,8 +253,29 @@ public class CallCommandClient { return; } try { - Log.v(this, "acceptCall() " ); - mCommandService.answerCallWithCallType(callId,callType); + /* + * 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()) { + mCommandService.deflectCall(callId, deflectcall); + } else { + Log.v(this, "acceptCall() "); + mCommandService.answerCallWithCallType(callId, callType); + } } catch (RemoteException e) { Log.e(this, "Error on acceptCall().", e); } |
