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

Commit ee76de8f authored by Lucas Silva's avatar Lucas Silva
Browse files

Implement air quality dream complication

Fixes: 213906528
Test: atest AirQualityColorPickerTest
Test: atest DreamAirQualityComplicationTest
Change-Id: I31f289c8bf223dde9464ad5171f68ada04f6ee89
parent 366cdaf8
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2022 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.
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/dream_overlay_aqi_unknown" />
    <corners android:radius="@dimen/dream_aqi_badge_corner_radius" />
</shape>
 No newline at end of file
+26 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2022 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.
  -->

<TextView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/aqi_view"
    style="@style/clock_subtitle"
    android:visibility="gone"
    android:background="@drawable/dream_aqi_badge_bg"
    android:paddingHorizontal="@dimen/dream_aqi_badge_padding_horizontal"
    android:paddingVertical="@dimen/dream_aqi_badge_padding_vertical"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>
 No newline at end of file
+9 −0
Original line number Diff line number Diff line
@@ -233,4 +233,13 @@
    <color name="connected_network_secondary_color">#41493D</color>

    <color name="dream_overlay_camera_mic_off_dot_color">#FCBE03</color>

    <!-- Air Quality -->
    <color name="dream_overlay_aqi_good">#689F38</color>
    <color name="dream_overlay_aqi_moderate">#FBC02D</color>
    <color name="dream_overlay_aqi_unhealthy_sensitive">#F57C00</color>
    <color name="dream_overlay_aqi_unhealthy">#C53929</color>
    <color name="dream_overlay_aqi_very_unhealthy">#AD1457</color>
    <color name="dream_overlay_aqi_hazardous">#880E4F</color>
    <color name="dream_overlay_aqi_unknown">#BDC1C6</color>
</resources>
+21 −0
Original line number Diff line number Diff line
@@ -727,4 +727,25 @@
        <item>com.android.keyguard</item>
        <item>com.android.systemui</item>
    </string-array>

    <!-- The thresholds which determine the color used by the AQI dream overlay.
         NOTE: This must always be kept sorted from low to high -->
    <integer-array name="config_dreamAqiThresholds">
        <item>-1</item>
        <item>50</item>
        <item>100</item>
        <item>150</item>
        <item>200</item>
        <item>300</item>
    </integer-array>

    <!-- The color values which correspond to the thresholds above -->
    <integer-array name="config_dreamAqiColorValues">
        <item>@color/dream_overlay_aqi_good</item>
        <item>@color/dream_overlay_aqi_moderate</item>
        <item>@color/dream_overlay_aqi_unhealthy_sensitive</item>
        <item>@color/dream_overlay_aqi_unhealthy</item>
        <item>@color/dream_overlay_aqi_very_unhealthy</item>
        <item>@color/dream_overlay_aqi_hazardous</item>
    </integer-array>
</resources>
+4 −0
Original line number Diff line number Diff line
@@ -1494,6 +1494,10 @@

    <dimen name="dream_overlay_y_offset">80dp</dimen>

    <dimen name="dream_aqi_badge_corner_radius">28dp</dimen>
    <dimen name="dream_aqi_badge_padding_vertical">6dp</dimen>
    <dimen name="dream_aqi_badge_padding_horizontal">16dp</dimen>

    <dimen name="status_view_margin_horizontal">0dp</dimen>

    <!-- Media output broadcast dialog QR code picture size -->
Loading