Wrong index can disable the STK application unintentionally

ETSI TS 102 223 / 6.6.7 SET-UP MENU mentions that SIM card can send SET-
UP MENU command with 'null' item data object (i.e. length = 00 and no
value part) in order to remove the existing menu. It can unintentionally
remove Android STK application from the application launcher even if
there is another SIM card with STK support inserted in another slot.
That is because of a wrong command handling of StkAppService.

onStart() and handleCmd() have the similar code executed right before
calling StkAppInstaller.unInstall(), but there is a small difference.
onStart() uses the correct index when referring to the state of CAT
Service.

Bug: 33134532
Test: manual - confirmed that the STK app remains on the launcher.

Change-Id: I99c2b11b95a1db47141492b043bde61c1e96b73e
1 file changed