Cleaned-up some code in WindowManager
This CL has no functional changes and I am just breaking this change
out of another large CL I am working on.
Test: existing tests pass.
Change-Id: I4c93e2b1820dc31ba28f81692f2f8f6081e1f315
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 42e9e23..fb37c9f 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -127,7 +127,7 @@
final WindowManagerService mService;
/** Remove this display when animation on it has completed. */
- boolean mDeferredRemoval;
+ private boolean mDeferredRemoval;
final DockedStackDividerController mDividerControllerLocked;
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index 1700bca..9bd3118 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -106,7 +106,7 @@
private long mUserActivityTimeout = -1;
private boolean mUpdateRotation = false;
private boolean mObscured = false;
- boolean mSyswin = false;
+ private boolean mSyswin = false;
// Set to true when the display contains content to show the user.
// When false, the display manager may choose to mirror or blank the display.
private boolean mDisplayHasContent = false;
@@ -116,7 +116,7 @@
// Last window that requires screen wakelock
WindowState mHoldScreenWindow = null;
// Last window that obscures all windows below
- WindowState mObsuringWindow = null;
+ WindowState mObscuringWindow = null;
// Only set while traversing the default display based on its content.
// Affects the behavior of mirroring on secondary displays.
private boolean mObscureApplicationContentOnSecondaryDisplays = false;
@@ -368,7 +368,7 @@
* Callback used to trigger bounds update after configuration change and get ids of stacks whose
* bounds were updated.
*/
- int[] updateStackBoundsAfterConfigChange() {
+ private int[] updateStackBoundsAfterConfigChange() {
mChangedStackList.clear();
final int numDisplays = mChildren.size();
@@ -969,7 +969,7 @@
// TODO: Super crazy long method that should be broken down...
private void applySurfaceChangesTransaction(boolean recoveringMemory, int defaultDw, int defaultDh) {
mHoldScreenWindow = null;
- mObsuringWindow = null;
+ mObscuringWindow = null;
if (mService.mWatermark != null) {
mService.mWatermark.positionSurface(defaultDw, defaultDh);
@@ -1195,7 +1195,7 @@
// so we want to leave all of them as undimmed (for
// performance reasons).
if (!mObscured) {
- mObsuringWindow = w;
+ mObscuringWindow = w;
}
mObscured = true;
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 9f81105..12ad09c 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -166,6 +166,7 @@
import java.util.Iterator;
import java.util.List;
+import static android.Manifest.permission.MANAGE_APP_TOKENS;
import static android.app.ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT;
import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
import static android.app.ActivityManager.StackId.PINNED_STACK_ID;
@@ -203,6 +204,7 @@
import static android.view.WindowManagerGlobal.RELAYOUT_DEFER_SURFACE_DESTROY;
import static android.view.WindowManagerGlobal.RELAYOUT_RES_SURFACE_CHANGED;
import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
+import static com.android.server.EventLogTags.WM_TASK_CREATED;
import static com.android.server.wm.AppTransition.TRANSIT_UNSET;
import static com.android.server.wm.AppWindowAnimator.PROLONG_ANIMATION_AT_END;
import static com.android.server.wm.AppWindowAnimator.PROLONG_ANIMATION_AT_START;
@@ -2738,10 +2740,8 @@
== PackageManager.PERMISSION_GRANTED) {
return true;
}
- String msg = "Permission Denial: " + func + " from pid="
- + Binder.getCallingPid()
- + ", uid=" + Binder.getCallingUid()
- + " requires " + permission;
+ final String msg = "Permission Denial: " + func + " from pid=" + Binder.getCallingPid()
+ + ", uid=" + Binder.getCallingUid() + " requires " + permission;
Slog.w(TAG_WM, msg);
return false;
}
@@ -2760,8 +2760,7 @@
@Override
public void addWindowToken(IBinder token, int type) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "addWindowToken()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "addWindowToken()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -2780,8 +2779,7 @@
@Override
public void removeWindowToken(IBinder token) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "removeWindowToken()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "removeWindowToken()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -2808,9 +2806,9 @@
+ " atoken=" + atoken + " bounds=" + bounds);
final TaskStack stack = mStackIdToStack.get(stackId);
if (stack == null) {
- throw new IllegalArgumentException("addAppToken: invalid stackId=" + stackId);
+ throw new IllegalArgumentException("createTaskLocked: invalid stackId=" + stackId);
}
- EventLog.writeEvent(EventLogTags.WM_TASK_CREATED, taskId, stackId);
+ EventLog.writeEvent(WM_TASK_CREATED, taskId, stackId);
Task task = new Task(taskId, stack, userId, this, bounds, overrideConfig, isOnTopLauncher);
mTaskIdToTask.put(taskId, task);
stack.addTask(task, !atoken.mLaunchTaskBehind /* toTop */, atoken.showForAllUsers);
@@ -2824,8 +2822,7 @@
Rect taskBounds, Configuration overrideConfig, int taskResizeMode,
boolean alwaysFocusable, boolean homeTask, int targetSdkVersion,
int rotationAnimationHint, boolean isOnTopLauncher) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "addAppToken()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "addAppToken()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -2880,8 +2877,7 @@
public void setAppTask(IBinder token, int taskId, int stackId, Rect taskBounds,
Configuration overrideConfig, int taskResizeMode, boolean homeTask,
boolean isOnTopLauncher) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "setAppTask()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppTask()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -2978,8 +2974,7 @@
@Override
public Configuration updateOrientationFromAppTokens(
Configuration currentConfig, IBinder freezeThisOneIfNeeded) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "updateOrientationFromAppTokens()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "updateOrientationFromAppTokens()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -3092,8 +3087,7 @@
@Override
public int[] setNewConfiguration(Configuration config) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "setNewConfiguration()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "setNewConfiguration()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -3118,8 +3112,7 @@
@Override
public void setAppOrientation(IApplicationToken token, int requestedOrientation) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "setAppOrientation()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppOrientation()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -3158,8 +3151,7 @@
@Override
public void setFocusedApp(IBinder token, boolean moveFocusNow) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "setFocusedApp()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "setFocusedApp()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -3200,8 +3192,7 @@
*/
@Override
public void prepareAppTransition(int transit, boolean alwaysKeepCurrent) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "prepareAppTransition()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "prepareAppTransition()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
@@ -3329,8 +3320,7 @@
@Override
public void executeAppTransition() {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "executeAppTransition()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "executeAppTransition()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -3354,8 +3344,7 @@
int theme, CompatibilityInfo compatInfo,
CharSequence nonLocalizedLabel, int labelRes, int icon, int logo,
int windowFlags, IBinder transferFrom, boolean createIfNeeded) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "setAppStartingWindow()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppStartingWindow()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -3426,7 +3415,7 @@
}
}
- if (wtoken != null && wtoken.transferStartingWindow(transferFrom)) {
+ if (wtoken.transferStartingWindow(transferFrom)) {
return true;
}
@@ -3473,10 +3462,10 @@
}
}
- public void setWindowOpaqueLocked(IBinder token, boolean isOpaque) {
- AppWindowToken wtoken = findAppWindowToken(token);
+ private void setWindowOpaqueLocked(IBinder token, boolean isOpaque) {
+ final AppWindowToken wtoken = findAppWindowToken(token);
if (wtoken != null) {
- WindowState win = wtoken.findMainWindow();
+ final WindowState win = wtoken.findMainWindow();
if (win != null) {
win.mWinAnimator.setOpaqueLocked(isOpaque);
}
@@ -3494,8 +3483,7 @@
@Override
public void notifyAppResumed(IBinder token, boolean wasStopped, boolean allowSavedSurface) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "notifyAppResumed()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "notifyAppResumed()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -3512,8 +3500,7 @@
@Override
public void notifyAppStopped(IBinder token) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "notifyAppStopped()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "notifyAppStopped()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -3530,8 +3517,7 @@
@Override
public void setAppVisibility(IBinder token, boolean visible) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "setAppVisibility()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppVisibility()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -3648,8 +3634,7 @@
@Override
public void startAppFreezingScreen(IBinder token, int configChanges) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "setAppFreezingScreen()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppFreezingScreen()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -3672,19 +3657,18 @@
@Override
public void stopAppFreezingScreen(IBinder token, boolean force) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "setAppFreezingScreen()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppFreezingScreen()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
- AppWindowToken wtoken = findAppWindowToken(token);
+ final AppWindowToken wtoken = findAppWindowToken(token);
if (wtoken == null || wtoken.appToken == null) {
return;
}
final long origId = Binder.clearCallingIdentity();
- if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Clear freezing of " + token
- + ": hidden=" + wtoken.hidden + " freezing=" + wtoken.mAppAnimator.freezingScreen);
+ if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Clear freezing of " + token + ": hidden="
+ + wtoken.hidden + " freezing=" + wtoken.mAppAnimator.freezingScreen);
wtoken.stopFreezingScreen(true, force);
Binder.restoreCallingIdentity(origId);
}
@@ -3692,8 +3676,7 @@
@Override
public void removeAppToken(IBinder token) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "removeAppToken()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "removeAppToken()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -6628,8 +6611,7 @@
@Override
public void pauseKeyDispatching(IBinder _token) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "pauseKeyDispatching()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "pauseKeyDispatching()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -6643,8 +6625,7 @@
@Override
public void resumeKeyDispatching(IBinder _token) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "resumeKeyDispatching()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "resumeKeyDispatching()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -6658,8 +6639,7 @@
@Override
public void setEventDispatching(boolean enabled) {
- if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
- "setEventDispatching()")) {
+ if (!checkCallingPermission(MANAGE_APP_TOKENS, "setEventDispatching()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
@@ -8133,10 +8113,10 @@
} else {
if (DEBUG_KEEP_SCREEN_ON) {
Slog.d(TAG_KEEP_SCREEN_ON, "Releasing screen wakelock, obscured by "
- + mRoot.mObsuringWindow);
+ + mRoot.mObscuringWindow);
}
mLastWakeLockHoldingWindow = null;
- mLastWakeLockObscuringWindow = mRoot.mObsuringWindow;
+ mLastWakeLockObscuringWindow = mRoot.mObscuringWindow;
mPolicy.keepScreenOnStoppedLw();
mHoldingScreenWakeLock.release();
}
@@ -8711,17 +8691,17 @@
return getDefaultDisplayContentLocked().getDockedDividerController().getContentInsets();
}
- void dumpPolicyLocked(PrintWriter pw, String[] args, boolean dumpAll) {
+ private void dumpPolicyLocked(PrintWriter pw, String[] args, boolean dumpAll) {
pw.println("WINDOW MANAGER POLICY STATE (dumpsys window policy)");
mPolicy.dump(" ", pw, args);
}
- void dumpAnimatorLocked(PrintWriter pw, String[] args, boolean dumpAll) {
+ private void dumpAnimatorLocked(PrintWriter pw, String[] args, boolean dumpAll) {
pw.println("WINDOW MANAGER ANIMATOR STATE (dumpsys window animator)");
mAnimator.dumpLocked(pw, " ", dumpAll);
}
- void dumpTokensLocked(PrintWriter pw, boolean dumpAll) {
+ private void dumpTokensLocked(PrintWriter pw, boolean dumpAll) {
pw.println("WINDOW MANAGER TOKENS (dumpsys window tokens)");
if (!mTokenMap.isEmpty()) {
pw.println(" All tokens:");
@@ -8764,7 +8744,7 @@
}
}
- void dumpSessionsLocked(PrintWriter pw, boolean dumpAll) {
+ private void dumpSessionsLocked(PrintWriter pw, boolean dumpAll) {
pw.println("WINDOW MANAGER SESSIONS (dumpsys window sessions)");
for (int i=0; i<mSessions.size(); i++) {
Session s = mSessions.valueAt(i);
@@ -8773,13 +8753,13 @@
}
}
- void dumpWindowsLocked(PrintWriter pw, boolean dumpAll,
+ private void dumpWindowsLocked(PrintWriter pw, boolean dumpAll,
ArrayList<WindowState> windows) {
pw.println("WINDOW MANAGER WINDOWS (dumpsys window windows)");
dumpWindowsNoHeaderLocked(pw, dumpAll, windows);
}
- void dumpWindowsNoHeaderLocked(PrintWriter pw, boolean dumpAll,
+ private void dumpWindowsNoHeaderLocked(PrintWriter pw, boolean dumpAll,
ArrayList<WindowState> windows) {
mRoot.dumpWindowsNoHeader(pw, dumpAll, windows);
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 435b1d2..184b6cd 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -157,7 +157,7 @@
// to capture touch events in that area.
static final int RESIZE_HANDLE_WIDTH_IN_DP = 30;
- static final boolean DEBUG_DISABLE_SAVING_SURFACES = false;
+ private static final boolean DEBUG_DISABLE_SAVING_SURFACES = false;
final WindowManagerService mService;
final WindowManagerPolicy mPolicy;
@@ -182,7 +182,7 @@
final boolean mLayoutAttached;
final boolean mIsImWindow;
final boolean mIsWallpaper;
- final boolean mIsFloatingLayer;
+ private final boolean mIsFloatingLayer;
int mSeq;
boolean mEnforceSizeCompat;
int mViewVisibility;
@@ -199,16 +199,16 @@
* animation is done.
*/
boolean mPolicyVisibilityAfterAnim = true;
- boolean mAppOpVisibility = true;
+ private boolean mAppOpVisibility = true;
boolean mPermanentlyHidden; // the window should never be shown again
boolean mAppFreezing;
boolean mHidden; // Used to determine if to show child windows.
boolean mWallpaperVisible; // for wallpaper, what was last vis report?
- boolean mDragResizing;
- boolean mDragResizingChangeReported;
- int mResizeMode;
+ private boolean mDragResizing;
+ private boolean mDragResizingChangeReported;
+ private int mResizeMode;
- RemoteCallbackList<IWindowFocusObserver> mFocusCallbacks;
+ private RemoteCallbackList<IWindowFocusObserver> mFocusCallbacks;
/**
* The window size that was requested by the application. These are in
@@ -216,8 +216,8 @@
*/
int mRequestedWidth;
int mRequestedHeight;
- int mLastRequestedWidth;
- int mLastRequestedHeight;
+ private int mLastRequestedWidth;
+ private int mLastRequestedHeight;
int mLayer;
boolean mHaveFrame;
@@ -244,8 +244,8 @@
* coordinate space (without compatibility scale applied).
*/
final Rect mVisibleInsets = new Rect();
- final Rect mLastVisibleInsets = new Rect();
- boolean mVisibleInsetsChanged;
+ private final Rect mLastVisibleInsets = new Rect();
+ private boolean mVisibleInsetsChanged;
/**
* Insets that are covered by system windows (such as the status bar) and
@@ -254,31 +254,31 @@
*/
final Rect mContentInsets = new Rect();
final Rect mLastContentInsets = new Rect();
- boolean mContentInsetsChanged;
+ private boolean mContentInsetsChanged;
/**
* Insets that determine the area covered by the display overscan region. These are in the
* application's coordinate space (without compatibility scale applied).
*/
final Rect mOverscanInsets = new Rect();
- final Rect mLastOverscanInsets = new Rect();
- boolean mOverscanInsetsChanged;
+ private final Rect mLastOverscanInsets = new Rect();
+ private boolean mOverscanInsetsChanged;
/**
* Insets that determine the area covered by the stable system windows. These are in the
* application's coordinate space (without compatibility scale applied).
*/
final Rect mStableInsets = new Rect();
- final Rect mLastStableInsets = new Rect();
- boolean mStableInsetsChanged;
+ private final Rect mLastStableInsets = new Rect();
+ private boolean mStableInsetsChanged;
/**
* Outsets determine the area outside of the surface where we want to pretend that it's possible
* to draw anyway.
*/
final Rect mOutsets = new Rect();
- final Rect mLastOutsets = new Rect();
- boolean mOutsetsChanged = false;
+ private final Rect mLastOutsets = new Rect();
+ private boolean mOutsetsChanged = false;
/**
* Set to true if we are waiting for this window to receive its
@@ -321,14 +321,14 @@
// "Real" frame that the application sees, in display coordinate space.
final Rect mFrame = new Rect();
final Rect mLastFrame = new Rect();
- boolean mFrameSizeChanged = false;
+ private boolean mFrameSizeChanged = false;
// Frame that is scaled to the application's coordinate space when in
// screen size compatibility mode.
final Rect mCompatFrame = new Rect();
final Rect mContainingFrame = new Rect();
- final Rect mParentFrame = new Rect();
+ private final Rect mParentFrame = new Rect();
// The entire screen area of the {@link TaskStack} this window is in. Usually equal to the
// screen area of the device.
@@ -338,11 +338,11 @@
// is mostly a special case for TV where some displays don’t have the entire display usable.
// {@link WindowManager.LayoutParams#FLAG_LAYOUT_IN_OVERSCAN} flag can be used to allow
// window display contents to extend into the overscan region.
- final Rect mOverscanFrame = new Rect();
+ private final Rect mOverscanFrame = new Rect();
// The display frame minus the stable insets. This value is always constant regardless of if
// the status bar or navigation bar is visible.
- final Rect mStableFrame = new Rect();
+ private final Rect mStableFrame = new Rect();
// The area not occupied by the status and navigation bars. So, if both status and navigation
// bars are visible, the decor frame is equal to the stable frame.
@@ -350,7 +350,7 @@
// Equal to the decor frame if the IME (e.g. keyboard) is not present. Equal to the decor frame
// minus the area occupied by the IME if the IME is present.
- final Rect mContentFrame = new Rect();
+ private final Rect mContentFrame = new Rect();
// Legacy stuff. Generally equal to the content frame expect when the IME for older apps
// displays hint text.
@@ -358,13 +358,13 @@
// Frame that includes dead area outside of the surface but where we want to pretend that it's
// possible to draw.
- final Rect mOutsetFrame = new Rect();
+ private final Rect mOutsetFrame = new Rect();
/**
* Usually empty. Set to the task's tempInsetFrame. See
*{@link android.app.IActivityManager#resizeDockedStack}.
*/
- final Rect mInsetFrame = new Rect();
+ private final Rect mInsetFrame = new Rect();
boolean mContentChanged;
@@ -446,7 +446,7 @@
* or some other higher level component said so (e.g. activity manager).
* TODO: We should either have different booleans for the removal reason or use a bit-field.
*/
- boolean mWindowRemovalAllowed;
+ private boolean mWindowRemovalAllowed;
/**
* Temp for keeping track of windows that have been removed when
@@ -457,18 +457,18 @@
// Input channel and input window handle used by the input dispatcher.
final InputWindowHandle mInputWindowHandle;
InputChannel mInputChannel;
- InputChannel mClientChannel;
+ private InputChannel mClientChannel;
// Used to improve performance of toString()
- String mStringNameCache;
- CharSequence mLastTitle;
- boolean mWasExiting;
+ private String mStringNameCache;
+ private CharSequence mLastTitle;
+ private boolean mWasExiting;
final WindowStateAnimator mWinAnimator;
boolean mHasSurface = false;
- boolean mNotOnAppsDisplay = false;
+ private boolean mNotOnAppsDisplay = false;
DisplayContent mDisplayContent;
/** When true this window can be displayed on screens owther than mOwnerUid's */
@@ -486,26 +486,26 @@
// Whether the window was visible when we set the app to invisible last time. WM uses
// this as a hint to restore the surface (if available) for early animation next time
// the app is brought visible.
- boolean mWasVisibleBeforeClientHidden;
+ private boolean mWasVisibleBeforeClientHidden;
// This window will be replaced due to relaunch. This allows window manager
// to differentiate between simple removal of a window and replacement. In the latter case it
// will preserve the old window until the new one is drawn.
boolean mWillReplaceWindow = false;
// If true, the replaced window was already requested to be removed.
- boolean mReplacingRemoveRequested = false;
+ private boolean mReplacingRemoveRequested = false;
// Whether the replacement of the window should trigger app transition animation.
- boolean mAnimateReplacingWindow = false;
+ private boolean mAnimateReplacingWindow = false;
// If not null, the window that will be used to replace the old one. This is being set when
// the window is added and unset when this window reports its first draw.
- WindowState mReplacementWindow = null;
+ private WindowState mReplacementWindow = null;
// For the new window in the replacement transition, if we have
// requested to replace without animation, then we should
// make sure we also don't apply an enter animation for
// the new window.
boolean mSkipEnterAnimationForSeamlessReplacement = false;
// Whether this window is being moved via the resize API
- boolean mMovedByResize;
+ private boolean mMovedByResize;
/**
* Wake lock for drawing.
@@ -514,7 +514,7 @@
* who is preventing the system from suspending.
* This lock is only acquired on first use.
*/
- PowerManager.WakeLock mDrawLock;
+ private PowerManager.WakeLock mDrawLock;
final private Rect mTmpRect = new Rect();
diff --git a/services/core/java/com/android/server/wm/WindowSurfacePlacer.java b/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
index f4d5c8e..cbdd181 100644
--- a/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
+++ b/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
@@ -9,7 +9,6 @@
import static android.view.WindowManager.LayoutParams.TYPE_DREAM;
import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG;
import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT;
-import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
import static com.android.server.wm.AppTransition.TRANSIT_ACTIVITY_CLOSE;
import static com.android.server.wm.AppTransition.TRANSIT_ACTIVITY_OPEN;
import static com.android.server.wm.AppTransition.TRANSIT_TASK_CLOSE;
@@ -897,6 +896,6 @@
public void dump(PrintWriter pw, String prefix) {
pw.println(prefix + "mTraversalScheduled=" + mTraversalScheduled);
pw.println(prefix + "mHoldScreenWindow=" + mService.mRoot.mHoldScreenWindow);
- pw.println(prefix + "mObsuringWindow=" + mService.mRoot.mObsuringWindow);
+ pw.println(prefix + "mObscuringWindow=" + mService.mRoot.mObscuringWindow);
}
}