summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Mahajan <amitmahajan@google.com>2015-09-03 22:26:56 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-03 22:26:56 +0000
commit497fcd9fe7dde6d30e4778a2b33b32ef511d88c0 (patch)
tree03922554b3dfb5e78d27717d7edd5199fe1ff852
parent241e5db41a11a0ff462f1c3717a7d314b6a8c5cf (diff)
parent7b95f245eb2015e5bc225b3d522a99bf94db7042 (diff)
downloadandroid_packages_apps_Stk-497fcd9fe7dde6d30e4778a2b33b32ef511d88c0.tar.gz
android_packages_apps_Stk-497fcd9fe7dde6d30e4778a2b33b32ef511d88c0.tar.bz2
android_packages_apps_Stk-497fcd9fe7dde6d30e4778a2b33b32ef511d88c0.zip
am 7b95f245: am 44c11d01: Merge "Stk: Icon related changes" into mnc-dr-dev
* commit '7b95f245eb2015e5bc225b3d522a99bf94db7042': Stk: Icon related changes
-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 7c85616..0b19f9e 100644
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -1025,7 +1025,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;
@@ -1043,7 +1044,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);
}
}
@@ -1053,8 +1055,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
@@ -1428,7 +1434,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);
}
@@ -1540,7 +1553,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);
}