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

Commit cf6ca0c1 authored by Aarthi Balachander's avatar Aarthi Balachander
Browse files

Have UserController use a CarUserSwitchingDialog instead of a

UserSwitchingDialog if the FEATURE_AUTOMOTIVE flag is present
so Android Auto can customize the look of the dialog.

+ minor changes to fix colors and sizes

Test: tested on Mojave
bug: 75023449
Change-Id: Icf8b63acf257505a3e58fa368be0dd57a60960b4
parent 8b7f7f1a
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:fitsSystemWindows="true"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

  <ImageView
      android:id="@+id/user_loading_avatar"
      android:layout_width="@dimen/car_fullscreen_user_pod_image_avatar_width"
      android:layout_height="@dimen/car_fullscreen_user_pod_image_avatar_height"
      android:layout_centerHorizontal="true"
  />

  <TextView android:id="@+id/user_loading"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginTop="@dimen/car_padding_4"
      android:textSize="@dimen/car_body1_size"
      android:textColor="@color/car_body1_light"
      android:layout_below="@id/user_loading_avatar"
      android:gravity="center"
  />

</RelativeLayout>
 No newline at end of file
+31 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright 2018, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<resources>
  <!-- car support colors from
  https://cs.corp.google.com/android/frameworks/support/car/res/values/colors.xml -->
  <color name="car_user_switcher_user_image_bgcolor">@color/car_grey_50</color>
  <color name="car_user_switcher_user_image_fgcolor">@color/car_grey_900</color>
  <color name="car_card_dark">@color/car_dark_blue_grey_700</color>
  <color name="car_body1_light">@color/car_grey_100</color>

  <color name="car_grey_50">#fffafafa</color>
  <color name="car_grey_900">#ff212121</color>
  <color name="car_dark_blue_grey_700">#ff172026</color>
  <color name="car_grey_100">#fff5f5f5</color>
</resources>
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 * Copyright (c) 2018, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
*/
-->
<resources>
    <!-- TODO replace with car support lib sizes when available -->
    <dimen name="car_fullscreen_user_pod_icon_text_size">64sp</dimen>
    <dimen name="car_fullscreen_user_pod_width">243dp</dimen>
    <dimen name="car_fullscreen_user_pod_height">356dp</dimen>
    <dimen name="car_fullscreen_user_pod_image_avatar_width">96dp</dimen>
    <dimen name="car_fullscreen_user_pod_image_avatar_height">96dp</dimen>
    <dimen name="car_padding_4">20dp</dimen>
    <dimen name="car_body1_size">32sp</dimen>
</resources>
 No newline at end of file
+4 −0
Original line number Diff line number Diff line
@@ -4957,4 +4957,8 @@
    <string name="notification_app_name_system">System</string>
    <!-- Application name displayed in notifications [CHAR LIMIT=60] -->
    <string name="notification_app_name_settings">Settings</string>

    <!-- Strings for car -->
    <!-- String displayed when loading a user in the car [CHAR LIMIT=30] -->
    <string name="car_loading_profile">Loading</string>
</resources>
+15 −0
Original line number Diff line number Diff line
@@ -3344,4 +3344,19 @@

  <java-symbol type="integer" name="config_lowBatteryAutoTriggerDefaultLevel" />

  <!-- For car devices -->
  <java-symbol type="string" name="car_loading_profile" />
  <java-symbol type="color" name="car_body1_light" />
  <java-symbol type="color" name="car_user_switcher_user_image_bgcolor" />
  <java-symbol type="color" name="car_user_switcher_user_image_fgcolor" />
  <java-symbol type="color" name="car_card_dark" />
  <java-symbol type="dimen" name="car_body1_size" />
  <java-symbol type="dimen" name="car_padding_4" />
  <java-symbol type="dimen" name="car_fullscreen_user_pod_icon_text_size" />
  <java-symbol type="dimen" name="car_fullscreen_user_pod_image_avatar_height" />
  <java-symbol type="dimen" name="car_fullscreen_user_pod_image_avatar_width" />
  <java-symbol type="layout" name="car_user_switching_dialog" />
  <java-symbol type="id" name="user_loading_avatar" />
  <java-symbol type="id" name="user_loading" />

</resources>
Loading