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

Commit 1f3fab1a authored by Rubin Xu's avatar Rubin Xu
Browse files

Fix deadlock of starting intent during turing on profile

Start the intent on a handler thread instead of the user start
progress callback.

Bug: 149220125
Test: atest QuietModeHostsideTest
Test: turning on profile by tapping on some app launcher icon
Change-Id: I44bc862c1d72aae3d2d79862c92ddbe4d3a58483
parent 5580360b
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -455,11 +455,13 @@ public class UserManagerService extends IUserManager.Stub {

        @Override
        public void onFinished(int id, Bundle extras) {
            mHandler.post(() -> {
                try {
                    mContext.startIntentSender(mTarget, null, 0, 0, 0);
                } catch (IntentSender.SendIntentException e) {
                    Slog.e(LOG_TAG, "Failed to start the target in the callback", e);
                }
            });
        }
    }