diff options
author | Tyler Gunn <tgunn@google.com> | 2015-10-13 13:55:14 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2015-10-13 13:55:14 -0700 |
commit | 8a0410bd909cee70e8d0aeb0305d5bacee5c5c31 (patch) | |
tree | ca28f522bdd088f952428d532206dc0d46b2fb1a | |
parent | e8738a0bca78e63796f8faef1a376d8fe4f921d4 (diff) | |
parent | 73b1210e9001dd2e37d76aafeb1c35e045609c14 (diff) |
resolved conflicts for 73b1210e to master
Change-Id: I329945c115b8a7dbe759213b9fd9bcef01b8073d
-rw-r--r-- | src/com/android/dialer/calllog/CallLogActivity.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/com/android/dialer/calllog/CallLogActivity.java b/src/com/android/dialer/calllog/CallLogActivity.java index 2bcd8d492..c1923b2e4 100644 --- a/src/com/android/dialer/calllog/CallLogActivity.java +++ b/src/com/android/dialer/calllog/CallLogActivity.java @@ -40,6 +40,7 @@ import com.android.contacts.commonbind.analytics.AnalyticsUtil; import com.android.dialer.DialtactsActivity; import com.android.dialer.R; import com.android.dialer.TransactionSafeActivity; +import com.android.dialer.util.DialerUtils; public class CallLogActivity extends TransactionSafeActivity implements ViewPager.OnPageChangeListener { private ViewPager mViewPager; @@ -63,8 +64,13 @@ public class CallLogActivity extends TransactionSafeActivity implements ViewPage } @Override + public long getItemId(int position) { + return getRtlPosition(position); + } + + @Override public Fragment getItem(int position) { - switch (position) { + switch (getRtlPosition(position)) { case TAB_INDEX_ALL: return new CallLogFragment( CallLogQueryHandler.CALL_TYPE_ALL, true /* isCallLogActivity */); @@ -233,4 +239,11 @@ public class CallLogActivity extends TransactionSafeActivity implements ViewPage } return null; } + + private int getRtlPosition(int position) { + if (DialerUtils.isRtl()) { + return mViewPagerAdapter.getCount() - 1 - position; + } + return position; + } } |