diff options
author | Yorke Lee <yorkelee@google.com> | 2015-04-16 15:10:32 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-04-16 15:10:32 -0700 |
commit | ff1769fb36ae7d4968672d5326b48310b489bc99 (patch) | |
tree | 73cd9781d45395d4e8322cb2c0ce52daa28b4a5a | |
parent | b5f47c523d1636218b5b2b555cee257eb27eeeb8 (diff) |
Remove use of private isResumed API
Change-Id: I3ad2277b4822d219bd53b35914befb4a4d52b45b
-rw-r--r-- | src/com/android/dialer/calllog/CallLogActivity.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/dialer/calllog/CallLogActivity.java b/src/com/android/dialer/calllog/CallLogActivity.java index 33e72bc12..c4e16a1b7 100644 --- a/src/com/android/dialer/calllog/CallLogActivity.java +++ b/src/com/android/dialer/calllog/CallLogActivity.java @@ -66,6 +66,8 @@ public class CallLogActivity extends Activity implements CallLogQueryHandler.Lis private boolean mHasActiveVoicemailProvider; + private boolean mIsResumed; + private final Runnable mWaitForVoicemailTimeoutRunnable = new Runnable() { @Override public void run() { @@ -188,6 +190,7 @@ public class CallLogActivity extends Activity implements CallLogQueryHandler.Lis @Override protected void onResume() { + mIsResumed = true; super.onResume(); CallLogQueryHandler callLogQueryHandler = new CallLogQueryHandler(this.getContentResolver(), this); @@ -196,6 +199,12 @@ public class CallLogActivity extends Activity implements CallLogQueryHandler.Lis } @Override + protected void onPause() { + mIsResumed = false; + super.onPause(); + } + + @Override public boolean onCreateOptionsMenu(Menu menu) { final MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.call_log_options, menu); @@ -264,7 +273,7 @@ public class CallLogActivity extends Activity implements CallLogQueryHandler.Lis @Override public void onPageSelected(int position) { - if (isResumed()) { + if (mIsResumed) { sendScreenViewForChildFragment(position); } mViewPagerTabs.onPageSelected(position); |