diff options
Diffstat (limited to 'src/com/android/browser/AutoFillSettingsFragment.java')
-rw-r--r-- | src/com/android/browser/AutoFillSettingsFragment.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/android/browser/AutoFillSettingsFragment.java b/src/com/android/browser/AutoFillSettingsFragment.java index 141de34..04f45b5 100644 --- a/src/com/android/browser/AutoFillSettingsFragment.java +++ b/src/com/android/browser/AutoFillSettingsFragment.java @@ -116,16 +116,21 @@ public class AutoFillSettingsFragment extends Fragment { mHandler = new Handler() { @Override public void handleMessage(Message msg) { + Context c = getActivity(); switch (msg.what) { case PROFILE_SAVED_MSG: - Toast.makeText(getActivity(), R.string.autofill_profile_successful_save, - Toast.LENGTH_SHORT).show(); - closeEditor(); + if (c != null) { + Toast.makeText(c, R.string.autofill_profile_successful_save, + Toast.LENGTH_SHORT).show(); + closeEditor(); + } break; case PROFILE_DELETED_MSG: - Toast.makeText(getActivity(), R.string.autofill_profile_successful_delete, - Toast.LENGTH_SHORT).show(); + if (c != null) { + Toast.makeText(c, R.string.autofill_profile_successful_delete, + Toast.LENGTH_SHORT).show(); + } break; } } |