Program: 196717
Project: 196717
Buggy source:
/** 
 * Extracted from   {@link #performLayoutAndPlaceSurfacesLockedInner} to reduce size of method.
 * @param windows List of windows on default display.
 * @return bitmap indicating if another pass through layout must be made.
 */
public int handleAppTransitionReadyLocked(WindowList windows){
  int changes=0;
  int i;
  int NN=mOpeningApps.size();
  boolean goodToGo=true;
  if (DEBUG_APP_TRANSITIONS)   Slog.v(TAG,"String_Node_Str" + NN + "String_Node_Str"+ mDisplayFrozen+ "String_Node_Str"+ mAppTransition.isTimeout()+ "String_Node_Str");
  if (!mDisplayFrozen && !mAppTransition.isTimeout()) {
    for (i=0; i < NN && goodToGo; i++) {
      AppWindowToken wtoken=mOpeningApps.valueAt(i);
      if (DEBUG_APP_TRANSITIONS)       Slog.v(TAG,"String_Node_Str" + wtoken + "String_Node_Str"+ wtoken.allDrawn+ "String_Node_Str"+ wtoken.startingDisplayed+ "String_Node_Str"+ wtoken.startingMoved);
      if (!wtoken.allDrawn && !wtoken.startingDisplayed && !wtoken.startingMoved) {
        goodToGo=false;
      }
    }
  }
  if (goodToGo) {
    if (DEBUG_APP_TRANSITIONS)     Slog.v(TAG,"String_Node_Str");
    int transit=mAppTransition.getAppTransition();
    if (mSkipAppTransitionAnimation) {
      transit=AppTransition.TRANSIT_UNSET;
    }
    mAppTransition.goodToGo();
    mStartingIconInTransition=false;
    mSkipAppTransitionAnimation=false;
    mH.removeMessages(H.APP_TRANSITION_TIMEOUT);
    rebuildAppWindowListLocked();
    WindowState oldWallpaper=mWallpaperTarget != null && mWallpaperTarget.mWinAnimator.isAnimating() && !mWallpaperTarget.mWinAnimator.isDummyAnimation() ? null : mWallpaperTarget;
    mInnerFields.mWallpaperMayChange=false;
    LayoutParams animLp=null;
    int bestAnimLayer=-1;
    boolean fullscreenAnim=false;
    boolean voiceInteraction=false;
    if (DEBUG_APP_TRANSITIONS)     Slog.v(TAG,"String_Node_Str" + mWallpaperTarget + "String_Node_Str"+ oldWallpaper+ "String_Node_Str"+ mLowerWallpaperTarget+ "String_Node_Str"+ mUpperWallpaperTarget);
    boolean openingAppHasWallpaper=false;
    boolean closingAppHasWallpaper=false;
    final AppWindowToken lowerWallpaperAppToken;
    final AppWindowToken upperWallpaperAppToken;
    if (mLowerWallpaperTarget == null) {
      lowerWallpaperAppToken=upperWallpaperAppToken=null;
    }
 else {
      lowerWallpaperAppToken=mLowerWallpaperTarget.mAppToken;
      upperWallpaperAppToken=mUpperWallpaperTarget.mAppToken;
    }
    final int NC=mClosingApps.size();
    NN=NC + mOpeningApps.size();
    for (i=0; i < NN; i++) {
      final AppWindowToken wtoken;
      if (i < NC) {
        wtoken=mClosingApps.valueAt(i);
        if (wtoken == lowerWallpaperAppToken || wtoken == upperWallpaperAppToken) {
          closingAppHasWallpaper=true;
        }
      }
 else {
        wtoken=mOpeningApps.valueAt(i - NC);
        if (wtoken == lowerWallpaperAppToken || wtoken == upperWallpaperAppToken) {
          openingAppHasWallpaper=true;
        }
      }
      voiceInteraction|=wtoken.voiceInteraction;
      if (wtoken.appFullscreen) {
        WindowState ws=wtoken.findMainWindow();
        if (ws != null) {
          animLp=ws.mAttrs;
          bestAnimLayer=ws.mLayer;
          fullscreenAnim=true;
        }
      }
 else       if (!fullscreenAnim) {
        WindowState ws=wtoken.findMainWindow();
        if (ws != null) {
          if (ws.mLayer > bestAnimLayer) {
            animLp=ws.mAttrs;
            bestAnimLayer=ws.mLayer;
          }
        }
      }
    }
    mAnimateWallpaperWithTarget=false;
    if (closingAppHasWallpaper && openingAppHasWallpaper) {
      if (DEBUG_APP_TRANSITIONS)       Slog.v(TAG,"String_Node_Str");
switch (transit) {
case AppTransition.TRANSIT_ACTIVITY_OPEN:
case AppTransition.TRANSIT_TASK_OPEN:
case AppTransition.TRANSIT_TASK_TO_FRONT:
        transit=AppTransition.TRANSIT_WALLPAPER_INTRA_OPEN;
      break;
case AppTransition.TRANSIT_ACTIVITY_CLOSE:
case AppTransition.TRANSIT_TASK_CLOSE:
case AppTransition.TRANSIT_TASK_TO_BACK:
    transit=AppTransition.TRANSIT_WALLPAPER_INTRA_CLOSE;
  break;
}
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,"String_Node_Str" + transit);
}
 else if ((oldWallpaper != null) && !mOpeningApps.isEmpty() && !mOpeningApps.contains(oldWallpaper.mAppToken)) {
transit=AppTransition.TRANSIT_WALLPAPER_CLOSE;
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,"String_Node_Str" + transit);
}
 else if (mWallpaperTarget != null && mWallpaperTarget.isVisibleLw()) {
transit=AppTransition.TRANSIT_WALLPAPER_OPEN;
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,"String_Node_Str" + transit);
}
 else {
mAnimateWallpaperWithTarget=true;
}
if (!mPolicy.allowAppAnimationsLw()) {
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,"String_Node_Str");
animLp=null;
}
AppWindowToken topOpeningApp=null;
AppWindowToken topClosingApp=null;
int topOpeningLayer=0;
int topClosingLayer=0;
NN=mOpeningApps.size();
for (i=0; i < NN; i++) {
AppWindowToken wtoken=mOpeningApps.valueAt(i);
final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,"String_Node_Str" + wtoken);
appAnimator.clearThumbnail();
appAnimator.animation=null;
wtoken.inPendingTransaction=false;
setTokenVisibilityLocked(wtoken,animLp,true,transit,false,voiceInteraction);
wtoken.updateReportedVisibilityLocked();
wtoken.waitingToShow=false;
appAnimator.mAllAppWinAnimators.clear();
final int N=wtoken.allAppWindows.size();
for (int j=0; j < N; j++) {
appAnimator.mAllAppWinAnimators.add(wtoken.allAppWindows.get(j).mWinAnimator);
}
mAnimator.mAnimating|=appAnimator.showAllWindowsLocked();
if (animLp != null) {
int layer=-1;
for (int j=0; j < wtoken.windows.size(); j++) {
  WindowState win=wtoken.windows.get(j);
  if (win.mWinAnimator.mAnimLayer > layer) {
    layer=win.mWinAnimator.mAnimLayer;
  }
}
if (topOpeningApp == null || layer > topOpeningLayer) {
  topOpeningApp=wtoken;
  topOpeningLayer=layer;
}
}
}
NN=mClosingApps.size();
for (i=0; i < NN; i++) {
AppWindowToken wtoken=mClosingApps.valueAt(i);
final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,"String_Node_Str" + wtoken);
appAnimator.clearThumbnail();
appAnimator.animation=null;
wtoken.inPendingTransaction=false;
setTokenVisibilityLocked(wtoken,animLp,false,transit,false,voiceInteraction);
wtoken.updateReportedVisibilityLocked();
wtoken.waitingToHide=false;
wtoken.allDrawn=true;
wtoken.deferClearAllDrawn=false;
if (animLp != null) {
int layer=-1;
for (int j=0; j < wtoken.windows.size(); j++) {
  WindowState win=wtoken.windows.get(j);
  if (win.mWinAnimator.mAnimLayer > layer) {
    layer=win.mWinAnimator.mAnimLayer;
  }
}
if (topClosingApp == null || layer > topClosingLayer) {
  topClosingApp=wtoken;
  topClosingLayer=layer;
}
}
}
AppWindowAnimator openingAppAnimator=(topOpeningApp == null) ? null : topOpeningApp.mAppAnimator;
AppWindowAnimator closingAppAnimator=(topClosingApp == null) ? null : topClosingApp.mAppAnimator;
Bitmap nextAppTransitionThumbnail=mAppTransition.getNextAppTransitionThumbnail();
if (nextAppTransitionThumbnail != null && openingAppAnimator != null && openingAppAnimator.animation != null && nextAppTransitionThumbnail.getConfig() != Config.ALPHA_8) {
Rect dirty=new Rect(0,0,nextAppTransitionThumbnail.getWidth(),nextAppTransitionThumbnail.getHeight());
try {
final DisplayContent displayContent=getDefaultDisplayContentLocked();
final Display display=displayContent.getDisplay();
final DisplayInfo displayInfo=displayContent.getDisplayInfo();
SurfaceControl surfaceControl=new SurfaceControl(mFxSession,"String_Node_Str",dirty.width(),dirty.height(),PixelFormat.TRANSLUCENT,SurfaceControl.HIDDEN);
surfaceControl.setLayerStack(display.getLayerStack());
if (SHOW_TRANSACTIONS) {
  Slog.i(TAG,"String_Node_Str" + surfaceControl + "String_Node_Str");
}
Surface drawSurface=new Surface();
drawSurface.copyFrom(surfaceControl);
Canvas c=drawSurface.lockCanvas(dirty);
c.drawBitmap(nextAppTransitionThumbnail,0,0,null);
drawSurface.unlockCanvasAndPost(c);
drawSurface.release();
Animation anim;
if (mAppTransition.isNextThumbnailTransitionAspectScaled()) {
  anim=mAppTransition.createThumbnailAspectScaleAnimationLocked(displayInfo.appWidth,displayInfo.appHeight,displayInfo.logicalWidth,transit);
  openingAppAnimator.thumbnailForceAboveLayer=Math.max(topOpeningLayer,topClosingLayer);
  openingAppAnimator.deferThumbnailDestruction=!mAppTransition.isNextThumbnailTransitionScaleUp();
  if (openingAppAnimator.deferThumbnailDestruction) {
    if (closingAppAnimator != null && closingAppAnimator.animation != null) {
      closingAppAnimator.deferredThumbnail=surfaceControl;
    }
  }
}
 else {
  anim=mAppTransition.createThumbnailScaleAnimationLocked(displayInfo.appWidth,displayInfo.appHeight,transit);
}
anim.restrictDuration(MAX_ANIMATION_DURATION);
anim.scaleCurrentDuration(getTransitionAnimationScaleLocked());
openingAppAnimator.thumbnail=surfaceControl;
openingAppAnimator.thumbnailLayer=topOpeningLayer;
openingAppAnimator.thumbnailAnimation=anim;
openingAppAnimator.thumbnailX=mAppTransition.getStartingX();
openingAppAnimator.thumbnailY=mAppTransition.getStartingY();
}
 catch (OutOfResourcesException e) {
Slog.e(TAG,"String_Node_Str" + dirty.width() + "String_Node_Str"+ dirty.height(),e);
openingAppAnimator.clearThumbnail();
}
}
mAppTransition.postAnimationCallback();
mAppTransition.clear();
mOpeningApps.clear();
mClosingApps.clear();
changes|=WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT | WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG;
getDefaultDisplayContentLocked().layoutNeeded=true;
if (windows == getDefaultWindowListLocked() && !moveInputMethodWindowsIfNeededLocked(true)) {
assignLayersLocked(windows);
}
updateFocusedWindowLocked(UPDATE_FOCUS_PLACING_SURFACES,true);
mFocusMayChange=false;
}
return changes;
}

