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

Commit a5a909f9 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6057378 from 948ed682 to qt-qpr2-release

Change-Id: I2a9b369f6a30c58c9eab86833b71fd091be6d509
parents d50c0bf6 948ed682
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 −0
Original line number Diff line number Diff line
@@ -31,3 +31,5 @@ michaelwr@google.com
narayan@google.com

per-file SettingsToPropertiesMapper.java = omakoto@google.com, svetoslavganov@google.com, yamasani@google.com

per-file CarUserSwitchingDialog.java = keunyoung@google.com, felipeal@google.com, gurunagarajan@google.com
+11 −2
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.os.Handler;
import android.os.Message;
import android.os.UserHandle;
import android.os.UserManager;
import android.util.Slog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewTreeObserver;
@@ -46,6 +47,9 @@ 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;

    // 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;
    private static final int MSG_START_USER = 1;
@@ -118,7 +122,7 @@ class UserSwitchingDialog extends AlertDialog

    @Override
    public void show() {
        // Slog.v(TAG, "show called");
        if (DEBUG) Slog.d(TAG, "show called");
        super.show();
        final View decorView = getWindow().getDecorView();
        if (decorView != null) {
@@ -132,13 +136,14 @@ class UserSwitchingDialog extends AlertDialog

    @Override
    public void onWindowShown() {
        // Slog.v(TAG, "onWindowShown called");
        if (DEBUG) Slog.d(TAG, "onWindowShown called");
        startUser();
    }

    void startUser() {
        synchronized (this) {
            if (!mStartedUser) {
                Slog.i(TAG, "starting user " + mUserId);
                mService.mUserController.startUserInForeground(mUserId);
                dismiss();
                mStartedUser = true;
@@ -147,6 +152,8 @@ class UserSwitchingDialog extends AlertDialog
                    decorView.getViewTreeObserver().removeOnWindowShownListener(this);
                }
                mHandler.removeMessages(MSG_START_USER);
            } else {
                Slog.i(TAG, "user " + mUserId + " already started");
            }
        }
    }
@@ -156,6 +163,8 @@ class UserSwitchingDialog extends AlertDialog
        public void handleMessage(Message msg) {
            switch (msg.what) {
                case MSG_START_USER:
                    Slog.w(TAG, "user switch window not shown in "
                            + WINDOW_SHOWN_TIMEOUT_MS + " ms");
                    startUser();
                    break;
            }
+3 −3
Original line number Diff line number Diff line
@@ -89,8 +89,8 @@ public class SubscriptionInfo implements Parcelable {
    private int mCarrierId;

    /**
     * The source of the name, NAME_SOURCE_DEFAULT_SOURCE, NAME_SOURCE_SIM_SOURCE or
     * NAME_SOURCE_USER_INPUT.
     * The source of the name, NAME_SOURCE_DEFAULT_SOURCE, NAME_SOURCE_SIM_SPN,
     * NAME_SOURCE_SIM_PNN, or NAME_SOURCE_USER_INPUT.
     */
    private int mNameSource;

@@ -334,7 +334,7 @@ public class SubscriptionInfo implements Parcelable {
    }

    /**
     * @return the source of the name, eg NAME_SOURCE_DEFAULT_SOURCE, NAME_SOURCE_SIM_SOURCE or
     * @return the source of the name, eg NAME_SOURCE_DEFAULT_SOURCE, NAME_SOURCE_SIM_SPN or
     * NAME_SOURCE_USER_INPUT.
     * @hide
     */
Loading