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

Commit ee02c425 authored by Felipe Leme's avatar Felipe Leme
Browse files

Fixed UserSwitchingDialog theme.

It didn't set windowAnimationStyle, and hence
ViewTreeObserver.OnWindowShownListener.onWindowShown() was never called.

Fixes: 145021634
Bug: 145211062
Test: manual verification switching users

Change-Id: I7f995dbe21922422f678f460d69fa37a3b4357d1
(cherry picked from commit 2a30fe59626060277398f93aaf754a12b873d7d0)
parent 141ffdc5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1733,6 +1733,7 @@ easier.
        <item name="colorBackground">@color/background_device_default_light</item>
        <item name="colorBackgroundFloating">@color/background_device_default_light</item>
        <item name="layout_gravity">center</item>
        <item name="windowAnimationStyle">@style/Animation.DeviceDefault.Dialog</item>
    </style>

    <style name="Theme.DeviceDefault.Notification" parent="@style/Theme.Material.Notification">
+1 −3
Original line number Diff line number Diff line
@@ -66,9 +66,7 @@ final class CarUserSwitchingDialog extends UserSwitchingDialog {
        setCancelable(false);
        Resources res = getContext().getResources();
        // Custom view due to alignment and font size requirements
        // TODO (b/145021634): disabled because it's delaying user switch by 3 seconds
        // getContext()
        // .setTheme(R.style.Theme_DeviceDefault_Light_Dialog_Alert_UserSwitchingDialog);
        getContext().setTheme(R.style.Theme_DeviceDefault_Light_Dialog_Alert_UserSwitchingDialog);
        View view = LayoutInflater.from(getContext()).inflate(
                R.layout.car_user_switching_dialog,
                null);
+2 −1
Original line number Diff line number Diff line
@@ -47,7 +47,8 @@ class UserSwitchingDialog extends AlertDialog
    // Time to wait for the onWindowShown() callback before continuing the user switch
    private static final int WINDOW_SHOWN_TIMEOUT_MS = 3000;

    private static final boolean DEBUG = false;
    // User switching doesn't happen that frequently, so it doesn't hurt to have it always on
    protected static final boolean DEBUG = true;

    private final ActivityManagerService mService;
    private final int mUserId;