OSDN Git Service

Fix bug #16957601 Stability: ISE in Settings: Observer com.android.settings.
authorFabrice Di Meglio <fdimeglio@google.com>
Wed, 13 Aug 2014 17:45:19 +0000 (10:45 -0700)
committerFabrice Di Meglio <fdimeglio@google.com>
Thu, 14 Aug 2014 18:01:42 +0000 (18:01 +0000)
commitd83b3c2a39e4716b4a4276b8b8ce0db2b9a62b9e
treeeea3d31d1783111c9f82f5c82a4f1cfcdf45eeda
parent841f760fd7345ef2d84b9409c27e36c2365a3de4
Fix bug #16957601 Stability: ISE in Settings: Observer com.android.settings.
SettingsPreferenceFragment$1@273c8fdb was not registered

- add override for onUnbindPreferences() that will unregister the observer
if needed
- keep track of the root adapter so that we can unregister / register with
the correct one (by having a new PreferenceScreen the root adapter would not
be the same and thus unregistering the Observer on the new one would not work
and create the current bug)

Change-Id: I2cef0398c2ae0ab4f5ffd67ca20e8874be997bf6
src/com/android/settings/SettingsPreferenceFragment.java