diff options
-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 1f6c49066..97e601630 100644 --- a/src/com/android/dialer/calllog/CallLogActivity.java +++ b/src/com/android/dialer/calllog/CallLogActivity.java @@ -39,6 +39,7 @@ import com.android.contacts.common.util.PermissionsUtil; import com.android.contacts.commonbind.analytics.AnalyticsUtil; import com.android.dialer.DialtactsActivity; import com.android.dialer.R; +import com.android.dialer.util.DialerUtils; import com.android.dialer.voicemail.VoicemailStatusHelper; import com.android.dialer.voicemail.VoicemailStatusHelperImpl; @@ -64,8 +65,13 @@ public class CallLogActivity extends Activity implements ViewPager.OnPageChangeL } @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); case TAB_INDEX_MISSED: @@ -229,4 +235,11 @@ public class CallLogActivity extends Activity implements ViewPager.OnPageChangeL } return null; } + + private int getRtlPosition(int position) { + if (DialerUtils.isRtl()) { + return mViewPagerAdapter.getCount() - 1 - position; + } + return position; + } } |