diff options
author | Yoshiaki Naka <yoshiaki.naka@sony.com> | 2020-01-24 15:27:48 +0900 |
---|---|---|
committer | Yoshiaki Naka <yoshiaki.naka@sony.com> | 2020-01-24 23:43:02 +0000 |
commit | 97fccaea855d4bb41495eb2707905a02744dca2c (patch) | |
tree | a66d2f85dfdd154348a545f624062c80b61e4090 /src | |
parent | 4f5cc5e43da1ca2df851cf12f1408fcb846cb840 (diff) | |
download | Stk-97fccaea855d4bb41495eb2707905a02744dca2c.tar.gz |
Consider that inactive Modem can be activated in run time
The number of the active Modems can be changed in run time. In order to
avoid ArrayIndexOutOfBoundsException thrown, the length of the array for
caching the last selected configuration entries must be determined based
on the number of the Modems supported on the device.
Bug: 148240558
Test: Manual
Change-Id: I810db3194a8762f0157395624ccde21ff3e71e76
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/stk/StkMenuConfig.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/stk/StkMenuConfig.java b/src/com/android/stk/StkMenuConfig.java index 5414a6a..b65b3c8 100644 --- a/src/com/android/stk/StkMenuConfig.java +++ b/src/com/android/stk/StkMenuConfig.java @@ -153,7 +153,7 @@ public class StkMenuConfig { private void initialize(Context context) { mContext = context; mArray = new ArrayList<Config>(); - mConfigs = new Config[TelephonyManager.from(mContext).getSimCount()]; + mConfigs = new Config[TelephonyManager.from(mContext).getSupportedModemCount()]; XmlResourceParser parser = mContext.getResources().getXml(R.xml.menu_conf); |