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

Commit 0b9b6f13 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Send system user broadcasts in headless system user mode." into...

Merge "Send system user broadcasts in headless system user mode." into tm-qpr-dev am: 8c72c3c9 am: 7e62e4af

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20965081



Change-Id: Ibe8b15f7ce07e9c117ee331dd2da5f9b17a61ab2
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e83680e2 7e62e4af
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -8432,15 +8432,13 @@ public class ActivityManagerService extends IActivityManager.Stub
                t.traceEnd();
            }
            boolean isBootingSystemUser = currentUserId == UserHandle.USER_SYSTEM;
            // Some systems - like automotive - will explicitly unlock system user then switch
            // to a secondary user. Hence, we don't want to send duplicate broadcasts for
            // the system user here.
            // to a secondary user.
            // TODO(b/242195409): this workaround shouldn't be necessary once we move
            // the headless-user start logic to UserManager-land.
            final boolean isBootingSystemUser = (currentUserId == UserHandle.USER_SYSTEM)
                    && !UserManager.isHeadlessSystemUserMode();
            if (isBootingSystemUser) {
            if (isBootingSystemUser && !UserManager.isHeadlessSystemUserMode()) {
                t.traceBegin("startHomeOnAllDisplays");
                mAtmInternal.startHomeOnAllDisplays(currentUserId, "systemReady");
                t.traceEnd();
@@ -8452,6 +8450,10 @@ public class ActivityManagerService extends IActivityManager.Stub
            if (isBootingSystemUser) {
                // Need to send the broadcasts for the system user here because
                // UserController#startUserInternal will not send them for the system user starting,
                // It checks if the user state already exists, which is always the case for the
                // system user.
                t.traceBegin("sendUserStartBroadcast");
                final int callingUid = Binder.getCallingUid();
                final int callingPid = Binder.getCallingPid();