diff options
| author | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-01-29 15:29:30 +0000 |
|---|---|---|
| committer | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-01-29 15:29:30 +0000 |
| commit | f61ae6022e9c659a6b9086b061a00b7fce51ed08 (patch) | |
| tree | 72fcc75cc11c95f3a9aa87ddb284bc67fa3c0700 | |
| parent | e2d12df2031b550ca7881751d18f17e51ab4e463 (diff) | |
| download | android_packages_apps_Stk-f61ae6022e9c659a6b9086b061a00b7fce51ed08.tar.gz android_packages_apps_Stk-f61ae6022e9c659a6b9086b061a00b7fce51ed08.tar.bz2 android_packages_apps_Stk-f61ae6022e9c659a6b9086b061a00b7fce51ed08.zip | |
Launcher: Present STK app name if possible
Instead of opening up the msim menu with generic "SIM Toolkit number"
items, try to present the title from the in-SIM app. Fallback to
the generic label if the menu title isn't there
Change-Id: Iea0c6152433be39c4eef0f7e659ef93018cc4d17
| -rw-r--r-- | src/com/android/stk/StkLauncherActivity.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/stk/StkLauncherActivity.java b/src/com/android/stk/StkLauncherActivity.java index 0069c0f..5310f82 100644 --- a/src/com/android/stk/StkLauncherActivity.java +++ b/src/com/android/stk/StkLauncherActivity.java @@ -170,14 +170,19 @@ public class StkLauncherActivity extends ListActivity { for (int i = 0; i < simCount; i++) { //Check if the card is inserted. if (mTm.hasIccCard(i)) { + Menu mStkMenu = null; if(appService == null || appService.getMainMenu(i) == null) { CatLog.d(LOG_TAG, "SIM " + i + " main menu of STK in the card is null"); continue; } CatLog.d(LOG_TAG, "SIM " + i + " add to menu."); mSingleSimId = i; - stkItemName = new StringBuilder(appName).append(" ") + mStkMenu = appService.getMainMenu(i); + stkItemName = mStkMenu.title; + if (stkItemName == null) { + stkItemName = new StringBuilder(appName).append(" ") .append(Integer.toString(i + 1)).toString(); + } Item item = new Item(i + 1, stkItemName, mBitMap); item.id = i; mStkMenuList.add(item); |
