diff options
author | Jay Shrauner <shrauner@google.com> | 2015-09-25 14:13:16 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2015-09-25 14:13:16 -0700 |
commit | 193cfc5458c5c2bb1f9800c98f179292732aa0a8 (patch) | |
tree | 7435910793f6cece645382f60800c07922b67e4e /src/com/android/dialer/DialtactsActivity.java | |
parent | c2fbff362cff30cf547248240e4e4cf2ae8a3c7d (diff) |
Use TransactionSafeActivity
Remove custom visibility tracking.
Bug:24294419
Change-Id: I2ef53549e7d8c07e92319bc57c4aebd05edb8ea6
Diffstat (limited to 'src/com/android/dialer/DialtactsActivity.java')
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 24 |
1 files changed, 1 insertions, 23 deletions
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. */ @@ -564,25 +562,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O } @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) { hideDialpadAndSearchUi(); @@ -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; } |