Fixed version (ground truth):
/** 
 * Extracted from   {@link #performLayoutAndPlaceSurfacesLockedInner} to reduce size of method.
 * @param windows List of windows on default display.
 * @return bitmap indicating if another pass through layout must be made.
 */
public int handleAppTransitionReadyLocked(WindowList windows){
  int changes=0;
  int i;
  int NN=mOpeningApps.size();
  boolean goodToGo=true;
  if (DEBUG_APP_TRANSITIONS)   Slog.v(TAG,"String_Node_Str" + NN + "String_Node_Str"+ mDisplayFrozen+ "String_Node_Str"+ mAppTransition.isTimeout()+ "String_Node_Str");
  if (!mDisplayFrozen && !mAppTransition.isTimeout()) {
    for (i=0; i < NN && goodToGo; i++) {
      AppWindowToken wtoken=mOpeningApps.valueAt(i);
      if (DEBUG_APP_TRANSITIONS)       Slog.v(TAG,"String_Node_Str" + wtoken + "String_Node_Str"+ wtoken.allDrawn+ "String_Node_Str"+ wtoken.startingDisplayed+ "String_Node_Str"+ wtoken.startingMoved);
      if (!wtoken.allDrawn && !wtoken.startingDisplayed && !wtoken.startingMoved) {
        goodToGo=false;
      }
    }
  }
  if (goodToGo) {
    if (DEBUG_APP_TRANSITIONS)     Slog.v(TAG,"String_Node_Str");
    int transit=mAppTransition.getAppTransition();
    if (mSkipAppTransitionAnimation) {
      transit=AppTransition.TRANSIT_UNSET;
    }
    mAppTransition.goodToGo();
    mStartingIconInTransition=false;
    mSkipAppTransitionAnimation=false;
    mH.removeMessages(H.APP_TRANSITION_TIMEOUT);
    rebuildAppWindowListLocked();
    WindowState oldWallpaper=mWallpaperTarget != null && mWallpaperTarget.mWinAnimator.isAnimating() && !mWallpaperTarget.mWinAnimator.isDummyAnimation() ? null : mWallpaperTarget;
    mInnerFields.mWallpaperMayChange=false;
    LayoutParams animLp=null;
    int bestAnimLayer=-1;
    boolean fullscreenAnim=false;
    boolean voiceInteraction=false;
    if (DEBUG_APP_TRANSITIONS)     Slog.v(TAG,"String_Node_Str" + mWallpaperTarget + "String_Node_Str"+ oldWallpaper+ "String_Node_Str"+ mLowerWallpaperTarget+ "String_Node_Str"+ mUpperWallpaperTarget);
    boolean openingAppHasWallpaper=false;
    boolean closingAppHasWallpaper=false;
    final AppWindowToken lowerWallpaperAppToken;
    final AppWindowToken upperWallpaperAppToken;
    if (mLowerWallpaperTarget == null) {
      lowerWallpaperAppToken=upperWallpaperAppToken=null;
    }
 else {
      lowerWallpaperAppToken=mLowerWallpaperTarget.mAppToken;
      upperWallpaperAppToken=mUpperWallpaperTarget.mAppToken;
    }
    final int NC=mClosingApps.size();
    NN=NC + mOpeningApps.size();
    for (i=0; i < NN; i++) {
      final AppWindowToken wtoken;
      if (i < NC) {
        wtoken=mClosingApps.valueAt(i);
        if (wtoken == lowerWallpaperAppToken || wtoken == upperWallpaperAppToken) {
          closingAppHasWallpaper=true;
        }
      }
 else {
        wtoken=mOpeningApps.valueAt(i - NC);
        if (wtoken == lowerWallpaperAppToken || wtoken == upperWallpaperAppToken) {
          openingAppHasWallpaper=true;
        }
      }
      voiceInteraction|=wtoken.voiceInteraction;
      if (wtoken.appFullscreen) {
        WindowState ws=wtoken.findMainWindow();
        if (ws != null) {
          animLp=ws.mAttrs;
          bestAnimLayer=ws.mLayer;
          fullscreenAnim=true;
        }
      }
 else       if (!fullscreenAnim) {
        WindowState ws=wtoken.findMainWindow();
        if (ws != null) {
          if (ws.mLayer > bestAnimLayer) {
            animLp=ws.mAttrs;
            bestAnimLayer=ws.mLayer;
          }
        }
      }
    }
    mAnimateWallpaperWithTarget=false;
    if (closingAppHasWallpaper && openingAppHasWallpaper) {
      if (DEBUG_APP_TRANSITIONS)       Slog.v(TAG,"String_Node_Str");
switch (transit) {
case AppTransition.TRANSIT_ACTIVITY_OPEN:
case AppTransition.TRANSIT_TASK_OPEN:
case AppTransition.TRANSIT_TASK_TO_FRONT:
        transit=AppTransition.TRANSIT_WALLPAPER_INTRA_OPEN;
      break;
case AppTransition.TRANSIT_ACTIVITY_CLOSE:
case AppTransition.TRANSIT_TASK_CLOSE:
case AppTransition.TRANSIT_TASK_TO_BACK:
    transit=AppTransition.TRANSIT_WALLPAPER_INTRA_CLOSE;
  break;
}
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,"String_Node_Str" + transit);
}
 else if ((oldWallpaper != null) && !mOpeningApps.isEmpty() && !mOpeningApps.contains(oldWallpaper.mAppToken)) {
transit=AppTransition.TRANSIT_WALLPAPER_CLOSE;
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,"String_Node_Str" + transit);
}
 else if (mWallpaperTarget != null && mWallpaperTarget.isVisibleLw()) {
transit=AppTransition.TRANSIT_WALLPAPER_OPEN;
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,"String_Node_Str" + transit);
}
 else {
mAnimateWallpaperWithTarget=true;
}
if (!mPolicy.allowAppAnimationsLw()) {
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,"String_Node_Str");
animLp=null;
}
AppWindowToken topOpeningApp=null;
AppWindowToken topClosingApp=null;
int topOpeningLayer=0;
int topClosingLayer=0;
NN=mOpeningApps.size();
for (i=0; i < NN; i++) {
AppWindowToken wtoken=mOpeningApps.valueAt(i);
final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,"String_Node_Str" + wtoken);
appAnimator.clearThumbnail();
appAnimator.animation=null;
wtoken.inPendingTransaction=false;
setTokenVisibilityLocked(wtoken,animLp,true,transit,false,voiceInteraction);
wtoken.updateReportedVisibilityLocked();
wtoken.waitingToShow=false;
appAnimator.mAllAppWinAnimators.clear();
final int N=wtoken.allAppWindows.size();
for (int j=0; j < N; j++) {
appAnimator.mAllAppWinAnimators.add(wtoken.allAppWindows.get(j).mWinAnimator);
}
mAnimator.mAnimating|=appAnimator.showAllWindowsLocked();
if (animLp != null) {
int layer=-1;
for (int j=0; j < wtoken.windows.size(); j++) {
  WindowState win=wtoken.windows.get(j);
  if (win.mWinAnimator.mAnimLayer > layer) {
    layer=win.mWinAnimator.mAnimLayer;
  }
}
if (topOpeningApp == null || layer > topOpeningLayer) {
  topOpeningApp=wtoken;
  topOpeningLayer=layer;
}
}
}
NN=mClosingApps.size();
for (i=0; i < NN; i++) {
AppWindowToken wtoken=mClosingApps.valueAt(i);
final AppWindowAnimator appAnimator=wtoken.mAppAnimator;
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,"String_Node_Str" + wtoken);
appAnimator.clearThumbnail();
appAnimator.animation=null;
wtoken.inPendingTransaction=false;
setTokenVisibilityLocked(wtoken,animLp,false,transit,false,voiceInteraction);
wtoken.updateReportedVisibilityLocked();
wtoken.waitingToHide=false;
wtoken.allDrawn=true;
wtoken.deferClearAllDrawn=false;
if (wtoken.startingWindow != null && !wtoken.startingWindow.mExiting) {
scheduleRemoveStartingWindow(wtoken);
}
if (animLp != null) {
int layer=-1;
for (int j=0; j < wtoken.windows.size(); j++) {
  WindowState win=wtoken.windows.get(j);
  if (win.mWinAnimator.mAnimLayer > layer) {
    layer=win.mWinAnimator.mAnimLayer;
  }
}
if (topClosingApp == null || layer > topClosingLayer) {
  topClosingApp=wtoken;
  topClosingLayer=layer;
}
}
}
AppWindowAnimator openingAppAnimator=(topOpeningApp == null) ? null : topOpeningApp.mAppAnimator;
AppWindowAnimator closingAppAnimator=(topClosingApp == null) ? null : topClosingApp.mAppAnimator;
Bitmap nextAppTransitionThumbnail=mAppTransition.getNextAppTransitionThumbnail();
if (nextAppTransitionThumbnail != null && openingAppAnimator != null && openingAppAnimator.animation != null && nextAppTransitionThumbnail.getConfig() != Config.ALPHA_8) {
Rect dirty=new Rect(0,0,nextAppTransitionThumbnail.getWidth(),nextAppTransitionThumbnail.getHeight());
try {
final DisplayContent displayContent=getDefaultDisplayContentLocked();
final Display display=displayContent.getDisplay();
final DisplayInfo displayInfo=displayContent.getDisplayInfo();
SurfaceControl surfaceControl=new SurfaceControl(mFxSession,"String_Node_Str",dirty.width(),dirty.height(),PixelFormat.TRANSLUCENT,SurfaceControl.HIDDEN);
surfaceControl.setLayerStack(display.getLayerStack());
if (SHOW_TRANSACTIONS) {
  Slog.i(TAG,"String_Node_Str" + surfaceControl + "String_Node_Str");
}
Surface drawSurface=new Surface();
drawSurface.copyFrom(surfaceControl);
Canvas c=drawSurface.lockCanvas(dirty);
c.drawBitmap(nextAppTransitionThumbnail,0,0,null);
drawSurface.unlockCanvasAndPost(c);
drawSurface.release();
Animation anim;
if (mAppTransition.isNextThumbnailTransitionAspectScaled()) {
  anim=mAppTransition.createThumbnailAspectScaleAnimationLocked(displayInfo.appWidth,displayInfo.appHeight,displayInfo.logicalWidth,transit);
  openingAppAnimator.thumbnailForceAboveLayer=Math.max(topOpeningLayer,topClosingLayer);
  openingAppAnimator.deferThumbnailDestruction=!mAppTransition.isNextThumbnailTransitionScaleUp();
  if (openingAppAnimator.deferThumbnailDestruction) {
    if (closingAppAnimator != null && closingAppAnimator.animation != null) {
      closingAppAnimator.deferredThumbnail=surfaceControl;
    }
  }
}
 else {
  anim=mAppTransition.createThumbnailScaleAnimationLocked(displayInfo.appWidth,displayInfo.appHeight,transit);
}
anim.restrictDuration(MAX_ANIMATION_DURATION);
anim.scaleCurrentDuration(getTransitionAnimationScaleLocked());
openingAppAnimator.thumbnail=surfaceControl;
openingAppAnimator.thumbnailLayer=topOpeningLayer;
openingAppAnimator.thumbnailAnimation=anim;
openingAppAnimator.thumbnailX=mAppTransition.getStartingX();
openingAppAnimator.thumbnailY=mAppTransition.getStartingY();
}
 catch (OutOfResourcesException e) {
Slog.e(TAG,"String_Node_Str" + dirty.width() + "String_Node_Str"+ dirty.height(),e);
openingAppAnimator.clearThumbnail();
}
}
mAppTransition.postAnimationCallback();
mAppTransition.clear();
mOpeningApps.clear();
mClosingApps.clear();
changes|=WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT | WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG;
getDefaultDisplayContentLocked().layoutNeeded=true;
if (windows == getDefaultWindowListLocked() && !moveInputMethodWindowsIfNeededLocked(true)) {
assignLayersLocked(windows);
}
updateFocusedWindowLocked(UPDATE_FOCUS_PLACING_SURFACES,true);
mFocusMayChange=false;
}
return changes;
}