diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-09-11 20:52:31 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-09-12 17:10:04 -0700 |
commit | 3e449ce00ed2d3b271e50bc7a52798f630973bf1 (patch) | |
tree | 94038ccfea9e3412b770b3478853e7f83129c9b5 /core/java/android/preference | |
parent | 2f761760459fe27c8e9f96569bb7f28fc5b58bab (diff) | |
download | frameworks_base-3e449ce00ed2d3b271e50bc7a52798f630973bf1.zip frameworks_base-3e449ce00ed2d3b271e50bc7a52798f630973bf1.tar.gz frameworks_base-3e449ce00ed2d3b271e50bc7a52798f630973bf1.tar.bz2 |
Some fragment stuff:
Fix issue #2975886: Make getTargetFragment() survive rotation events with
retained fragments. We now fix up the fragment pointer when restoring state.
Fix issue #2919928: In PreferenceFragment, addPreferencesFromResources() is
not effective when called after onActivityCreated(). Note to self: do not use
a what code of 0. Maybe that should be documented (I'll do it in gingerbread).
Hopefully implement #2992753: DialogFragment.dismiss will NPE if called too soon
(before attached to activity). We now keep track of the FragmentManager
separately from the activity, and set that as soon as the fragment is part of a
transaction.
Investigate issue #2988876: NPE when device orientation is changed. The NPE is
because of the app trying to do a fragment transaction in onPause(). This is
fundamentally not viable, since (a) the activity will be gone before we ever
have a chance to process the message to commit the transaction, and (b) even if
we did try to commit the transaction earlier, this would be done after
onSaveInstanceState() and thus not work in cases where the activity gets killed
in the background. So instead, we'll just throw an immediate exception if you
try to do this.
Change-Id: Iea62b50eb79f066af2471fce86836d073398f4f7
Diffstat (limited to 'core/java/android/preference')
-rw-r--r-- | core/java/android/preference/PreferenceActivity.java | 4 | ||||
-rw-r--r-- | core/java/android/preference/PreferenceFragment.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/preference/PreferenceActivity.java b/core/java/android/preference/PreferenceActivity.java index c28ccd3..2efb09d 100644 --- a/core/java/android/preference/PreferenceActivity.java +++ b/core/java/android/preference/PreferenceActivity.java @@ -180,8 +180,8 @@ public abstract class PreferenceActivity extends ListActivity implements */ private static final int FIRST_REQUEST_CODE = 100; - private static final int MSG_BIND_PREFERENCES = 0; - private static final int MSG_BUILD_HEADERS = 1; + private static final int MSG_BIND_PREFERENCES = 1; + private static final int MSG_BUILD_HEADERS = 2; private Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { diff --git a/core/java/android/preference/PreferenceFragment.java b/core/java/android/preference/PreferenceFragment.java index 0b5dffe..479497a 100644 --- a/core/java/android/preference/PreferenceFragment.java +++ b/core/java/android/preference/PreferenceFragment.java @@ -106,7 +106,7 @@ public abstract class PreferenceFragment extends Fragment implements */ private static final int FIRST_REQUEST_CODE = 100; - private static final int MSG_BIND_PREFERENCES = 0; + private static final int MSG_BIND_PREFERENCES = 1; private Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { |