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

Commit e12de0be authored by Mayank Garg's avatar Mayank Garg
Browse files

Adding option in global setting to control the display message during user switch

Bug: 145915635
Bug: 145132885
Test: adb shell settings put global android.car.ENABLE_USER_SWITCH_DEVELOPER_MESSAGE true
Change-Id: I70c72d7d74c72a78d919ae34906b6f7b96466ad1
parent effa2cd7
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -32,8 +32,8 @@ import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.UserManager;
import android.provider.Settings;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
@@ -83,9 +83,13 @@ final class CarUserSwitchingDialog extends UserSwitchingDialog {
        }

        TextView msgView = view.findViewById(R.id.user_loading);
        // TODO: use developer settings instead
        if (Build.IS_DEBUGGABLE) {
            // TODO: use specific string

        // TODO(b/145132885): use constant from CarSettings
        boolean showInfo = "true".equals(Settings.Global.getString(
                getContext().getContentResolver(),
                "android.car.ENABLE_USER_SWITCH_DEVELOPER_MESSAGE"));

        if (showInfo) {
            msgView.setText(res.getString(R.string.car_loading_profile) + " user\n(from "
                    + mOldUser.id + " to " + mNewUser.id + ")");
        } else {