Fix an incorrect display position of error popup in RTL layout

Symptom:
The display position of error popup is incorrect in RTL layout such as
Arabic language.

Root cause:
In LTR layout, a popup window is anchored to the bottom-left corner of
the anchor view. But in RTL layout, it's anchored to the bottom-right.
showError calculates a position for RTL by itself and it gets a wrong
result.

Solution:
Set the base alignment of the error popup to the bottom-left even though
it's in RTL.

Bug: 69402857
Change-Id: Iae099984e6c47feca078658ddc44ab905995fe0d
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 6374aa2..7a2e478 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -488,7 +488,8 @@
         chooseSize(mErrorPopup, mError, tv);
         tv.setText(mError);
 
-        mErrorPopup.showAsDropDown(mTextView, getErrorX(), getErrorY());
+        mErrorPopup.showAsDropDown(mTextView, getErrorX(), getErrorY(),
+                Gravity.TOP | Gravity.LEFT);
         mErrorPopup.fixDirection(mErrorPopup.isAboveAnchor());
     }