Hide RTL related APIs
Change-Id: Idda458fcdebe7afeb9b95e328e552fcbc7939157
diff --git a/api/current.txt b/api/current.txt
index f8b7bd9..d29b406 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -8893,7 +8893,6 @@
method public int getMinimumWidth();
method public abstract int getOpacity();
method public boolean getPadding(android.graphics.Rect);
- method public int getResolvedLayoutDirectionSelf();
method public int[] getState();
method public android.graphics.Region getTransparentRegion();
method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
@@ -8928,10 +8927,6 @@
method public abstract void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
}
- public static abstract interface Drawable.Callback2 implements android.graphics.drawable.Drawable.Callback {
- method public abstract int getResolvedLayoutDirection(android.graphics.drawable.Drawable);
- }
-
public static abstract class Drawable.ConstantState {
ctor public Drawable.ConstantState();
method public abstract int getChangingConfigurations();
@@ -22662,7 +22657,7 @@
method public void recycle();
}
- public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback2 android.view.KeyEvent.Callback {
+ public class View implements android.view.accessibility.AccessibilityEventSource android.view.KeyEvent.Callback {
ctor public View(android.content.Context);
ctor public View(android.content.Context, android.util.AttributeSet);
ctor public View(android.content.Context, android.util.AttributeSet, int);
@@ -22679,7 +22674,6 @@
method public void buildDrawingCache();
method public void buildDrawingCache(boolean);
method public void buildLayer();
- method protected boolean canResolveLayoutDirection();
method public boolean canScrollHorizontally(int);
method public boolean canScrollVertically(int);
method public void cancelLongPress();
@@ -22791,7 +22785,6 @@
method public final android.view.ViewParent getParent();
method public float getPivotX();
method public float getPivotY();
- method public int getResolvedLayoutDirection(android.graphics.drawable.Drawable);
method public android.content.res.Resources getResources();
method public final int getRight();
method protected float getRightFadingEdgeStrength();
@@ -22856,7 +22849,6 @@
method public boolean isHovered();
method public boolean isInEditMode();
method public boolean isInTouchMode();
- method protected static boolean isLayoutDirectionRtl(java.util.Locale);
method public boolean isLayoutRequested();
method public boolean isLongClickable();
method public boolean isOpaque();
@@ -22942,10 +22934,8 @@
method public void requestLayout();
method public boolean requestRectangleOnScreen(android.graphics.Rect);
method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean);
- method protected void resetResolvedTextDirection();
method public static int resolveSize(int, int);
method public static int resolveSizeAndState(int, int, int);
- method protected void resolveTextDirection();
method public void restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>);
method public void saveHierarchyState(android.util.SparseArray<android.os.Parcelable>);
method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
@@ -23046,7 +23036,6 @@
method public boolean willNotCacheDrawing();
method public boolean willNotDraw();
field public static android.util.Property ALPHA;
- field protected static int DEFAULT_TEXT_DIRECTION;
field public static final int DRAWING_CACHE_QUALITY_AUTO = 0; // 0x0
field public static final int DRAWING_CACHE_QUALITY_HIGH = 1048576; // 0x100000
field public static final int DRAWING_CACHE_QUALITY_LOW = 524288; // 0x80000
@@ -23375,6 +23364,7 @@
method public boolean requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent);
method public void requestTransparentRegion(android.view.View);
method protected void resetResolvedLayoutDirection();
+ method protected void resetResolvedTextDirection();
method public void scheduleLayoutAnimation();
method public void setAddStatesFromChildren(boolean);
method public void setAlwaysDrawnWithCacheEnabled(boolean);
@@ -27172,6 +27162,7 @@
method protected void resetResolvedDrawables();
method protected void resetResolvedLayoutDirection();
method protected void resolveDrawables();
+ method protected void resolveTextDirection();
method public void setAllCaps(boolean);
method public final void setAutoLinkMask(int);
method public void setCompoundDrawablePadding(int);
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index fa1d249..386832f 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -2591,6 +2591,8 @@
/**
* Default text direction is inherited
+ *
+ * @hide
*/
protected static int DEFAULT_TEXT_DIRECTION = TEXT_DIRECTION_INHERIT;
@@ -9304,6 +9306,11 @@
recomputePadding();
}
+ /**
+ * Return true if layout direction resolution can be done
+ *
+ * @hide
+ */
protected boolean canResolveLayoutDirection() {
switch (getLayoutDirection()) {
case LAYOUT_DIRECTION_INHERIT:
@@ -9332,6 +9339,8 @@
*
* @param locale Locale to check
* @return true if a Locale is corresponding to a RTL script.
+ *
+ * @hide
*/
protected static boolean isLayoutDirectionRtl(Locale locale) {
return (LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE ==
@@ -13301,6 +13310,8 @@
/**
* Resolve the text direction.
+ *
+ * @hide
*/
protected void resolveTextDirection() {
if (mTextDirection != TEXT_DIRECTION_INHERIT) {
@@ -13316,6 +13327,8 @@
/**
* Reset resolved text direction. Will be resolved during a call to getResolvedTextDirection().
+ *
+ * @hide
*/
protected void resetResolvedTextDirection() {
mResolvedTextDirection = TEXT_DIRECTION_INHERIT;
diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java
index 72d233a3..0a3deb1 100644
--- a/graphics/java/android/graphics/drawable/Drawable.java
+++ b/graphics/java/android/graphics/drawable/Drawable.java
@@ -290,6 +290,8 @@
/**
* Implement this interface if you want to create an drawable that is RTL aware
+ *
+ * @hide
*/
public static interface Callback2 extends Callback {
/**
@@ -379,6 +381,8 @@
/**
* Use the current {@link android.graphics.drawable.Drawable.Callback2} implementation to get
* the resolved layout direction of this Drawable.
+ *
+ * @hide
*/
public int getResolvedLayoutDirectionSelf() {
final Callback callback = getCallback();