diff options
Diffstat (limited to 'java/com/android/incallui/incall')
-rw-r--r-- | java/com/android/incallui/incall/impl/InCallFragment.java | 9 | ||||
-rw-r--r-- | java/com/android/incallui/incall/impl/InCallPagerAdapter.java | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/java/com/android/incallui/incall/impl/InCallFragment.java b/java/com/android/incallui/incall/impl/InCallFragment.java index ac3c57ca9..c5d75329f 100644 --- a/java/com/android/incallui/incall/impl/InCallFragment.java +++ b/java/com/android/incallui/incall/impl/InCallFragment.java @@ -208,8 +208,8 @@ public class InCallFragment extends Fragment } @Override - public void onDestroy() { - super.onDestroy(); + public void onDestroyView() { + super.onDestroyView(); inCallScreenDelegate.onInCallScreenUnready(); } @@ -267,11 +267,14 @@ public class InCallFragment extends Fragment adapter.setAttachments(multimediaData); } - if (adapter.getCount() > 1) { + if (adapter.getCount() > 1 && getResources().getInteger(R.integer.incall_num_rows) > 1) { paginator.setVisibility(View.VISIBLE); paginator.setupWithViewPager(pager); + pager.setSwipingLocked(false); if (!stateRestored) { handler.postDelayed(pagerRunnable, 4_000); + } else { + pager.setCurrentItem(adapter.getButtonGridPosition(), false /* animateScroll */); } } else { paginator.setVisibility(View.GONE); diff --git a/java/com/android/incallui/incall/impl/InCallPagerAdapter.java b/java/com/android/incallui/incall/impl/InCallPagerAdapter.java index 2e2183565..0b1088d2d 100644 --- a/java/com/android/incallui/incall/impl/InCallPagerAdapter.java +++ b/java/com/android/incallui/incall/impl/InCallPagerAdapter.java @@ -41,7 +41,7 @@ public class InCallPagerAdapter extends FragmentStatePagerAdapter { return InCallButtonGridFragment.newInstance(); } else { // TODO: handle fragment invalidation for when the data changes. - return MultimediaFragment.newInstance(attachments, true, false); + return MultimediaFragment.newInstance(attachments, true, false, false); } } |