OSDN Git Service

Always set right auth_type value in apn.
authorMarta Białka <marta.bialka@sonyericsson.com>
Mon, 25 Oct 2010 13:39:04 +0000 (15:39 +0200)
committerJohan Redestig <johan.redestig@sonyericsson.com>
Mon, 25 Oct 2010 13:39:04 +0000 (15:39 +0200)
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

src/com/android/settings/ApnEditor.java

index 72dba1a..3f0c02f 100644 (file)
@@ -234,6 +234,8 @@ public class ApnEditor extends PreferenceActivity
             int authVal = mCursor.getInt(AUTH_TYPE_INDEX);
             if (authVal != -1) {
                 mAuthType.setValueIndex(authVal);
+            } else {
+                mAuthType.setValue(null);
             }
 
         }