Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47f7fc63 authored by Preeti Ahuja's avatar Preeti Ahuja Committed by Amit Mahajan
Browse files

Cat: Do not send TR immediately for Display_Text

Currently for DISPLAY_TEXT proactive command, if the application
response is not required, CatService sends a terminal response to
card immediately and then sends the proactive command to StkApp.
On receiving the TR, the card responds with a Session_End. If the
Session_End is sent to StkApp before it finishes processing the
Display_Text command, a nullPointerException is seen in StkApp

Do not send Display_Text TR to card immediately. Send the TR after
the Display_Text command response has been received from StkApp.

Bug: 17553408
Change-Id: I23f25a9128e8545098610bec620429948233405e
parent 734900af
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -376,10 +376,6 @@ public class CatService extends Handler implements AppInterface {
                sendTerminalResponse(cmdParams.mCmdDet, ResultCode.OK, false, 0, null);
                break;
            case DISPLAY_TEXT:
                // when application is not required to respond, send an immediate response.
                if (!cmdMsg.geTextMessage().responseNeeded) {
                    sendTerminalResponse(cmdParams.mCmdDet, ResultCode.OK, false, 0, null);
                }
                break;
            case REFRESH:
                // ME side only handles refresh commands which meant to remove IDLE
@@ -987,9 +983,14 @@ public class CatService extends Handler implements AppInterface {
                }
                break;
            case DISPLAY_TEXT:
                if (resMsg.mResCode == ResultCode.TERMINAL_CRNTLY_UNABLE_TO_PROCESS) {
                    // For screenbusy case there will be addtional information in the terminal
                    // response. And the value of the additional information byte is 0x01.
                    resMsg.setAdditionalInfo(0x01);
                } else {
                    resMsg.mIncludeAdditionalInfo = false;
                    resMsg.mAdditionalInfo = 0;
                }
                break;
            case LAUNCH_BROWSER:
                break;