Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Unified Diff: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java

Issue 1170843002: [Andorid] Migrate to ClipDrawable progress bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
diff --git a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
index b3eff94e81d69888712ea5aa535e66d4f734a446..2817deeb94f8c13ff94de3daac0c265f1278a1fc 100644
--- a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
+++ b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
@@ -61,6 +61,18 @@ public class ApiCompatibilityUtils {
}
/**
+ * @see View#getLayoutDirection()
+ */
+ public static int getLayoutDirection(View view) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
+ return view.getLayoutDirection();
+ } else {
+ // All layouts are LTR before JB MR1.
+ return View.LAYOUT_DIRECTION_LTR;
+ }
+ }
+
+ /**
* @return True if the running version of the Android supports printing.
*/
public static boolean isPrintingSupported() {

Powered by Google App Engine
This is Rietveld 408576698