OSDN Git Service

Fix issues #4087362 and #4087356
authorDianne Hackborn <hackbod@google.com>
Fri, 11 Mar 2011 21:17:57 +0000 (13:17 -0800)
committerDianne Hackborn <hackbod@google.com>
Fri, 11 Mar 2011 21:48:32 +0000 (13:48 -0800)
commitcf407ad88bef3bc640489b300f23eaa8ea0b724e
treee4690beb12fc2a68a7466a08a0a302fa41b2fdb3
parent0eb7b697b7c180660647b5cd0cd7dd067f6b6abb
Fix issues #4087362 and #4087356

4087362: Provide a safer way to call DialogFragment.dismiss()
4087356: PreferenceActivity.invalidateHeaders() can cause
IllegalStateException: Can not perform this action after onSaveInstanceState

These are very safe; the first is just a new public API that
allows you to use an existing feature in DialogFragment, and the
second just uses the version of commit that avoids the failure if
happening at a point where the operation would be lost if restored
from the last state (which is no big deal for preferences).

Change-Id: I53971c9fb1efdcd599694cdcd4585b81afc156b8
api/current.xml
core/java/android/app/DialogFragment.java
core/java/android/preference/PreferenceActivity.java