Index: ui/android/java/src/org/chromium/ui/autofill/AutofillPopup.java |
diff --git a/ui/android/java/src/org/chromium/ui/autofill/AutofillPopup.java b/ui/android/java/src/org/chromium/ui/autofill/AutofillPopup.java |
index 33b4fc7199aa0bee2190eabe2b9dfdd0cfbed2c7..ae3d1c9106981729122162bacca8fef55c4239f1 100644 |
--- a/ui/android/java/src/org/chromium/ui/autofill/AutofillPopup.java |
+++ b/ui/android/java/src/org/chromium/ui/autofill/AutofillPopup.java |
@@ -4,10 +4,12 @@ |
package org.chromium.ui.autofill; |
+import android.annotation.SuppressLint; |
import android.content.Context; |
import android.view.View; |
import android.widget.AdapterView; |
+import org.chromium.base.ApiCompatibilityUtils; |
import org.chromium.ui.DropdownAdapter; |
import org.chromium.ui.DropdownItem; |
import org.chromium.ui.DropdownPopupWindow; |
@@ -75,6 +77,7 @@ public class AutofillPopup extends DropdownPopupWindow implements AdapterView.On |
* Filters the Autofill suggestions to the ones that we support and shows the popup. |
* @param suggestions Autofill suggestion data. |
*/ |
+ @SuppressLint("InlinedApi") |
aurimas (slooooooooow)
2014/08/04 15:19:40
Why do we need to suppress lint here? What is caus
Sungmann Cho
2014/08/04 18:32:16
Because of View.LAYOUT_DIRECTION_[LTR|RTL]. These
aurimas (slooooooooow)
2014/08/05 00:07:20
Right, that means we will not work correctly for p
Sungmann Cho
2014/08/05 00:43:53
View.LAYOUT_DIRECTION_[LTR|RTL] are static final a
|
public void filterAndShow(AutofillSuggestion[] suggestions, boolean isRtl) { |
mSuggestions = new ArrayList<AutofillSuggestion>(Arrays.asList(suggestions)); |
// Remove the AutofillSuggestions with IDs that are not supported by Android |
@@ -91,8 +94,8 @@ public class AutofillPopup extends DropdownPopupWindow implements AdapterView.On |
} |
setAdapter(new DropdownAdapter(mContext, cleanedData, separators)); |
show(); |
- getListView().setLayoutDirection(isRtl ? View.LAYOUT_DIRECTION_RTL : |
- View.LAYOUT_DIRECTION_LTR); |
+ ApiCompatibilityUtils.setLayoutDirection(getListView(), |
+ isRtl ? View.LAYOUT_DIRECTION_RTL : View.LAYOUT_DIRECTION_LTR); |
} |
/** |