From 193cfc5458c5c2bb1f9800c98f179292732aa0a8 Mon Sep 17 00:00:00 2001 From: Jay Shrauner Date: Fri, 25 Sep 2015 14:13:16 -0700 Subject: Use TransactionSafeActivity Remove custom visibility tracking. Bug:24294419 Change-Id: I2ef53549e7d8c07e92319bc57c4aebd05edb8ea6 --- src/com/android/dialer/DialtactsActivity.java | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'src/com/android/dialer/DialtactsActivity.java') diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index fe828a3bb..4febd9684 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -158,8 +158,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O */ private SmartDialSearchFragment mSmartDialSearchFragment; - private boolean mIsVisible; - /** * Animation that slides in. */ @@ -563,25 +561,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O mIsRestarting = true; } - @Override - protected void onStart() { - super.onStart(); - mIsVisible = true; - } - - @Override - protected void onStop() { - mIsVisible = false; - super.onStop(); - } - - /** - * Returns true when the Activity is currently visible (between onStart and onStop). - */ - /* package */ boolean isVisible() { - return mIsVisible; - } - @Override protected void onPause() { if (mClearSearchOnPause) { @@ -596,7 +575,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O @Override protected void onSaveInstanceState(Bundle outState) { - mIsVisible = false; super.onSaveInstanceState(outState); outState.putString(KEY_SEARCH_QUERY, mSearchQuery); outState.putBoolean(KEY_IN_REGULAR_SEARCH_UI, mInRegularSearch); @@ -669,7 +647,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O @Override public boolean onMenuItemClick(MenuItem item) { - if (!isVisible()) { + if (!isSafeToCommitTransactions()) { return true; } -- cgit v1.2.3