diff options
author | Jay Shrauner <shrauner@google.com> | 2015-09-14 13:25:29 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2015-09-14 15:30:45 -0700 |
commit | ebe298041c7d3e1c47da3b775b1851df586c3d4b (patch) | |
tree | 5778fd6c0dc9df011f4adc0694753b22f66a9b34 /InCallUI | |
parent | 89fa8c5b9f3bcd0bdf4c3409216b7fe88a1486e4 (diff) |
Fix IllegalStateException in onBackPressed
Check to make sure the activity is still visible before doing anything.
Bug:24049732
Change-Id: I64442c9283b46ecee5972fd217fb790564671167
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallActivity.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index 5fa57f9a1..1098341e3 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -239,6 +239,7 @@ public class InCallActivity extends Activity implements FragmentDisplayManager { @Override protected void onSaveInstanceState(Bundle out) { + mIsVisible = false; // TODO: The dialpad fragment should handle this as part of its own state out.putBoolean(SHOW_DIALPAD_EXTRA, mCallButtonFragment != null && mCallButtonFragment.isDialpadVisible()); @@ -399,6 +400,9 @@ public class InCallActivity extends Activity implements FragmentDisplayManager { // BACK is also used to exit out of any "special modes" of the // in-call UI: + if (!isVisible()) { + return; + } if ((mConferenceManagerFragment == null || !mConferenceManagerFragment.isVisible()) && (mCallCardFragment == null || !mCallCardFragment.isVisible())) { |