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

Commit 42118d20 authored by Keun-young Park's avatar Keun-young Park
Browse files

Add startUserInForegroundWithListener to IActivityManager

Bug: 124797617
Test: Reboot the system and confirm user starting / unlocking with the call.

Change-Id: Id22cbc53a42c7a2e0bfbe006a871a6ba45e5c6d1
parent cefbcad5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -489,4 +489,10 @@ interface IActivityManager {

    /** Returns a file descriptor that'll be closed when the system server process dies. */
    ParcelFileDescriptor getLifeMonitor();

    /**
     * Start user, if it us not already running, and bring it to foreground.
     * unlockProgressListener can be null if monitoring progress is not necessary.
     */
    boolean startUserInForegroundWithListener(int userid, IProgressListener unlockProgressListener);
}
+7 −0
Original line number Diff line number Diff line
@@ -17109,6 +17109,13 @@ public class ActivityManagerService extends IActivityManager.Stub
        return mUserController.startUser(userId, /* foreground */ false, unlockListener);
    }
    @Override
    public boolean startUserInForegroundWithListener(final int userId,
            @Nullable IProgressListener unlockListener) {
        // Permission check done inside UserController.
        return mUserController.startUser(userId, /* foreground */ true, unlockListener);
    }
    @Override
    public boolean unlockUser(int userId, byte[] token, byte[] secret, IProgressListener listener) {
        return mUserController.unlockUser(userId, token, secret, listener);