Fix account settings crash.

The check settings fragment could potentially take a while to finish,
and may finish after the activity has shut down. Ensure that the
callbacks don't go through if that happens (usually means the user
backed out before it finished)
Bug: 4689161

Change-Id: Ie8e052f03a8f8f2884c0fe1e334a91c02444f96c
This commit is contained in:
Ben Komalo 2011-06-30 15:38:34 -07:00
parent 09e7fffb2a
commit 6fc2585327

View File

@ -158,6 +158,14 @@ public abstract class AccountServerBaseFragment extends Fragment
mContext = activity;
}
@Override
public void onDetach() {
super.onDetach();
// Ensure that we don't have any callbacks at this point.
mCallback = EmptyCallback.INSTANCE;
}
@Override
public void onPause() {
// Hide the soft keyboard if we lose focus