Check for null mReadOnlyApnTypes.

Test: none
Bug: 62247121
Change-Id: I6866bf2df8d4cb46dd75b94ab88c1e62e65ddda7
This commit is contained in:
Amit Mahajan
2017-06-01 16:39:40 -07:00
parent 607e684f64
commit 2bfc9906c1

View File

@@ -1056,7 +1056,7 @@ public class ApnEditor extends SettingsPreferenceFragment
if (errorMsg == null) {
// if carrier does not allow editing certain apn types, make sure type does not include
// those
if (mReadOnlyApnTypes.length > 0
if (!ArrayUtils.isEmpty(mReadOnlyApnTypes)
&& apnTypesMatch(mReadOnlyApnTypes, mApnType.getText())) {
StringBuilder stringBuilder = new StringBuilder();
for (String type : mReadOnlyApnTypes) {