summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPreeti Ahuja <preetia@codeaurora.org>2013-09-28 19:11:31 +0530
committerAmit Mahajan <amitmahajan@google.com>2015-09-03 13:58:10 -0700
commitf33bf3996fcf13485081516354ac16552327a634 (patch)
treecf5ca020bd17599dc112a427b6282a59454afea7
parentf67c36432c23546b6005348075f0056c884d1b50 (diff)
downloadandroid_packages_apps_Stk-f33bf3996fcf13485081516354ac16552327a634.tar.gz
android_packages_apps_Stk-f33bf3996fcf13485081516354ac16552327a634.tar.bz2
android_packages_apps_Stk-f33bf3996fcf13485081516354ac16552327a634.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. BUG=22637125 Change-Id: If4b10f267cbbb1385701b0e97210d369f9e61cea
-rw-r--r--src/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 937acec..0f4107c 100644
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -1003,7 +1003,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;
@@ -1021,7 +1022,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);
}
}
@@ -1031,8 +1033,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
@@ -1406,7 +1412,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);
}
@@ -1517,7 +1530,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);
}