summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dialer/calllog/CallLogActivity.java11
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);