Merge "Dispatch View#onVisibilityAggregated to views becoming invisible" into nyc-dev

This commit is contained in:
Adam Powell
2016-04-12 19:32:09 +00:00
committed by Android (Google) Code Review

View File

@@ -10278,7 +10278,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
*/
@Visibility boolean dispatchVisibilityAggregated(boolean isVisible) {
final boolean thisVisible = getVisibility() == VISIBLE;
if (thisVisible) {
// If we're not visible but something is telling us we are, ignore it.
if (thisVisible || !isVisible) {
onVisibilityAggregated(isVisible);
}
return thisVisible && isVisible;