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

Commit 7f40cfb1 authored by Julia Kawano's avatar Julia Kawano Committed by Julia Kawano
Browse files

Add HVAC temp with buttons to nav bar

Created AdjustableTemperatureView class that implements the
TemperatureView interface to display temperature with buttons to
increment and decrement. Updated HvacController to only handle the
set temperature HVAC property. Removed uses of deprecated
CarHvacManager, using CarPropertyManager instead. Also modified and
updated the hvac tests.

UI changes:
- Add driver and passenger HVAC views to nav bar
- Use colored arrows with grey circle for hvac increase/decrease

Test: atest :carsysui-presubmit --include-subdir
Test: Manual - built on flame_car
Bug: 162598687
Change-Id: I39151884f2307e861d290de7ad39ea2ec0c256e8
parent 224c81c6
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -15,10 +15,10 @@
  ~ limitations under the License
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="@dimen/system_bar_icon_drawing_size"
        android:height="@dimen/system_bar_icon_drawing_size"
        android:viewportWidth="44"
        android:viewportHeight="44"
        android:width="44dp"
        android:height="44dp">
        android:viewportHeight="44">
    <path
        android:pathData="M7.33333333 14.6666667L14.6666667 14.6666667L14.6666667 7.33333333L7.33333333 7.33333333L7.33333333 14.6666667ZM18.3333333 36.6666667L25.6666667 36.6666667L25.6666667 29.3333333L18.3333333 29.3333333L18.3333333 36.6666667ZM7.33333333 36.6666667L14.6666667 36.6666667L14.6666667 29.3333333L7.33333333 29.3333333L7.33333333 36.6666667ZM7.33333333 25.6666667L14.6666667 25.6666667L14.6666667 18.3333333L7.33333333 18.3333333L7.33333333 25.6666667ZM18.3333333 25.6666667L25.6666667 25.6666667L25.6666667 18.3333333L18.3333333 18.3333333L18.3333333 25.6666667ZM29.3333333 7.33333333L29.3333333 14.6666667L36.6666667 14.6666667L36.6666667 7.33333333L29.3333333 7.33333333ZM18.3333333 14.6666667L25.6666667 14.6666667L25.6666667 7.33333333L18.3333333 7.33333333L18.3333333 14.6666667ZM29.3333333 25.6666667L36.6666667 25.6666667L36.6666667 18.3333333L29.3333333 18.3333333L29.3333333 25.6666667ZM29.3333333 36.6666667L36.6666667 36.6666667L36.6666667 29.3333333L29.3333333 29.3333333L29.3333333 36.6666667Z"
        android:fillColor="@color/car_nav_icon_fill_color" />
+3 −3
Original line number Diff line number Diff line
@@ -15,10 +15,10 @@
  ~ limitations under the License
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="@dimen/system_bar_icon_drawing_size"
        android:height="@dimen/system_bar_icon_drawing_size"
        android:viewportWidth="44"
        android:viewportHeight="44"
        android:width="44dp"
        android:height="44dp">
        android:viewportHeight="44">
    <path
        android:pathData="M7.33333333 14.6666667L14.6666667 14.6666667L14.6666667 7.33333333L7.33333333 7.33333333L7.33333333 14.6666667ZM18.3333333 36.6666667L25.6666667 36.6666667L25.6666667 29.3333333L18.3333333 29.3333333L18.3333333 36.6666667ZM7.33333333 36.6666667L14.6666667 36.6666667L14.6666667 29.3333333L7.33333333 29.3333333L7.33333333 36.6666667ZM7.33333333 25.6666667L14.6666667 25.6666667L14.6666667 18.3333333L7.33333333 18.3333333L7.33333333 25.6666667ZM18.3333333 25.6666667L25.6666667 25.6666667L25.6666667 18.3333333L18.3333333 18.3333333L18.3333333 25.6666667ZM29.3333333 7.33333333L29.3333333 14.6666667L36.6666667 14.6666667L36.6666667 7.33333333L29.3333333 7.33333333ZM18.3333333 14.6666667L25.6666667 14.6666667L25.6666667 7.33333333L18.3333333 7.33333333L18.3333333 14.6666667ZM29.3333333 25.6666667L36.6666667 25.6666667L36.6666667 18.3333333L29.3333333 18.3333333L29.3333333 25.6666667ZM29.3333333 36.6666667L36.6666667 36.6666667L36.6666667 29.3333333L29.3333333 29.3333333L29.3333333 36.6666667Z"
        android:fillColor="@color/car_nav_icon_fill_color_selected" />
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2020 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.
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="@dimen/system_bar_icon_drawing_size"
        android:height="@dimen/system_bar_icon_drawing_size"
        android:viewportWidth="24"
        android:viewportHeight="24">
    <path
        android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"
        android:fillColor="@color/car_nav_icon_fill_color" />
