summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPreeti Ahuja <preetia@codeaurora.org>2013-09-28 19:11:31 +0530
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:29:32 -0600
commit76662d5acd3971c91ea7bf4722f68c6a5c4d0e8e (patch)
tree2433ce3f0bb41d8fd8f56e834ec0fa908d030e3b
parent22d9ad8b53ad9e8aae1acd9a568693437de5b401 (diff)
downloadandroid_packages_apps_Stk-76662d5acd3971c91ea7bf4722f68c6a5c4d0e8e.tar.gz
android_packages_apps_Stk-76662d5acd3971c91ea7bf4722f68c6a5c4d0e8e.tar.bz2
android_packages_apps_Stk-76662d5acd3971c91ea7bf4722f68c6a5c4d0e8e.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: If4b10f267cbbb1385701b0e97210d369f9e61cea
-rwxr-xr-xsrc/com/android/stk/StkAppService.java26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java
index 4435eb5..d49b663 100755
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -1035,7 +1035,8 @@ public class StkAppService extends Service implements Runnable {
if (helpRequired) {
resMsg.setResultCode(ResultCode.HELP_INFO_REQUIRED);
} else {
- resMsg.setResultCode(ResultCode.OK);
+ resMsg.setResultCode(mStkContext[slotId].mCurrentCmd.hasIconLoadFailed() ?
+ ResultCode.PRFRMD_ICON_NOT_DISPLAYED : ResultCode.OK);
}
resMsg.setMenuSelection(menuSelection);
break;
@@ -1053,7 +1054,8 @@ public class StkAppService extends Service implements Runnable {
if (helpRequired) {
resMsg.setResultCode(ResultCode.HELP_INFO_REQUIRED);
} else {
- resMsg.setResultCode(ResultCode.OK);
+ resMsg.setResultCode(mStkContext[slotId].mCurrentCmd.hasIconLoadFailed() ?
+ ResultCode.PRFRMD_ICON_NOT_DISPLAYED : ResultCode.OK);
resMsg.setInput(input);
}
}
@@ -1063,8 +1065,12 @@ public class StkAppService extends Service implements Runnable {
confirmed = args.getBoolean(CONFIRMATION);
switch (mStkContext[slotId].mCurrentCmd.getCmdType()) {
case DISPLAY_TEXT:
- resMsg.setResultCode(confirmed ? ResultCode.OK
- : ResultCode.UICC_SESSION_TERM_BY_USER);
+ if (confirmed) {
+ resMsg.setResultCode(mStkContext[slotId].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
@@ -1438,7 +1444,14 @@ 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 (mStkContext[slotId].mCurrentCmd.hasIconLoadFailed() ||
+ msg.icon == null || !msg.iconSelfExplanatory) {
tv.setText(msg.text);
}
@@ -1550,7 +1563,8 @@ public class StkAppService extends Service implements Runnable {
notificationBuilder.setContentIntent(pendingIntent);
notificationBuilder.setOngoing(true);
// Set text and icon for the status bar and notification body.
- if (!msg.iconSelfExplanatory) {
+ if (mStkContext[slotId].mIdleModeTextCmd.hasIconLoadFailed() ||
+ !msg.iconSelfExplanatory) {
notificationBuilder.setContentText(msg.text);
notificationBuilder.setTicker(msg.text);
}