diff options
author | Jay Shrauner <shrauner@google.com> | 2015-09-28 18:49:38 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-09-28 18:49:38 +0000 |
commit | b9dbc1728172c5ff767e88947f3665c71e8ca359 (patch) | |
tree | fa6cfa4c805aff40149eed8437eb5c8291a32992 /InCallUI | |
parent | da7649f52ef39f0cd5e55ca422e6fbe9ff6c9ec5 (diff) | |
parent | 867c01eb4f077454a83e366939bca3dd03915ffc (diff) |
Merge "Use TransactionSafeActivity" into ub-contactsdialer-a-dev
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallActivity.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index 1098341e3..6b80fe02e 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -51,6 +51,7 @@ import android.view.accessibility.AccessibilityEvent; import com.android.phone.common.animation.AnimUtils; import com.android.phone.common.animation.AnimationListenerAdapter; +import com.android.contacts.common.activity.TransactionSafeActivity; import com.android.contacts.common.interactions.TouchPointManager; import com.android.contacts.common.widget.SelectPhoneAccountDialogFragment; import com.android.contacts.common.widget.SelectPhoneAccountDialogFragment.SelectPhoneAccountListener; @@ -63,7 +64,7 @@ import java.util.Locale; /** * Main activity that the user interacts with while in a live call. */ -public class InCallActivity extends Activity implements FragmentDisplayManager { +public class InCallActivity extends TransactionSafeActivity implements FragmentDisplayManager { public static final String TAG = InCallActivity.class.getSimpleName(); @@ -84,7 +85,6 @@ public class InCallActivity extends Activity implements FragmentDisplayManager { private ConferenceManagerFragment mConferenceManagerFragment; private FragmentManager mChildFragmentManager; - private boolean mIsVisible; private AlertDialog mDialog; /** Use to pass 'showDialpad' from {@link #onNewIntent} to {@link #onResume} */ @@ -239,7 +239,6 @@ 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()); @@ -254,8 +253,6 @@ public class InCallActivity extends Activity implements FragmentDisplayManager { Log.d(this, "onStart()..."); super.onStart(); - mIsVisible = true; - if (mOrientationEventListener.canDetectOrientation()) { Log.v(this, "Orientation detection enabled."); mOrientationEventListener.enable(); @@ -314,7 +311,6 @@ public class InCallActivity extends Activity implements FragmentDisplayManager { @Override protected void onStop() { Log.d(this, "onStop()..."); - mIsVisible = false; InCallPresenter.getInstance().updateIsChangingConfigurations(); InCallPresenter.getInstance().onActivityStopped(); mOrientationEventListener.disable(); @@ -353,10 +349,10 @@ public class InCallActivity extends Activity implements FragmentDisplayManager { } /** - * Returns true when the Activity is currently visible (between onStart and onStop). + * Returns true when the Activity is currently visible. */ /* package */ boolean isVisible() { - return mIsVisible; + return isSafeToCommitTransactions(); } private boolean hasPendingDialogs() { |