</vector>
 No newline at end of file
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2020 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.
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="@dimen/system_bar_icon_drawing_size"
        android:height="@dimen/system_bar_icon_drawing_size"
        android:viewportWidth="24"
        android:viewportHeight="24">
    <path
        android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"
        android:fillColor="@color/car_nav_icon_fill_color_selected" />
</vector>
 No newline at end of file
+9 −35
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2018 The Android Open Source Project

@@ -14,38 +15,11 @@
    limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="37dp"
    android:height="31dp"
    android:viewportWidth="37"
    android:viewportHeight="31">

    <group
            android:translateX="-4.000000"
            android:translateY="-6.000000">
        <group
                android:translateX="5.000000"
                android:translateY="5.000000">
            <path
                android:fillType="evenOdd"
                android:strokeColor="#FAFAFA"
                android:strokeWidth="3.5"
                android:pathData="M0.320769938,6.07518051 C6.46754647,1.46509811 12.4222362,1.46509811
18.1848392,6.07518051 C23.9474422,10.6852629 29.3258717,10.4931761
34.3201276,5.49892021" />
            <path
                android:fillType="evenOdd"
                android:strokeColor="#FAFAFA"
                android:strokeWidth="3.5"
                android:pathData="M0.320769938,17.0751805 C6.46754647,12.4650981 12.4222362,12.4650981
18.1848392,17.0751805 C23.9474422,21.6852629 29.3258717,21.4931761
34.3201276,16.4989202" />
        android:width="@dimen/system_bar_icon_drawing_size"
        android:height="@dimen/system_bar_icon_drawing_size"
        android:viewportWidth="24"
        android:viewportHeight="24">
    <path
                android:fillType="evenOdd"
                android:strokeColor="#FAFAFA"
                android:strokeWidth="3.5"
                android:pathData="M0.320769938,28.0751805 C6.46754647,23.4650981 12.4222362,23.4650981
18.1848392,28.0751805 C23.9474422,32.6852629 29.3258717,32.4931761
34.3201276,27.4989202" />
        </group>
    </group>
        android:pathData="M16.34,8.36l-2.29,0.82c-0.18,-0.13 -0.38,-0.25 -0.58,-0.34c0.17,-0.83 0.63,-1.58 1.36,-2.06C16.85,5.44 16.18,2 13.39,2C9,2 7.16,5.01 8.36,7.66l0.82,2.29c-0.13,0.18 -0.25,0.38 -0.34,0.58c-0.83,-0.17 -1.58,-0.63 -2.06,-1.36C5.44,7.15 2,7.82 2,10.61c0,4.4 3.01,6.24 5.66,5.03l2.29,-0.82c0.18,0.13 0.38,0.25 0.58,0.34c-0.17,0.83 -0.63,1.58 -1.36,2.06C7.15,18.56 7.82,22 10.61,22c4.4,0 6.24,-3.01 5.03,-5.66l-0.82,-2.29c0.13,-0.18 0.25,-0.38 0.34,-0.58c0.83,0.17 1.58,0.63 2.06,1.36c1.34,2.01 4.77,1.34 4.77,-1.45C22,9 18.99,7.16 16.34,8.36zM12,13.5c-0.83,0 -1.5,-0.67 -1.5,-1.5c0,-0.83 0.67,-1.5 1.5,-1.5c0.83,0 1.5,0.67 1.5,1.5C13.5,12.83 12.83,13.5 12,13.5zM10.24,5.22C10.74,4.44 11.89,4 13.39,4c0.79,0 0.71,0.86 0.34,1.11c-1.22,0.81 -2,2.06 -2.25,3.44c-0.21,0.03 -0.42,0.08 -0.62,0.15l-0.68,-1.88C10,6.42 9.86,5.81 10.24,5.22zM6.83,13.82c-0.4,0.18 -1.01,0.32 -1.61,-0.06C4.44,13.26 4,12.11 4,10.61c0,-0.79 0.86,-0.71 1.11,-0.34c0.81,1.22 2.06,2 3.44,2.25c0.03,0.21 0.08,0.42 0.15,0.62L6.83,13.82zM13.76,18.78c-0.5,0.77 -1.65,1.22 -3.15,1.22c-0.79,0 -0.71,-0.86 -0.34,-1.11c1.22,-0.81 2,-2.06 2.25,-3.44c0.21,-0.03 0.42,-0.08 0.62,-0.15l0.68,1.88C14,17.58 14.14,18.18 13.76,18.78zM18.89,13.73c-0.81,-1.22 -2.06,-2 -3.44,-2.25c-0.03,-0.21 -0.08,-0.42 -0.15,-0.62l1.88,-0.68c0.4,-0.18 1.01,-0.32 1.61,0.06c0.77,0.5 1.22,1.65 1.22,3.15C20,14.19 19.14,14.11 18.89,13.73z"
        android:fillColor="@color/car_nav_icon_fill_color" />
</vector>
Loading