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

Commit 0e23739b authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/32944241'] into 25Q2-release.

Change-Id: I6fdec5ceb471d794cb8525dfde12865839f62a56
parents 3c500d9c f67f8f0e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@ class UserController implements Handler.Callback {
    static final int COMPLETE_USER_SWITCH_MSG = 130;
    static final int USER_COMPLETED_EVENT_MSG = 140;
    static final int SCHEDULED_STOP_BACKGROUND_USER_MSG = 150;
    static final int USER_SWITCHING_DIALOG_ANIMATION_TIMEOUT_MSG = 160;

    private static final int NO_ARG2 = 0;

+4 −2
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.server.am;

import static com.android.server.am.UserController.USER_SWITCHING_DIALOG_ANIMATION_TIMEOUT_MSG;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
@@ -302,14 +304,14 @@ class UserSwitchingDialog extends Dialog {
        final AtomicBoolean isFirst = new AtomicBoolean(true);
        final Runnable onAnimationEndOrTimeout = () -> {
            if (isFirst.getAndSet(false)) {
                mHandler.removeCallbacksAndMessages(null);
                mHandler.removeMessages(USER_SWITCHING_DIALOG_ANIMATION_TIMEOUT_MSG);
                onAnimationEnd.run();
            }
        };
        mHandler.postDelayed(() -> {
            Slog.w(TAG, name + " animation not completed in " + ANIMATION_TIMEOUT_MS + " ms");
            onAnimationEndOrTimeout.run();
        }, ANIMATION_TIMEOUT_MS);
        }, USER_SWITCHING_DIALOG_ANIMATION_TIMEOUT_MSG, ANIMATION_TIMEOUT_MS);

        return onAnimationEndOrTimeout;
    }