Loading api/current.txt +4 −2 Original line number Diff line number Diff line Loading @@ -23310,7 +23310,9 @@ package android.view { method protected void onMeasure(int, int); method protected void onOverScrolled(int, int, boolean, boolean); method public void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent); method public void onResetResolvedTextDirection(); method public void onResolvePadding(int); method public void onResolveTextDirection(); method protected void onRestoreInstanceState(android.os.Parcelable); method protected android.os.Parcelable onSaveInstanceState(); method protected void onScrollChanged(int, int, int, int); Loading Loading @@ -23345,11 +23347,11 @@ package android.view { 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 void resetResolvedTextDirection(); method public void resolvePadding(); method public static int resolveSize(int, int); method public static int resolveSizeAndState(int, int, int); method protected void resolveTextDirection(); method public 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); core/java/android/view/View.java +34 −20 Original line number Diff line number Diff line Loading @@ -9540,10 +9540,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal // Clear any previous layout direction resolution mPrivateFlags2 &= ~LAYOUT_DIRECTION_RESOLVED_RTL; // Reset also TextDirection as a change into LayoutDirection may impact the selected // TextDirectionHeuristic resetResolvedTextDirection(); // Set resolved depending on layout direction switch (getLayoutDirection()) { case LAYOUT_DIRECTION_INHERIT: Loading Loading @@ -9662,8 +9658,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * @hide */ protected void resetResolvedLayoutDirection() { // Reset the current View resolution // Reset the layout direction resolution mPrivateFlags2 &= ~LAYOUT_DIRECTION_RESOLVED; // Reset also the text direction resetResolvedTextDirection(); } /** Loading Loading @@ -9708,7 +9706,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal mCurrentAnimation = null; resetResolvedLayoutDirection(); resetResolvedTextDirection(); } /** Loading Loading @@ -14083,7 +14080,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@link #TEXT_DIRECTION_LTR}, * {@link #TEXT_DIRECTION_RTL}, * {@link #TEXT_DIRECTION_LOCALE}, * */ public int getTextDirection() { return mTextDirection; Loading @@ -14100,7 +14096,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@link #TEXT_DIRECTION_LTR}, * {@link #TEXT_DIRECTION_RTL}, * {@link #TEXT_DIRECTION_LOCALE}, * */ public void setTextDirection(int textDirection) { if (textDirection != mTextDirection) { Loading @@ -14120,7 +14115,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@link #TEXT_DIRECTION_LTR}, * {@link #TEXT_DIRECTION_RTL}, * {@link #TEXT_DIRECTION_LOCALE}, * */ public int getResolvedTextDirection() { if (mResolvedTextDirection == TEXT_DIRECTION_INHERIT) { Loading @@ -14130,27 +14124,47 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * Resolve the text direction. * * Resolve the text direction. Will call {@link View#onResolveTextDirection()} when resolution * is done. */ protected void resolveTextDirection() { if (mTextDirection != TEXT_DIRECTION_INHERIT) { mResolvedTextDirection = mTextDirection; public void resolveTextDirection() { if (mResolvedTextDirection != TEXT_DIRECTION_INHERIT) { // Resolution has already been done. return; } if (mParent != null && mParent instanceof ViewGroup) { if (mTextDirection != TEXT_DIRECTION_INHERIT) { mResolvedTextDirection = mTextDirection; } else if (mParent != null && mParent instanceof ViewGroup) { mResolvedTextDirection = ((ViewGroup) mParent).getResolvedTextDirection(); return; } } else { mResolvedTextDirection = TEXT_DIRECTION_FIRST_STRONG; } onResolveTextDirection(); } /** * Reset resolved text direction. Will be resolved during a call to getResolvedTextDirection(). * * Called when text direction has been resolved. Subclasses that care about text direction * resolution should override this method. The default implementation does nothing. */ public void onResolveTextDirection() { } /** * Reset resolved text direction. Text direction can be resolved with a call to * getResolvedTextDirection(). Will call {@link View#onResetResolvedTextDirection()} when * reset is done. */ protected void resetResolvedTextDirection() { public void resetResolvedTextDirection() { mResolvedTextDirection = TEXT_DIRECTION_INHERIT; onResetResolvedTextDirection(); } /** * Called when text direction is reset. Subclasses that care about text direction reset should * override this method and do a reset of the text direction of their children. The default * implementation does nothing. */ public void onResetResolvedTextDirection() { } // core/java/android/view/ViewGroup.java +1 −3 Original line number Diff line number Diff line Loading @@ -4857,9 +4857,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } @Override protected void resetResolvedTextDirection() { super.resetResolvedTextDirection(); public void onResetResolvedTextDirection() { // Take care of resetting the children resolution too final int count = getChildCount(); for (int i = 0; i < count; i++) { Loading core/java/android/widget/TextView.java +1 −5 Original line number Diff line number Diff line Loading @@ -11407,7 +11407,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } @Override protected void resolveTextDirection() { public void onResolveTextDirection() { if (hasPasswordTransformationMethod()) { mTextDir = TextDirectionHeuristics.LOCALE; return; Loading @@ -11416,9 +11416,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener // Always need to resolve layout direction first final boolean defaultIsRtl = (getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL); // Then resolve text direction on the parent super.resolveTextDirection(); // Now, we can select the heuristic int textDir = getResolvedTextDirection(); switch (textDir) { Loading Loading @@ -11447,7 +11444,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * drawables depending on the layout direction. * * A call to the super method will be required from the subclasses implementation. * */ protected void resolveDrawables() { // No need to resolve twice Loading Loading
api/current.txt +4 −2 Original line number Diff line number Diff line Loading @@ -23310,7 +23310,9 @@ package android.view { method protected void onMeasure(int, int); method protected void onOverScrolled(int, int, boolean, boolean); method public void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent); method public void onResetResolvedTextDirection(); method public void onResolvePadding(int); method public void onResolveTextDirection(); method protected void onRestoreInstanceState(android.os.Parcelable); method protected android.os.Parcelable onSaveInstanceState(); method protected void onScrollChanged(int, int, int, int); Loading Loading @@ -23345,11 +23347,11 @@ package android.view { 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 void resetResolvedTextDirection(); method public void resolvePadding(); method public static int resolveSize(int, int); method public static int resolveSizeAndState(int, int, int); method protected void resolveTextDirection(); method public 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);
core/java/android/view/View.java +34 −20 Original line number Diff line number Diff line Loading @@ -9540,10 +9540,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal // Clear any previous layout direction resolution mPrivateFlags2 &= ~LAYOUT_DIRECTION_RESOLVED_RTL; // Reset also TextDirection as a change into LayoutDirection may impact the selected // TextDirectionHeuristic resetResolvedTextDirection(); // Set resolved depending on layout direction switch (getLayoutDirection()) { case LAYOUT_DIRECTION_INHERIT: Loading Loading @@ -9662,8 +9658,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * @hide */ protected void resetResolvedLayoutDirection() { // Reset the current View resolution // Reset the layout direction resolution mPrivateFlags2 &= ~LAYOUT_DIRECTION_RESOLVED; // Reset also the text direction resetResolvedTextDirection(); } /** Loading Loading @@ -9708,7 +9706,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal mCurrentAnimation = null; resetResolvedLayoutDirection(); resetResolvedTextDirection(); } /** Loading Loading @@ -14083,7 +14080,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@link #TEXT_DIRECTION_LTR}, * {@link #TEXT_DIRECTION_RTL}, * {@link #TEXT_DIRECTION_LOCALE}, * */ public int getTextDirection() { return mTextDirection; Loading @@ -14100,7 +14096,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@link #TEXT_DIRECTION_LTR}, * {@link #TEXT_DIRECTION_RTL}, * {@link #TEXT_DIRECTION_LOCALE}, * */ public void setTextDirection(int textDirection) { if (textDirection != mTextDirection) { Loading @@ -14120,7 +14115,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@link #TEXT_DIRECTION_LTR}, * {@link #TEXT_DIRECTION_RTL}, * {@link #TEXT_DIRECTION_LOCALE}, * */ public int getResolvedTextDirection() { if (mResolvedTextDirection == TEXT_DIRECTION_INHERIT) { Loading @@ -14130,27 +14124,47 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * Resolve the text direction. * * Resolve the text direction. Will call {@link View#onResolveTextDirection()} when resolution * is done. */ protected void resolveTextDirection() { if (mTextDirection != TEXT_DIRECTION_INHERIT) { mResolvedTextDirection = mTextDirection; public void resolveTextDirection() { if (mResolvedTextDirection != TEXT_DIRECTION_INHERIT) { // Resolution has already been done. return; } if (mParent != null && mParent instanceof ViewGroup) { if (mTextDirection != TEXT_DIRECTION_INHERIT) { mResolvedTextDirection = mTextDirection; } else if (mParent != null && mParent instanceof ViewGroup) { mResolvedTextDirection = ((ViewGroup) mParent).getResolvedTextDirection(); return; } } else { mResolvedTextDirection = TEXT_DIRECTION_FIRST_STRONG; } onResolveTextDirection(); } /** * Reset resolved text direction. Will be resolved during a call to getResolvedTextDirection(). * * Called when text direction has been resolved. Subclasses that care about text direction * resolution should override this method. The default implementation does nothing. */ public void onResolveTextDirection() { } /** * Reset resolved text direction. Text direction can be resolved with a call to * getResolvedTextDirection(). Will call {@link View#onResetResolvedTextDirection()} when * reset is done. */ protected void resetResolvedTextDirection() { public void resetResolvedTextDirection() { mResolvedTextDirection = TEXT_DIRECTION_INHERIT; onResetResolvedTextDirection(); } /** * Called when text direction is reset. Subclasses that care about text direction reset should * override this method and do a reset of the text direction of their children. The default * implementation does nothing. */ public void onResetResolvedTextDirection() { } //
core/java/android/view/ViewGroup.java +1 −3 Original line number Diff line number Diff line Loading @@ -4857,9 +4857,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } @Override protected void resetResolvedTextDirection() { super.resetResolvedTextDirection(); public void onResetResolvedTextDirection() { // Take care of resetting the children resolution too final int count = getChildCount(); for (int i = 0; i < count; i++) { Loading
core/java/android/widget/TextView.java +1 −5 Original line number Diff line number Diff line Loading @@ -11407,7 +11407,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } @Override protected void resolveTextDirection() { public void onResolveTextDirection() { if (hasPasswordTransformationMethod()) { mTextDir = TextDirectionHeuristics.LOCALE; return; Loading @@ -11416,9 +11416,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener // Always need to resolve layout direction first final boolean defaultIsRtl = (getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL); // Then resolve text direction on the parent super.resolveTextDirection(); // Now, we can select the heuristic int textDir = getResolvedTextDirection(); switch (textDir) { Loading Loading @@ -11447,7 +11444,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * drawables depending on the layout direction. * * A call to the super method will be required from the subclasses implementation. * */ protected void resolveDrawables() { // No need to resolve twice Loading