diff options
author | Takanori Nakano <takanori.x.nakano@sonymobile.com> | 2016-03-31 20:10:30 +0900 |
---|---|---|
committer | Zoran Jovanovic <zoran.jovanovic@sonymobile.com> | 2016-06-02 12:30:00 +0000 |
commit | 89e5d46f1876a0d49e8a079da96b490088ab09fa (patch) | |
tree | 3578508490ad7431f829fd024d414360690e22c2 /src/com/android/stk/StkLauncherActivity.java | |
parent | 739b69922b3a1551f1792820ca46a53f689b7206 (diff) | |
download | Stk-89e5d46f1876a0d49e8a079da96b490088ab09fa.tar.gz |
Show the menu title instead of the application name if it is available
Show the menu title on the launcher activity if it is provided by
SET-UP MENU command. This change improves the usability of MSIM
products as requested by operators.
Bug: 29030384
Change-Id: Ida2de5204df4575ecab95cc5533c66785e6e597c
Diffstat (limited to 'src/com/android/stk/StkLauncherActivity.java')
-rw-r--r-- | src/com/android/stk/StkLauncherActivity.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/stk/StkLauncherActivity.java b/src/com/android/stk/StkLauncherActivity.java index 73529e9..6c5b88c 100644 --- a/src/com/android/stk/StkLauncherActivity.java +++ b/src/com/android/stk/StkLauncherActivity.java @@ -161,6 +161,8 @@ public class StkLauncherActivity extends ListActivity { private int addStkMenuListItems() { String appName = mContext.getResources().getString(R.string.app_name); + StkAppService appService = StkAppService.getInstance(); + String stkMenuTitle = null; String stkItemName = null; int simCount = TelephonyManager.from(mContext).getSimCount(); mStkMenuList = new ArrayList<Item>(); @@ -171,8 +173,9 @@ public class StkLauncherActivity extends ListActivity { if (mTm.hasIccCard(i)) { CatLog.d(LOG_TAG, "SIM " + i + " add to menu."); mSingleSimId = i; - stkItemName = new StringBuilder(appName).append(" ") - .append(Integer.toString(i + 1)).toString(); + stkMenuTitle = appService.getMainMenu(i).title; + stkItemName = new StringBuilder(stkMenuTitle == null ? appName : stkMenuTitle) + .append(" ").append(Integer.toString(i + 1)).toString(); Item item = new Item(i + 1, stkItemName, mBitMap); item.id = i; mStkMenuList.add(item); |