diff options
Diffstat (limited to 'core/java/android/preference/Preference.java')
-rw-r--r-- | core/java/android/preference/Preference.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/preference/Preference.java b/core/java/android/preference/Preference.java index dde6493..36d676a 100644 --- a/core/java/android/preference/Preference.java +++ b/core/java/android/preference/Preference.java @@ -1195,7 +1195,14 @@ public class Preference implements Comparable<Preference>, OnDependencyChangeLis private void tryCommit(SharedPreferences.Editor editor) { if (mPreferenceManager.shouldCommit()) { - editor.apply(); + try { + editor.apply(); + } catch (AbstractMethodError unused) { + // The app injected its own pre-Gingerbread + // SharedPreferences.Editor implementation without + // an apply method. + editor.commit(); + } } } |