publicbooleanrequestFocus(int direction, Rect previouslyFocusedRect){if(DBG){ System.out.println(this+" ViewGroup.requestFocus direction="+ direction);}int descendantFocusability = getDescendantFocusability();switch(descendantFocusability){case FOCUS_BLOCK_DESCENDANTS:returnsuper.requestFocus(direction, previouslyFocusedRect);case FOCUS_BEFORE_DESCENDANTS:{finalboolean took =super.requestFocus(direction, previouslyFocusedRect);return took ? took : onRequestFocusInDescendants(direction, previouslyFocusedRect);}case FOCUS_AFTER_DESCENDANTS:{finalboolean took = onRequestFocusInDescendants(direction, previouslyFocusedRect);return took ? took :super.requestFocus(direction, previouslyFocusedRect);}default:thrownew IllegalStateException("descendant focusability must be "+"one of FOCUS_BEFORE_DESCENDANTS, FOCUS_AFTER_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS "+"but is "+ descendantFocusability);}}