Skip to content

Commit c11f77f

Browse files
author
Fabrice Di Meglio
committed
Fix bug #7173155 API REVIEW: android.view.View
- remove getFocusRect(Rect) as it was redundant - fix Javadoc Change-Id: I3784c4b0a38770cba5d3ba09196f9271050a3c20
1 parent 5e900e3 commit c11f77f

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

api/current.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24771,7 +24771,6 @@ package android.view {
2477124771
method public long getDrawingTime();
2477224772
method public boolean getFilterTouchesWhenObscured();
2477324773
method public boolean getFitsSystemWindows();
24774-
method public void getFocusRect(android.graphics.Rect);
2477524774
method public java.util.ArrayList<android.view.View> getFocusables(int);
2477624775
method public void getFocusedRect(android.graphics.Rect);
2477724776
method public boolean getGlobalVisibleRect(android.graphics.Rect, android.graphics.Point);

core/java/android/view/FocusFinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ View findNextFocusInAbsoluteDirection(ArrayList<View> focusables, ViewGroup root
228228
if (focusable == focused || focusable == root) continue;
229229

230230
// get focus bounds of other view in same coordinate system
231-
focusable.getFocusRect(mOtherRect);
231+
focusable.getFocusedRect(mOtherRect);
232232
root.offsetDescendantRectToMyCoords(focusable, mOtherRect);
233233

234234
if (isBetterCandidate(direction, focusedRect, mOtherRect, mBestCandidateRect)) {

core/java/android/view/View.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8635,18 +8635,6 @@ private void updateMatrix() {
86358635
}
86368636
}
86378637

8638-
/**
8639-
* When searching for a view to focus this rectangle is used when considering if this view is
8640-
* a good candidate for receiving focus.
8641-
*
8642-
* By default, the rectangle is the {@link #getDrawingRect}) of the view.
8643-
*
8644-
* @param r The rectangle to fill in, in this view's coordinates.
8645-
*/
8646-
public void getFocusRect(Rect r) {
8647-
getDrawingRect(r);
8648-
}
8649-
86508638
/**
86518639
* Utility method to retrieve the inverse of the current mMatrix property.
86528640
* We cache the matrix to avoid recalculating it when transform properties
@@ -9625,7 +9613,7 @@ private boolean pointInView(float localX, float localY, float slop) {
96259613
* When a view has focus and the user navigates away from it, the next view is searched for
96269614
* starting from the rectangle filled in by this method.
96279615
*
9628-
* By default, the rectange is the {@link #getDrawingRect(android.graphics.Rect)})
9616+
* By default, the rectangle is the {@link #getDrawingRect(android.graphics.Rect)})
96299617
* of the view. However, if your view maintains some idea of internal selection,
96309618
* such as a cursor, or a selected row or column, you should override this method and
96319619
* fill in a more specific rectangle.

0 commit comments

Comments
 (0)