Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2f20b66 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

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
parent 171927a6
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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<ComponentName> doneReceivers
                                = new ArrayList<ComponentName>();
                        deliverPreBootCompleted(null, doneReceivers, userId);
                        Intent intent = new Intent(Intent.ACTION_USER_INITIALIZE);
                        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
                        broadcastIntentLocked(null, null, intent, null,
+0 −2
Original line number Diff line number Diff line
@@ -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) {
+0 −2
Original line number Diff line number Diff line
@@ -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 &&