Skip to content

Commit

Permalink
Fix carrier config option not hidden on a CDMA phone
Browse files Browse the repository at this point in the history
 * The option is added twice, from GsmUmtsOptions and CdmaOptions, and
   GsmUmtsOptions unconditionally adds it if current phone type is not
   GSM. This is obviously wrong, and on a CDMA phone the option persists
   even if it's disabled from CarrierConfig. Once a user selects it,
   phone app will crash.
 * To fix it, reverse the initial value of the boolean, so that
   GsmUmtsOptions won't add the option if current phone type is not GSM.

Change-Id: I5a9939bf43a4c17807a0171861a1a76029f5379d
  • Loading branch information
moetayuko authored and Darkstar085 committed Oct 10, 2019
1 parent 02f5662 commit e01427d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/android/phone/GsmUmtsOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public GsmUmtsOptions(PreferenceFragment prefFragment, PreferenceScreen prefScre
protected void update(final int subId) {
boolean addAPNExpand = true;
boolean addNetworkOperatorsCategory = true;
boolean addCarrierSettings = true;
boolean addCarrierSettings = false;
final TelephonyManager telephonyManager = TelephonyManager.from(mPrefFragment.getContext())
.createForSubscriptionId(subId);
if (telephonyManager.getPhoneType() != PhoneConstants.PHONE_TYPE_GSM) {
Expand Down

0 comments on commit e01427d

Please sign in to comment.