diff options
Diffstat (limited to 'java/com/android/dialer/app/calllog')
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogFragment.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogFragment.java b/java/com/android/dialer/app/calllog/CallLogFragment.java index 8ed924d76..a82afa5fe 100644 --- a/java/com/android/dialer/app/calllog/CallLogFragment.java +++ b/java/com/android/dialer/app/calllog/CallLogFragment.java @@ -411,11 +411,18 @@ public class CallLogFragment extends Fragment mAdapter.onResume(); rescheduleDisplayUpdate(); + // onResume() may also be called as a "side" page on the ViewPager, which is not visible. + if (getUserVisibleHint()) { + onVisible(); + } } @Override public void onPause() { LogUtil.enterBlock("CallLogFragment.onPause"); + if (getUserVisibleHint()) { + onNotVisible(); + } cancelDisplayUpdate(); mAdapter.onPause(); super.onPause(); @@ -594,7 +601,7 @@ public class CallLogFragment extends Fragment @CallSuper public void onVisible() { LogUtil.enterBlock("CallLogFragment.onPageSelected"); - if (getActivity() != null) { + if (getActivity() != null && getActivity() instanceof HostInterface) { ((HostInterface) getActivity()) .enableFloatingButton(mModalAlertManager == null || mModalAlertManager.isEmpty()); } |