From c2f20b66fd28c10e2ec8654bd74cb501eb7f837b Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Fri, 8 Aug 2014 12:10:36 -0700 Subject: [PATCH] No need to send PRE_BOOT_COMPLETED for new users Since the primary purpose is to upgrade databases, no need to send this broadcast. If system apps care to be informed early on new user creation, USER_INITIALIZE is an early broadcast. Also remove some logs that spew when switching users. Bug: 16846465 Change-Id: Ibd7f8630ce1f41f8cadbda616de05844b127d1a8 --- .../java/com/android/server/am/ActivityManagerService.java | 5 ----- services/core/java/com/android/server/wm/WindowState.java | 2 -- .../core/java/com/android/server/wm/WindowStateAnimator.java | 2 -- 3 files changed, 9 deletions(-) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 445590118970c..d3421fdb6b6bb 100755 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -17354,11 +17354,6 @@ public final class ActivityManagerService extends ActivityManagerNative if ((userInfo.flags&UserInfo.FLAG_INITIALIZED) == 0) { if (userId != UserHandle.USER_OWNER) { - // Send PRE_BOOT_COMPLETED broadcasts for this new user - final ArrayList doneReceivers - = new ArrayList(); - deliverPreBootCompleted(null, doneReceivers, userId); - Intent intent = new Intent(Intent.ACTION_USER_INITIALIZE); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); broadcastIntentLocked(null, null, intent, null, diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 23ab73c0a9f19..e74de38ea0c1a 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -1142,8 +1142,6 @@ final class WindowState implements WindowManagerPolicy.WindowState { boolean showLw(boolean doAnimation, boolean requestAnim) { if (isHiddenFromUserLocked()) { - Slog.w(TAG, "current user violation " + mService.mCurrentUserId + " trying to display " - + this + ", type " + mAttrs.type + ", belonging to " + mOwnerUid); return false; } if (!mAppOpVisibility) { diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index 3f07dd90805fe..85dc8104d45a5 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -1533,8 +1533,6 @@ class WindowStateAnimator { // This must be called while inside a transaction. boolean performShowLocked() { if (mWin.isHiddenFromUserLocked()) { - Slog.w(TAG, "current user violation " + mService.mCurrentUserId + " trying to display " - + this + ", type " + mWin.mAttrs.type + ", belonging to " + mWin.mOwnerUid); return false; } if (DEBUG_VISIBILITY || (DEBUG_STARTING_WINDOW &&