[Android] Expose isSystemLayoutDirectionRtl() to c++.
commit5734ee6e32127842abd3def5a3fc3b97eade918e
authorkkimlabs@chromium.org <kkimlabs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 20 Feb 2014 21:57:20 +0000 (20 21:57 +0000)
committerkkimlabs@chromium.org <kkimlabs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 20 Feb 2014 21:57:20 +0000 (20 21:57 +0000)
tree4b951c8fe26443665528e360ba38685cb827eaf0
parent884ccf1aaf9733d3b32231cc4106783fc589638b
[Android] Expose isSystemLayoutDirectionRtl() to c++.

On Android, locale direction is not necessarily UI layout
direction. For example, Hebrew on 4.1 is still LTR layout
because RTL layout direction support is from 4.2. So in
general, we should rely on layout direction, not locale.

Phone tab switcher was using IsRTL() function which only
depends on locale. So expose isSystemLayoutDirectionRtl()
to c++ world so that we can fix the phone tab switcher
layout direction.

In addition, we cache the layout direction.

NOTRY=true
BUG=320120

Review URL: https://codereview.chromium.org/160733002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252390 0039d316-1c4b-4281-b951-d872f2087c98
base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
ui/android/java/src/org/chromium/ui/base/LocalizationUtils.java
ui/base/l10n/l10n_util_android.cc
ui/base/l10n/l10n_util_android.h