From 1929008ac5b45af96f2175b5232c3c66d2474f52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Bia=C5=82ka?= Date: Mon, 25 Oct 2010 15:39:04 +0200 Subject: [PATCH] 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 --- src/com/android/settings/ApnEditor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/android/settings/ApnEditor.java b/src/com/android/settings/ApnEditor.java index 72dba1ab4dd..3f0c02fb73c 100644 --- a/src/com/android/settings/ApnEditor.java +++ b/src/com/android/settings/ApnEditor.java @@ -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); } }