diff --git a/services/core/java/com/android/server/wm/RecentTasks.java b/services/core/java/com/android/server/wm/RecentTasks.java index df5356303f8bf..3c64ffb237d67 100644 --- a/services/core/java/com/android/server/wm/RecentTasks.java +++ b/services/core/java/com/android/server/wm/RecentTasks.java @@ -1627,8 +1627,8 @@ class RecentTasks { } if (DEBUG_RECENTS) Slog.d(TAG_RECENTS, "addRecent: adding affilliates starting at " + topIndex + " from intial " + taskIndex); - // Find the end of the chain, doing a sanity check along the way. - boolean sane = top.mAffiliatedTaskId == task.mAffiliatedTaskId; + // Find the end of the chain, doing a validity check along the way. + boolean isValid = top.mAffiliatedTaskId == task.mAffiliatedTaskId; int endIndex = topIndex; Task prev = top; while (endIndex < recentsCount) { @@ -1640,7 +1640,7 @@ class RecentTasks { if (cur.mNextAffiliate != null || cur.mNextAffiliateTaskId != INVALID_TASK_ID) { Slog.wtf(TAG, "Bad chain @" + endIndex + ": first task has next affiliate: " + prev); - sane = false; + isValid = false; break; } } else { @@ -1652,7 +1652,7 @@ class RecentTasks { + " has bad next affiliate " + cur.mNextAffiliate + " id " + cur.mNextAffiliateTaskId + ", expected " + prev); - sane = false; + isValid = false; break; } } @@ -1662,7 +1662,7 @@ class RecentTasks { Slog.wtf(TAG, "Bad chain @" + endIndex + ": last task " + cur + " has previous affiliate " + cur.mPrevAffiliate); - sane = false; + isValid = false; } if (DEBUG_RECENTS) Slog.d(TAG_RECENTS, "addRecent: end of chain @" + endIndex); break; @@ -1673,7 +1673,7 @@ class RecentTasks { + ": task " + cur + " has previous affiliate " + cur.mPrevAffiliate + " but should be id " + cur.mPrevAffiliate); - sane = false; + isValid = false; break; } } @@ -1682,7 +1682,7 @@ class RecentTasks { + ": task " + cur + " has affiliated id " + cur.mAffiliatedTaskId + " but should be " + task.mAffiliatedTaskId); - sane = false; + isValid = false; break; } prev = cur; @@ -1690,18 +1690,18 @@ class RecentTasks { if (endIndex >= recentsCount) { Slog.wtf(TAG, "Bad chain ran off index " + endIndex + ": last task " + prev); - sane = false; + isValid = false; break; } } - if (sane) { + if (isValid) { if (endIndex < taskIndex) { Slog.wtf(TAG, "Bad chain @" + endIndex + ": did not extend to task " + task + " @" + taskIndex); - sane = false; + isValid = false; } } - if (sane) { + if (isValid) { // All looks good, we can just move all of the affiliated tasks // to the top. for (int i=topIndex; i<=endIndex; i++) { diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java index b3a3ed7eeba4d..fe2d08f6a4c23 100644 --- a/services/core/java/com/android/server/wm/RootWindowContainer.java +++ b/services/core/java/com/android/server/wm/RootWindowContainer.java @@ -737,7 +737,7 @@ class RootWindowContainer extends WindowContainer winAnimator.mSession.mPid, operation); final long callingIdentity = Binder.clearCallingIdentity(); try { - // There was some problem...first, do a sanity check of the window list to make sure + // There was some problem...first, do a validity check of the window list to make sure // we haven't left any dangling surfaces around. Slog.i(TAG_WM, "Out of memory for surface! Looking for leaks..."); @@ -811,7 +811,7 @@ class RootWindowContainer extends WindowContainer } // "Something has changed! Let's make it correct now." - // TODO: Super crazy long method that should be broken down... + // TODO: Super long method that should be broken down... void performSurfacePlacementNoTrace() { if (DEBUG_WINDOW_TRACE) Slog.v(TAG, "performSurfacePlacementInner: entry. Called by " + Debug.getCallers(3)); diff --git a/services/core/java/com/android/server/wm/TaskSnapshotController.java b/services/core/java/com/android/server/wm/TaskSnapshotController.java index 68445f6970fb7..dbbb7ff69b3b8 100644 --- a/services/core/java/com/android/server/wm/TaskSnapshotController.java +++ b/services/core/java/com/android/server/wm/TaskSnapshotController.java @@ -27,7 +27,6 @@ import android.annotation.Nullable; import android.app.ActivityManager.TaskSnapshot; import android.content.pm.PackageManager; import android.graphics.Bitmap; -import android.graphics.Insets; import android.graphics.PixelFormat; import android.graphics.Point; import android.graphics.RecordingCanvas; @@ -82,7 +81,7 @@ class TaskSnapshotController { /** * Return value for {@link #getSnapshotMode}: We are not allowed to take a real screenshot but - * we should try to use the app theme to create a dummy representation of the app. + * we should try to use the app theme to create a fake representation of the app. */ @VisibleForTesting static final int SNAPSHOT_MODE_APP_THEME = 1; diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index b33a8e9ef5df4..7624d4c1ea363 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -3612,7 +3612,7 @@ public class WindowManagerService extends IWindowManager.Stub } if (SHOW_VERBOSE_TRANSACTIONS) Slog.i(TAG_WM, ">>> showStrictModeViolation"); - // TODO: Modify this to use the surface trace once it is not going crazy. + // TODO: Modify this to use the surface trace once it is not going baffling. // b/31532461 // TODO(multi-display): support multiple displays if (mStrictModeFlash == null) { diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index ebbd74aa7d1e4..49e623d8dd117 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -2456,9 +2456,7 @@ class WindowState extends WindowContainer implements WindowManagerP finishInputEvent(event, true); } } - /** - * Dummy event receiver for windows that died visible. - */ + /** Fake event receiver for windows that died visible. */ private DeadWindowEventReceiver mDeadWindowEventReceiver; void openInputChannel(InputChannel outInputChannel) { @@ -2476,9 +2474,9 @@ class WindowState extends WindowContainer implements WindowManagerP mClientChannel.dispose(); mClientChannel = null; } else { - // If the window died visible, we setup a dummy input channel, so that taps + // If the window died visible, we setup a fake input channel, so that taps // can still detected by input monitor channel, and we can relaunch the app. - // Create dummy event receiver that simply reports all events as handled. + // Create fake event receiver that simply reports all events as handled. mDeadWindowEventReceiver = new DeadWindowEventReceiver(mClientChannel); } mWmService.mInputToWindowMap.put(mInputWindowHandle.token, this); diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index 16edb55939a32..92177abbbf856 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -560,9 +560,9 @@ class WindowStateAnimator { } } - // Something is wrong and SurfaceFlinger will not like this, try to revert to sane values. - // This doesn't necessarily mean that there is an error in the system. The sizes might be - // incorrect, because it is before the first layout or draw. + // Something is wrong and SurfaceFlinger will not like this, try to revert to reasonable + // values. This doesn't necessarily mean that there is an error in the system. The sizes + // might be incorrect, because it is before the first layout or draw. if (outSize.width() < 1) { outSize.right = 1; }