Always set right auth_type value in apn.
It fixes a bug that automatically sets auth_type value of editing apn that has and should have that value set to null (-1 = Not yet set) to auth_type value of an apn previously displayed in the apn editor. It is caused by careless persisting and reading data from SharedPreferences. Fixed to keep and persist (to be consistent with other apn's Preferences) null value for not yet set auth_type property. Change-Id: I4e125a4cdbad968c9f6ea8781a8c849f4c31c929
This commit is contained in:
committed by
Johan Redestig
parent
b84291bbec
commit
1929008ac5
@@ -234,6 +234,8 @@ public class ApnEditor extends PreferenceActivity
|
|||||||
int authVal = mCursor.getInt(AUTH_TYPE_INDEX);
|
int authVal = mCursor.getInt(AUTH_TYPE_INDEX);
|
||||||
if (authVal != -1) {
|
if (authVal != -1) {
|
||||||
mAuthType.setValueIndex(authVal);
|
mAuthType.setValueIndex(authVal);
|
||||||
|
} else {
|
||||||
|
mAuthType.setValue(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user