1 /*
2  * Copyright (C) 2008 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.view.cts;
18 
19 import android.content.Context;
20 import android.graphics.Canvas;
21 import android.graphics.Rect;
22 import android.graphics.drawable.Drawable;
23 import android.os.Handler;
24 import android.os.Parcelable;
25 import android.util.AttributeSet;
26 import android.util.SparseArray;
27 import android.view.ContextMenu;
28 import android.view.ContextMenu.ContextMenuInfo;
29 import android.view.KeyEvent;
30 import android.view.MotionEvent;
31 import android.view.PointerIcon;
32 import android.view.View;
33 import android.view.ViewGroup;
34 
35 public class MockView extends View {
36     private boolean mCalledOnCreateContextMenu = false;
37     private boolean mCalledOnAnimationStart = false;
38     private boolean mCalledOnAnimationEnd = false;
39     private boolean mCalledOnAttachedToWindow = false;
40     private boolean mCalledOnDetachedFromWindow = false;
41     private boolean mCalledOnCreateDrawableState = false;
42     private boolean mCalledDrawableStateChanged = false;
43     private boolean mCalledOnDraw = false;
44     private boolean mCalledDispatchDraw = false;
45     private boolean mCalledOnFinishInflate = false;
46     private boolean mCalledOnFocusChanged = false;
47     private boolean mCalledOnKeyDown = false;
48     private boolean mCalledOnKeyUp = false;
49     private boolean mCalledOnKeyMultiple = false;
50     private boolean mCalledOnKeyShortcut = false;
51     private boolean mCalledOnLayout = false;
52     private boolean mCalledOnMeasure = false;
53     private boolean mCalledOnSizeChanged = false;
54     private boolean mCalledOnSetAlpha = false;
55     private boolean mCalledOnTouchEvent = false;
56     private boolean mCalledOnTrackballEvent = false;
57     private boolean mCalledOnHoverEvent = false;
58     private boolean mCalledOnWindowFocusChanged = false;
59     private boolean mCalledDispatchRestoreInstanceState = false;
60     private boolean mCalledDispatchSaveInstanceState = false;
61     private boolean mCalledOnRestoreInstanceState = false;
62     private boolean mCalledOnSaveInstanceState = false;
63     private boolean mCalledOnWindowVisibilityChanged = false;
64     private boolean mCalledDispatchUnhandledMove = false;
65     private boolean mCalledDispatchWindowFocusChanged = false;
66     private boolean mCalledDispatchWindowVisibilityChanged =false;
67     private boolean mCalledOnScrollChanged = false;
68     private boolean mCalledInvalidate = false;
69     private boolean mCalledComputeScroll = false;
70     private boolean mCalledDispatchKeyEventPreIme = false;
71     private boolean mCalledOnKeyPreIme = false;
72     private boolean mCalledOnResolvePointerIcon = false;
73     private boolean mCalledOnVisibilityAggregated = false;
74     private boolean mCalledRequestFocus = false;
75 
76     private int mOldWidth = -1;
77     private int mOldHeight = -1;
78 
79     private boolean mLastAggregatedVisibility;
80 
MockView(Context context)81     public MockView(Context context) {
82         super(context);
83     }
84 
MockView(Context context, AttributeSet attrs)85     public MockView(Context context, AttributeSet attrs) {
86         super(context, attrs, 0);
87     }
88 
MockView(Context context, AttributeSet attrs, int defStyle)89     public MockView(Context context, AttributeSet attrs, int defStyle) {
90         super(context, attrs, defStyle);
91     }
92 
93     @Override
onKeyShortcut(int keyCode, KeyEvent event)94     public boolean onKeyShortcut(int keyCode, KeyEvent event) {
95         mCalledOnKeyShortcut = true;
96         return super.onKeyShortcut(keyCode, event);
97     }
98 
hasCalledOnKeyShortcut()99     public boolean hasCalledOnKeyShortcut() {
100         return mCalledOnKeyShortcut;
101     }
102 
103     @Override
invalidate()104     public void invalidate() {
105         super.invalidate();
106         mCalledInvalidate = true;
107     }
108 
hasCalledInvalidate()109     public boolean hasCalledInvalidate() {
110         return mCalledInvalidate;
111     }
112 
setParent(ViewGroup parent)113     public void setParent(ViewGroup parent) {
114         parent.addView(this);
115     }
116 
getEnabledStateSet()117     public static int[] getEnabledStateSet() {
118         return ENABLED_STATE_SET;
119     }
120 
getPressedEnabledStateSet()121     public static int[] getPressedEnabledStateSet() {
122         return PRESSED_ENABLED_STATE_SET;
123     }
124 
125     @Override
isPaddingOffsetRequired()126     protected boolean isPaddingOffsetRequired() {
127         return super.isPaddingOffsetRequired();
128     }
129 
130     @Override
getBottomPaddingOffset()131     protected int getBottomPaddingOffset() {
132         return super.getBottomPaddingOffset();
133     }
134 
135     @Override
getLeftPaddingOffset()136     protected int getLeftPaddingOffset() {
137         return super.getLeftPaddingOffset();
138     }
139 
140     @Override
getRightPaddingOffset()141     protected int getRightPaddingOffset() {
142         return super.getRightPaddingOffset();
143     }
144 
145     @Override
getTopPaddingOffset()146     protected int getTopPaddingOffset() {
147         return super.getTopPaddingOffset();
148     }
149 
150     @Override
onAnimationEnd()151     protected void onAnimationEnd() {
152         super.onAnimationEnd();
153         mCalledOnAnimationEnd = true;
154     }
155 
156     @Override
onAnimationStart()157     protected void onAnimationStart() {
158         super.onAnimationStart();
159         mCalledOnAnimationStart = true;
160     }
161 
hasCalledOnAnimationStart()162     public boolean hasCalledOnAnimationStart() {
163         return mCalledOnAnimationStart;
164     }
165 
hasCalledOnAnimationEnd()166     public boolean hasCalledOnAnimationEnd() {
167         return mCalledOnAnimationEnd;
168     }
169 
170     @Override
getHorizontalScrollbarHeight()171     protected int getHorizontalScrollbarHeight() {
172         return super.getHorizontalScrollbarHeight();
173     }
174 
175     @Override
onKeyDown(int keyCode, KeyEvent event)176     public boolean onKeyDown(int keyCode, KeyEvent event) {
177         mCalledOnKeyDown = true;
178         return super.onKeyDown(keyCode, event);
179     }
180 
hasCalledOnKeyDown()181     public boolean hasCalledOnKeyDown() {
182         return mCalledOnKeyDown;
183     }
184 
185     @Override
onKeyMultiple(int keyCode, int repeatCount, KeyEvent event)186     public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) {
187         mCalledOnKeyMultiple = true;
188         return super.onKeyMultiple(keyCode, repeatCount, event);
189     }
190 
hasCalledOnKeyMultiple()191     public boolean hasCalledOnKeyMultiple() {
192         return mCalledOnKeyMultiple;
193     }
194 
195     @Override
onKeyUp(int keyCode, KeyEvent event)196     public boolean onKeyUp(int keyCode, KeyEvent event) {
197         mCalledOnKeyUp = true;
198         return super.onKeyUp(keyCode, event);
199     }
200 
hasCalledOnKeyUp()201     public boolean hasCalledOnKeyUp() {
202         return mCalledOnKeyUp;
203     }
204 
205     @Override
onTouchEvent(MotionEvent event)206     public boolean onTouchEvent(MotionEvent event) {
207         mCalledOnTouchEvent = true;
208         return super.onTouchEvent(event);
209     }
210 
211     @Override
onTrackballEvent(MotionEvent event)212     public boolean onTrackballEvent(MotionEvent event) {
213         mCalledOnTrackballEvent = true;
214         return super.onTrackballEvent(event);
215     }
216 
217     @Override
onHoverEvent(MotionEvent event)218     public boolean onHoverEvent(MotionEvent event) {
219         mCalledOnHoverEvent = true;
220         return super.onHoverEvent(event);
221     }
222 
hasCalledOnTouchEvent()223     public boolean hasCalledOnTouchEvent() {
224         return mCalledOnTouchEvent;
225     }
226 
hasCalledOnTrackballEvent()227     public boolean hasCalledOnTrackballEvent() {
228         return mCalledOnTrackballEvent;
229     }
230 
hasCalledOnHoverEvent()231     public boolean hasCalledOnHoverEvent() {
232         return mCalledOnHoverEvent;
233     }
234 
235     @Override
getSuggestedMinimumHeight()236     protected int getSuggestedMinimumHeight() {
237         return super.getSuggestedMinimumHeight();
238     }
239 
240     @Override
getSuggestedMinimumWidth()241     protected int getSuggestedMinimumWidth() {
242         return super.getSuggestedMinimumWidth();
243     }
244 
245     @Override
verifyDrawable(Drawable who)246     protected boolean verifyDrawable(Drawable who) {
247         return super.verifyDrawable(who);
248     }
249 
250     @Override
computeHorizontalScrollExtent()251     protected int computeHorizontalScrollExtent() {
252         return super.computeHorizontalScrollExtent();
253     }
254 
255     @Override
computeHorizontalScrollOffset()256     protected int computeHorizontalScrollOffset() {
257         return super.computeHorizontalScrollOffset();
258     }
259 
260     @Override
computeHorizontalScrollRange()261     protected int computeHorizontalScrollRange() {
262         return super.computeHorizontalScrollRange();
263     }
264 
265     @Override
computeVerticalScrollExtent()266     protected int computeVerticalScrollExtent() {
267         return super.computeVerticalScrollExtent();
268     }
269 
270     @Override
computeVerticalScrollOffset()271     protected int computeVerticalScrollOffset() {
272         return super.computeVerticalScrollOffset();
273     }
274 
275     @Override
computeVerticalScrollRange()276     protected int computeVerticalScrollRange() {
277         return super.computeVerticalScrollRange();
278     }
279 
280     @Override
getLeftFadingEdgeStrength()281     protected float getLeftFadingEdgeStrength() {
282         return super.getLeftFadingEdgeStrength();
283     }
284 
285     @Override
getRightFadingEdgeStrength()286     protected float getRightFadingEdgeStrength() {
287         return super.getRightFadingEdgeStrength();
288     }
289 
290     @Override
getBottomFadingEdgeStrength()291     protected float getBottomFadingEdgeStrength() {
292         return super.getBottomFadingEdgeStrength();
293     }
294 
295     @Override
getTopFadingEdgeStrength()296     protected float getTopFadingEdgeStrength() {
297         return super.getTopFadingEdgeStrength();
298     }
299 
300     @Override
getContextMenuInfo()301     protected ContextMenuInfo getContextMenuInfo() {
302         return super.getContextMenuInfo();
303     }
304 
305     @Override
onCreateContextMenu(ContextMenu menu)306     protected void onCreateContextMenu(ContextMenu menu) {
307         super.onCreateContextMenu(menu);
308         mCalledOnCreateContextMenu = true;
309     }
310 
hasCalledOnCreateContextMenu()311     public boolean hasCalledOnCreateContextMenu() {
312         return mCalledOnCreateContextMenu;
313     }
314 
315     @Override
onScrollChanged(int l, int t, int oldl, int oldt)316     protected void onScrollChanged(int l, int t, int oldl, int oldt) {
317         super.onScrollChanged(l, t, oldl, oldt);
318         mCalledOnScrollChanged = true;
319     }
320 
hasCalledOnScrollChanged()321     public boolean hasCalledOnScrollChanged() {
322         return mCalledOnScrollChanged;
323     }
324 
325     @Override
onSizeChanged(int w, int h, int oldw, int oldh)326     protected void onSizeChanged(int w, int h, int oldw, int oldh) {
327         super.onSizeChanged(w, h, oldw, oldh);
328         mCalledOnSizeChanged = true;
329         mOldWidth = oldw;
330         mOldHeight = oldh;
331     }
332 
getOldWOnSizeChanged()333     public int getOldWOnSizeChanged() {
334         return mOldWidth;
335     }
336 
getOldHOnSizeChanged()337     public int getOldHOnSizeChanged() {
338         return mOldHeight;
339     }
340 
hasCalledOnSizeChanged()341     public boolean hasCalledOnSizeChanged() {
342         return mCalledOnSizeChanged;
343     }
344 
345     @Override
onLayout(boolean changed, int left, int top, int right, int bottom)346     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
347         super.onLayout(changed, left, top, right, bottom);
348         mCalledOnLayout = true;
349     }
350 
hasCalledOnLayout()351     public boolean hasCalledOnLayout() {
352         return mCalledOnLayout;
353     }
354 
355     @Override
computeScroll()356     public void computeScroll() {
357         super.computeScroll();
358         mCalledComputeScroll = true;
359     }
360 
hasCalledComputeScroll()361     public boolean hasCalledComputeScroll() {
362         return mCalledComputeScroll;
363     }
364 
365     @Override
dispatchSetSelected(boolean selected)366     protected void dispatchSetSelected(boolean selected) {
367         super.dispatchSetSelected(selected);
368     }
369 
370     @Override
dispatchSetPressed(boolean pressed)371     protected void dispatchSetPressed(boolean pressed) {
372         super.dispatchSetPressed(pressed);
373     }
374 
375     @Override
dispatchWindowFocusChanged(boolean hasFocus)376     public void dispatchWindowFocusChanged(boolean hasFocus) {
377         super.dispatchWindowFocusChanged(hasFocus);
378         mCalledDispatchWindowFocusChanged = true;
379     }
380 
hasCalledDispatchWindowFocusChanged()381     public boolean hasCalledDispatchWindowFocusChanged() {
382         return mCalledDispatchWindowFocusChanged;
383     }
384 
385     @Override
fitSystemWindows(Rect insets)386     protected boolean fitSystemWindows(Rect insets) {
387         return super.fitSystemWindows(insets);
388     }
389 
setMeasuredDimensionWrapper(int measuredWidth, int measuredHeight)390     public void setMeasuredDimensionWrapper(int measuredWidth, int measuredHeight) {
391         super.setMeasuredDimension(measuredWidth, measuredHeight);
392     }
393 
394     @Override
getHandler()395     public Handler getHandler() {
396         return super.getHandler();
397     }
398 
399     @Override
getWindowAttachCount()400     protected int getWindowAttachCount() {
401         return super.getWindowAttachCount();
402     }
403 
404     @Override
dispatchDraw(Canvas canvas)405     protected void dispatchDraw(Canvas canvas) {
406         super.dispatchDraw(canvas);
407         mCalledDispatchDraw = true;
408     }
409 
hasCalledDispatchDraw()410     public boolean hasCalledDispatchDraw() {
411         return mCalledDispatchDraw;
412     }
413 
414     @Override
dispatchUnhandledMove(View focused, int direction)415     public boolean dispatchUnhandledMove(View focused, int direction) {
416         mCalledDispatchUnhandledMove = true;
417         return super.dispatchUnhandledMove(focused, direction);
418     }
419 
hasCalledDispatchUnhandledMove()420     public boolean hasCalledDispatchUnhandledMove() {
421         return mCalledDispatchUnhandledMove;
422     }
423 
424     @Override
onWindowVisibilityChanged(int visibility)425     protected void onWindowVisibilityChanged(int visibility) {
426         super.onWindowVisibilityChanged(visibility);
427         mCalledOnWindowVisibilityChanged = true;
428     }
429 
hasCalledOnWindowVisibilityChanged()430     public boolean hasCalledOnWindowVisibilityChanged() {
431         return mCalledOnWindowVisibilityChanged;
432     }
433 
434     @Override
dispatchWindowVisibilityChanged(int visibility)435     public void dispatchWindowVisibilityChanged(int visibility) {
436         super.dispatchWindowVisibilityChanged(visibility);
437         mCalledDispatchWindowVisibilityChanged = true;
438     }
439 
hasCalledDispatchWindowVisibilityChanged()440     public boolean hasCalledDispatchWindowVisibilityChanged() {
441         return mCalledDispatchWindowVisibilityChanged;
442     }
443 
444     @Override
onWindowFocusChanged(boolean hasWindowFocus)445     public void onWindowFocusChanged(boolean hasWindowFocus) {
446         mCalledOnWindowFocusChanged = true;
447         super.onWindowFocusChanged(hasWindowFocus);
448     }
449 
hasCalledOnWindowFocusChanged()450     public boolean hasCalledOnWindowFocusChanged() {
451         return mCalledOnWindowFocusChanged;
452     }
453 
mergeDrawableStatesWrapper(int[] baseState, int[] additionalState)454     protected int[] mergeDrawableStatesWrapper(int[] baseState, int[] additionalState) {
455         return super.mergeDrawableStates(baseState, additionalState);
456     }
457 
458     @Override
onAttachedToWindow()459     protected void onAttachedToWindow() {
460         super.onAttachedToWindow();
461         mCalledOnAttachedToWindow = true;
462     }
463 
hasCalledOnAttachedToWindow()464     public boolean hasCalledOnAttachedToWindow() {
465         return mCalledOnAttachedToWindow;
466     }
467 
468     @Override
onDetachedFromWindow()469     protected void onDetachedFromWindow() {
470         super.onDetachedFromWindow();
471         mCalledOnDetachedFromWindow = true;
472     }
473 
hasCalledOnDetachedFromWindow()474     public boolean hasCalledOnDetachedFromWindow() {
475         return mCalledOnDetachedFromWindow;
476     }
477 
478     @Override
onDraw(Canvas canvas)479     protected void onDraw(Canvas canvas) {
480         super.onDraw(canvas);
481         mCalledOnDraw = true;
482     }
483 
hasCalledOnDraw()484     public boolean hasCalledOnDraw() {
485         return mCalledOnDraw;
486     }
487 
488     @Override
onFinishInflate()489     protected void onFinishInflate() {
490         super.onFinishInflate();
491         mCalledOnFinishInflate = true;
492     }
493 
hasCalledOnFinishInflate()494     public boolean hasCalledOnFinishInflate() {
495         return mCalledOnFinishInflate;
496     }
497 
498     @Override
onMeasure(int widthMeasureSpec, int heightMeasureSpec)499     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
500         super.onMeasure(widthMeasureSpec, heightMeasureSpec);
501         mCalledOnMeasure = true;
502     }
503 
hasCalledOnMeasure()504     public boolean hasCalledOnMeasure() {
505         return mCalledOnMeasure;
506     }
507 
508     @Override
onSaveInstanceState()509     protected Parcelable onSaveInstanceState() {
510         mCalledOnSaveInstanceState = true;
511         return super.onSaveInstanceState();
512     }
513 
hasCalledOnSaveInstanceState()514     public boolean hasCalledOnSaveInstanceState() {
515         return mCalledOnSaveInstanceState;
516     }
517 
518     @Override
onRestoreInstanceState(Parcelable state)519     protected void onRestoreInstanceState(Parcelable state) {
520         super.onRestoreInstanceState(state);
521         mCalledOnRestoreInstanceState = true;
522     }
523 
hasCalledOnRestoreInstanceState()524     public boolean hasCalledOnRestoreInstanceState() {
525         return mCalledOnRestoreInstanceState;
526     }
527 
528     @Override
onSetAlpha(int alpha)529     protected boolean onSetAlpha(int alpha) {
530         mCalledOnSetAlpha = true;
531         return super.onSetAlpha(alpha);
532     }
533 
hasCalledOnSetAlpha()534     public boolean hasCalledOnSetAlpha() {
535         return mCalledOnSetAlpha;
536     }
537 
538     @Override
onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect)539     protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect) {
540         super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
541         mCalledOnFocusChanged = true;
542     }
543 
hasCalledOnFocusChanged()544     public boolean hasCalledOnFocusChanged() {
545         return mCalledOnFocusChanged;
546     }
547 
548     @Override
onCreateDrawableState(int extraSpace)549     protected int[] onCreateDrawableState(int extraSpace) {
550         mCalledOnCreateDrawableState = true;
551         return super.onCreateDrawableState(extraSpace);
552     }
553 
hasCalledOnCreateDrawableState()554     public boolean hasCalledOnCreateDrawableState() {
555         return mCalledOnCreateDrawableState;
556     }
557 
558     @Override
playSoundEffect(int soundConstant)559     public void playSoundEffect(int soundConstant) {
560         super.playSoundEffect(soundConstant);
561     }
562 
563     @Override
dispatchRestoreInstanceState(SparseArray<Parcelable> container)564     protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
565         super.dispatchRestoreInstanceState(container);
566         mCalledDispatchRestoreInstanceState = true;
567     }
568 
hasCalledDispatchRestoreInstanceState()569     public boolean hasCalledDispatchRestoreInstanceState() {
570         return mCalledDispatchRestoreInstanceState;
571     }
572 
573     @Override
dispatchSaveInstanceState(SparseArray<Parcelable> container)574     protected void dispatchSaveInstanceState(SparseArray<Parcelable> container) {
575         super.dispatchSaveInstanceState(container);
576         mCalledDispatchSaveInstanceState = true;
577     }
578 
hasCalledDispatchSaveInstanceState()579     public boolean hasCalledDispatchSaveInstanceState() {
580         return mCalledDispatchSaveInstanceState;
581     }
582 
583     @Override
drawableStateChanged()584     protected void drawableStateChanged() {
585         super.drawableStateChanged();
586         mCalledDrawableStateChanged = true;
587     }
588 
hasCalledDrawableStateChanged()589     public boolean hasCalledDrawableStateChanged() {
590         return mCalledDrawableStateChanged;
591     }
592 
593     @Override
dispatchKeyEventPreIme(KeyEvent event)594     public boolean dispatchKeyEventPreIme(KeyEvent event) {
595         mCalledDispatchKeyEventPreIme = true;
596         return super.dispatchKeyEventPreIme(event);
597     }
598 
hasCalledDispatchKeyEventPreIme()599     public boolean hasCalledDispatchKeyEventPreIme() {
600         return mCalledDispatchKeyEventPreIme;
601     }
602 
603     @Override
onKeyPreIme(int keyCode, KeyEvent event)604     public boolean onKeyPreIme(int keyCode, KeyEvent event) {
605         mCalledOnKeyPreIme = true;
606         return super.onKeyPreIme(keyCode, event);
607     }
608 
hasCalledOnKeyPreIme()609     public boolean hasCalledOnKeyPreIme() {
610         return mCalledOnKeyPreIme;
611     }
612 
613     @Override
onResolvePointerIcon(MotionEvent event, int pointerIndex)614     public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) {
615         mCalledOnResolvePointerIcon = true;
616         return super.onResolvePointerIcon(event, pointerIndex);
617     }
618 
hasCalledOnResolvePointerIcon()619     public boolean hasCalledOnResolvePointerIcon() {
620         return mCalledOnResolvePointerIcon;
621     }
622 
623     @Override
onVisibilityAggregated(boolean isVisible)624     public void onVisibilityAggregated(boolean isVisible) {
625         super.onVisibilityAggregated(isVisible);
626         mCalledOnVisibilityAggregated = true;
627         mLastAggregatedVisibility = isVisible;
628     }
629 
630     @Override
requestFocus(int direction, Rect previouslyFocusedRect)631     public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
632         mCalledRequestFocus = true;
633         return super.requestFocus(direction, previouslyFocusedRect);
634     }
635 
hasCalledOnVisibilityAggregated()636     public boolean hasCalledOnVisibilityAggregated() {
637         return mCalledOnVisibilityAggregated;
638     }
639 
hasCalledRequestFocus()640     public boolean hasCalledRequestFocus() {
641         return mCalledRequestFocus;
642     }
643 
getLastAggregatedVisibility()644     public boolean getLastAggregatedVisibility() {
645         return mLastAggregatedVisibility;
646     }
647 
reset()648     public void reset() {
649         mCalledOnCreateContextMenu = false;
650 
651         mCalledOnAnimationStart = false;
652         mCalledOnAnimationEnd = false;
653         mCalledOnAttachedToWindow = false;
654         mCalledOnDetachedFromWindow = false;
655         mCalledOnCreateDrawableState = false;
656         mCalledDrawableStateChanged = false;
657         mCalledOnDraw = false;
658         mCalledDispatchDraw = false;
659         mCalledOnFinishInflate = false;
660         mCalledOnFocusChanged = false;
661         mCalledOnKeyDown = false;
662         mCalledOnKeyUp = false;
663         mCalledOnKeyMultiple = false;
664         mCalledOnKeyShortcut = false;
665         mCalledOnLayout = false;
666         mCalledOnMeasure = false;
667         mCalledOnSizeChanged = false;
668         mCalledOnSetAlpha = false;
669         mCalledOnTouchEvent = false;
670         mCalledOnTrackballEvent = false;
671         mCalledOnHoverEvent = false;
672         mCalledOnWindowFocusChanged = false;
673         mCalledDispatchRestoreInstanceState = false;
674         mCalledDispatchSaveInstanceState = false;
675         mCalledOnRestoreInstanceState = false;
676         mCalledOnSaveInstanceState = false;
677         mCalledDispatchUnhandledMove = false;
678         mCalledDispatchWindowFocusChanged = false;
679         mCalledDispatchWindowVisibilityChanged = false;
680         mCalledOnWindowVisibilityChanged = false;
681         mCalledOnScrollChanged = false;
682         mCalledInvalidate = false;
683         mCalledComputeScroll = false;
684         mCalledDispatchKeyEventPreIme = false;
685         mCalledOnKeyPreIme = false;
686         mCalledOnResolvePointerIcon = false;
687         mCalledOnVisibilityAggregated = false;
688         mCalledRequestFocus = false;
689 
690         mOldWidth = -1;
691         mOldHeight = -1;
692         mLastAggregatedVisibility = false;
693     }
694 }
695