Commit 497fcd9f authored by Amit Mahajan's avatar Amit Mahajan Committed by Android Git Automerger
Browse files

am 7b95f245: am 44c11d01: Merge "Stk: Icon related changes" into mnc-dr-dev

* commit '7b95f245':
  Stk: Icon related changes
parents 241e5db4 7b95f245
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment