summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep Kunta <skunta@codeaurora.org>2013-09-28 19:11:31 +0530
committerLinux Build Service Account <lnxbuild@localhost>2014-11-04 08:53:51 -0700
commitef53493816ec74fef5157440c7300897f1820aba (patch)
tree4af8e2edad0896409531e1afece6198e4cb32209
parent3eabb6728502b1c1d992470c333e96326b5e49e8 (diff)
downloadandroid_packages_apps_Stk-ef53493816ec74fef5157440c7300897f1820aba.tar.gz
android_packages_apps_Stk-ef53493816ec74fef5157440c7300897f1820aba.tar.bz2
android_packages_apps_Stk-ef53493816ec74fef5157440c7300897f1820aba.zip
Stk: Icon related changes
Return appropriate result code, if icon is not displayed and display text msg only if icon display fails or if icon is not self explanatory. Change-Id: Ia421eb136d15c22e8090f2db93d00fcafe94164e
-rw-r--r--src/com/android/stk/StkAppService.java24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java
index ea58f9e..1f279fd 100644
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -784,7 +784,8 @@ public class StkAppService extends Service implements Runnable {
if (helpRequired) {
resMsg.setResultCode(ResultCode.HELP_INFO_REQUIRED);
} else {
- resMsg.setResultCode(ResultCode.OK);
+ resMsg.setResultCode(mCurrentCmd.hasIconLoadFailed() ?
+ ResultCode.PRFRMD_ICON_NOT_DISPLAYED : ResultCode.OK);
}
resMsg.setMenuSelection(menuSelection);
startTimeOut();
@@ -803,7 +804,8 @@ public class StkAppService extends Service implements Runnable {
if (helpRequired) {
resMsg.setResultCode(ResultCode.HELP_INFO_REQUIRED);
} else {
- resMsg.setResultCode(ResultCode.OK);
+ resMsg.setResultCode(mCurrentCmd.hasIconLoadFailed() ?
+ ResultCode.PRFRMD_ICON_NOT_DISPLAYED : ResultCode.OK);
resMsg.setInput(input);
}
}
@@ -813,8 +815,12 @@ public class StkAppService extends Service implements Runnable {
confirmed = args.getBoolean(CONFIRMATION);
switch (mCurrentCmd.getCmdType()) {
case DISPLAY_TEXT:
- resMsg.setResultCode(confirmed ? ResultCode.OK
- : ResultCode.UICC_SESSION_TERM_BY_USER);
+ if (confirmed) {
+ resMsg.setResultCode(mCurrentCmd.hasIconLoadFailed() ?
+ ResultCode.PRFRMD_ICON_NOT_DISPLAYED : ResultCode.OK);
+ } else {
+ resMsg.setResultCode(ResultCode.UICC_SESSION_TERM_BY_USER);
+ }
break;
case LAUNCH_BROWSER:
resMsg.setResultCode(confirmed ? ResultCode.OK
@@ -1045,7 +1051,13 @@ public class StkAppService extends Service implements Runnable {
} else {
iv.setVisibility(View.GONE);
}
- if (!msg.iconSelfExplanatory) {
+ /* In case of 'self explanatory' stkapp should display the specified
+ * icon in proactive command (but not the alpha string).
+ * If icon is non-self explanatory and if the icon could not be displayed
+ * then alpha string or text data should be displayed
+ * Ref: ETSI 102.223,section 6.5.4
+ */
+ if (mCurrentCmd.hasIconLoadFailed() || msg.icon == null || !msg.iconSelfExplanatory) {
tv.setText(msg.text);
}
@@ -1143,7 +1155,7 @@ public class StkAppService extends Service implements Runnable {
notificationBuilder.setStyle(new Notification.BigTextStyle(notificationBuilder)
.bigText(msg.text));
// Set text and icon for the status bar and notification body.
- if (!msg.iconSelfExplanatory) {
+ if (mIdleModeTextCmd.hasIconLoadFailed() || !msg.iconSelfExplanatory) {
notificationBuilder.setContentText(msg.text);
notificationBuilder.setTicker(msg.text);
}