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

Commit 4cb0ab9d authored by Felipe Leme's avatar Felipe Leme
Browse files

Don't send duplicated user-start broadcast when booting on headless-system mode.

Bug: 132111956
Test: manual verification

Merged-In: Ib9bb38d357e0d87a9b7da3456c97029a8b0342a3
Change-Id: Ib622bc0cd0fc1ac76a0467dbc242f9edbd54eaae
parent 7eb654b8
Loading
Loading
Loading
Loading
+38 −31
Original line number Diff line number Diff line
@@ -9063,6 +9063,7 @@ public class ActivityManagerService extends IActivityManager.Stub
            mAtmInternal.showSystemReadyErrorDialogsIfNeeded();
            if (bootingSystemUser) {
                final int callingUid = Binder.getCallingUid();
                final int callingPid = Binder.getCallingPid();
                long ident = Binder.clearCallingIdentity();
@@ -9094,8 +9095,14 @@ public class ActivityManagerService extends IActivityManager.Stub
                } finally {
                    Binder.restoreCallingIdentity(ident);
                }
            } else {
                Slog.i(TAG, "Not sending multi-user broadcasts for non-system user "
                        + currentUserId);
            }
            mAtmInternal.resumeTopActivities(false /* scheduleIdle */);
            if (bootingSystemUser) {
                mUserController.sendUserSwitchBroadcasts(-1, currentUserId);
            }
            BinderInternal.nSetBinderProxyCountWatermarks(BINDER_PROXY_HIGH_WATERMARK,
                    BINDER_PROXY_LOW_WATERMARK);