2424import static android .view .WindowManager .LayoutParams .TYPE_INPUT_METHOD_DIALOG ;
2525import static android .view .WindowManager .LayoutParams .TYPE_WALLPAPER ;
2626
27- import com .android .server .wm .WindowManagerService .H ;
28-
2927import android .content .Context ;
3028import android .content .res .Configuration ;
3129import android .graphics .Matrix ;
4038import android .view .IApplicationToken ;
4139import android .view .IWindow ;
4240import android .view .InputChannel ;
43- import android .view .Surface ;
4441import android .view .View ;
4542import android .view .ViewTreeObserver ;
4643import android .view .WindowManager ;
4744import android .view .WindowManagerPolicy ;
48- import android .view .WindowManager .LayoutParams ;
49- import android .view .animation .Animation ;
50- import android .view .animation .AnimationUtils ;
51- import android .view .animation .Transformation ;
5245
5346import java .io .PrintWriter ;
5447import java .util .ArrayList ;
5750 * A window in the window manager.
5851 */
5952final class WindowState implements WindowManagerPolicy .WindowState {
53+ static final String TAG = "WindowState" ;
54+
6055 static final boolean DEBUG_VISIBILITY = WindowManagerService .DEBUG_VISIBILITY ;
6156 static final boolean SHOW_TRANSACTIONS = WindowManagerService .SHOW_TRANSACTIONS ;
6257 static final boolean SHOW_LIGHT_TRANSACTIONS = WindowManagerService .SHOW_LIGHT_TRANSACTIONS ;
@@ -276,7 +271,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
276271 mSeq = seq ;
277272 mEnforceSizeCompat = (mAttrs .flags & FLAG_COMPATIBLE_WINDOW ) != 0 ;
278273 if (WindowManagerService .localLOGV ) Slog .v (
279- WindowManagerService . TAG , "Window " + this + " client=" + c .asBinder ()
274+ TAG , "Window " + this + " client=" + c .asBinder ()
280275 + " token=" + token + " (" + mAttrs .token + ")" );
281276 try {
282277 c .asBinder ().linkToDeath (deathRecipient , 0 );
@@ -304,7 +299,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
304299 + WindowManagerService .TYPE_LAYER_OFFSET ;
305300 mSubLayer = mPolicy .subWindowTypeToLayerLw (a .type );
306301 mAttachedWindow = attachedWindow ;
307- if (WindowManagerService .DEBUG_ADD_REMOVE ) Slog .v (WindowManagerService . TAG , "Adding " + this + " to " + mAttachedWindow );
302+ if (WindowManagerService .DEBUG_ADD_REMOVE ) Slog .v (TAG , "Adding " + this + " to " + mAttachedWindow );
308303 mAttachedWindow .mChildWindows .add (this );
309304 mLayoutAttached = mAttrs .type !=
310305 WindowManager .LayoutParams .TYPE_APPLICATION_ATTACHED_DIALOG ;
@@ -358,7 +353,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
358353
359354 void attach () {
360355 if (WindowManagerService .localLOGV ) Slog .v (
361- WindowManagerService . TAG , "Attaching " + this + " token=" + mToken
356+ TAG , "Attaching " + this + " token=" + mToken
362357 + ", list=" + mToken .windows );
363358 mSession .windowAddedLocked ();
364359 }
@@ -496,7 +491,7 @@ public void computeFrameLw(Rect pf, Rect df, Rect cf, Rect vf) {
496491 if (WindowManagerService .localLOGV ) {
497492 //if ("com.google.android.youtube".equals(mAttrs.packageName)
498493 // && mAttrs.type == WindowManager.LayoutParams.TYPE_APPLICATION_PANEL) {
499- Slog .v (WindowManagerService . TAG , "Resolving (mRequestedWidth="
494+ Slog .v (TAG , "Resolving (mRequestedWidth="
500495 + mRequestedWidth + ", mRequestedheight="
501496 + mRequestedHeight + ") to" + " (pw=" + pw + ", ph=" + ph
502497 + "): frame=" + mFrame .toShortString ()
@@ -600,10 +595,11 @@ public boolean hasAppShownWindows() {
600595 return mAppToken != null ? mAppToken .firstWindowDrawn : false ;
601596 }
602597
598+ // TODO(cmautner): Move to WindowStateAnimator
603599 boolean finishDrawingLocked () {
604600 if (mDrawPending ) {
605601 if (SHOW_TRANSACTIONS || WindowManagerService .DEBUG_ORIENTATION ) Slog .v (
606- WindowManagerService . TAG , "finishDrawingLocked: " + this + " in "
602+ TAG , "finishDrawingLocked: " + this + " in "
607603 + mWinAnimator .mSurface );
608604 mCommitDrawPending = true ;
609605 mDrawPending = false ;
@@ -612,6 +608,7 @@ boolean finishDrawingLocked() {
612608 return false ;
613609 }
614610
611+ // TODO(cmautner): Move to WindowStateAnimator
615612 // This must be called while inside a transaction.
616613 boolean commitFinishDrawingLocked (long currentTime ) {
617614 //Slog.i(TAG, "commitFinishDrawingLocked: " + mSurface);
@@ -820,7 +817,7 @@ void removeLocked() {
820817 disposeInputChannel ();
821818
822819 if (mAttachedWindow != null ) {
823- if (WindowManagerService .DEBUG_ADD_REMOVE ) Slog .v (WindowManagerService . TAG , "Removing " + this + " from " + mAttachedWindow );
820+ if (WindowManagerService .DEBUG_ADD_REMOVE ) Slog .v (TAG , "Removing " + this + " from " + mAttachedWindow );
824821 mAttachedWindow .mChildWindows .remove (this );
825822 }
826823 mWinAnimator .destroyDeferredSurfaceLocked ();
@@ -859,7 +856,7 @@ public void binderDied() {
859856 try {
860857 synchronized (mService .mWindowMap ) {
861858 WindowState win = mService .windowForClientLocked (mSession , mClient , false );
862- Slog .i (WindowManagerService . TAG , "WIN DEATH: " + win );
859+ Slog .i (TAG , "WIN DEATH: " + win );
863860 if (win != null ) {
864861 mService .removeWindowLocked (mSession , win );
865862 }
@@ -891,9 +888,9 @@ boolean showLw(boolean doAnimation, boolean requestAnim) {
891888 // Already showing.
892889 return false ;
893890 }
894- if (DEBUG_VISIBILITY ) Slog .v (WindowManagerService . TAG , "Policy visibility true: " + this );
891+ if (DEBUG_VISIBILITY ) Slog .v (TAG , "Policy visibility true: " + this );
895892 if (doAnimation ) {
896- if (DEBUG_VISIBILITY ) Slog .v (WindowManagerService . TAG , "doAnimation: mPolicyVisibility="
893+ if (DEBUG_VISIBILITY ) Slog .v (TAG , "doAnimation: mPolicyVisibility="
897894 + mPolicyVisibility + " mAnimation=" + mWinAnimator .mAnimation );
898895 if (!mService .okToDisplay ()) {
899896 doAnimation = false ;
@@ -940,7 +937,7 @@ boolean hideLw(boolean doAnimation, boolean requestAnim) {
940937 if (doAnimation ) {
941938 mPolicyVisibilityAfterAnim = false ;
942939 } else {
943- if (DEBUG_VISIBILITY ) Slog .v (WindowManagerService . TAG , "Policy visibility false: " + this );
940+ if (DEBUG_VISIBILITY ) Slog .v (TAG , "Policy visibility false: " + this );
944941 mPolicyVisibilityAfterAnim = false ;
945942 mPolicyVisibility = false ;
946943 // Window is no longer visible -- make sure if we were waiting
0 commit comments