diff options
author | Jay Shrauner <shrauner@google.com> | 2015-09-25 14:15:11 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2015-09-25 14:40:29 -0700 |
commit | 867c01eb4f077454a83e366939bca3dd03915ffc (patch) | |
tree | 111cc344761230f72c838f5a28aeb3304f31b2dd | |
parent | 0b81bb2cf3c3eb736e8f692a1fd68fb2d3c47742 (diff) |
Use TransactionSafeActivity
Remove custom visibility tracking.
Bug:24294419
Change-Id: I601c9a1c14db7c53d5c7b4a0acbb41b553e10e96
-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() { |