diff options
author | Takanori Nakano <takanori.x.nakano@sonymobile.com> | 2016-08-15 19:18:16 +0900 |
---|---|---|
committer | Yoshiaki Naka <yoshiaki.naka@sony.com> | 2017-10-25 17:25:11 +0900 |
commit | c8054ba2f7a8ba2c88d5b94ff8730fceea8833fa (patch) | |
tree | 950d57f124d4bad68d73e3093e247222c0297501 /src/com/android/stk/StkLauncherActivity.java | |
parent | bd458daea6a50eb7f2f3da2e04648552f228cc43 (diff) | |
download | Stk-c8054ba2f7a8ba2c88d5b94ff8730fceea8833fa.tar.gz |
Support preset STK names and icons for MSIM model
This change provides an easy way to replace the STK application name and
icon displayed on the launcher activity with preset resources. There are
many SIM cards in the market that send SET-UP MENU command with no alpha
identifier. This change improves the usability of multi-SIM models in
such cases.
Bug: 31295893
Change-Id: I437fa761cdd8bf47eee660c7bb2828b84c91e8af
Diffstat (limited to 'src/com/android/stk/StkLauncherActivity.java')
-rw-r--r--[-rwxr-xr-x] | src/com/android/stk/StkLauncherActivity.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/stk/StkLauncherActivity.java b/src/com/android/stk/StkLauncherActivity.java index 8502c01..9d2f60f 100755..100644 --- a/src/com/android/stk/StkLauncherActivity.java +++ b/src/com/android/stk/StkLauncherActivity.java @@ -185,7 +185,16 @@ public class StkLauncherActivity extends ListActivity { mSingleSimId = i; stkItemName = new StringBuilder(menu.title == null ? appName : menu.title) .append(" ").append(Integer.toString(i + 1)).toString(); - Item item = new Item(i, stkItemName, mBitMap); + // Display the default application icon if there is no icon specified by SET-UP + // MENU command nor preset. + Bitmap icon = mBitMap; + if (menu.titleIcon != null) { + icon = menu.titleIcon; + if (menu.titleIconSelfExplanatory) { + stkItemName = null; + } + } + Item item = new Item(i, stkItemName, icon); mStkMenuList.add(item); } else { CatLog.d(LOG_TAG, "SIM #" + (i + 1) + " does not have main menu."); |