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

Commit 034a0493 authored by Brad Stenning's avatar Brad Stenning
Browse files

Initial include of the CarSystemUI package

This package extends the core SystemUI and adds widgets and windowing
structure useful for the Automotive case.

Bug:110275838
Test: Update a target to include this project, build and deploy
Change-Id: Id70ebe4ed652d6a09ab50b0555fb4471bf3e1d7c
parent 7beddc3a
Loading
Loading
Loading
Loading
+86 −0
Original line number Original line Diff line number Diff line
# LOCAL_PATH is not the current directory of this file.
# If you need the local path, use CAR_SYSUI_PATH.
# This tweak ensures that the resource overlay that is device-specific still works
# which requires that LOCAL_PATH match the original path (which must be frameworks/base/packages/SystemUI).
#
# For clarity, we also define SYSTEM_UI_AOSP_PATH to frameworks/base/packages/SystemUI and refer to that
SYSTEM_UI_AOSP_PATH := frameworks/base/packages/SystemUI
SYSTEM_UI_CAR_PATH := frameworks/base/packages/CarSystemUI
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_USE_AAPT2 := true

LOCAL_MODULE_TAGS := optional

# The same as SYSTEM_UI_AOSP_PATH but based on the value of LOCAL_PATH which is
# frameworks/base/packages/CarSystemUI.
RELATIVE_SYSTEM_UI_AOSP_PATH := ../../../../$(SYSTEM_UI_AOSP_PATH)


LOCAL_SRC_FILES :=  \
    $(call all-java-files-under, src) \
    $(call all-Iaidl-files-under, src) \
    $(call all-java-files-under, $(RELATIVE_SYSTEM_UI_AOSP_PATH)/src) \
    $(call all-Iaidl-files-under, $(RELATIVE_SYSTEM_UI_AOSP_PATH)/src)

LOCAL_STATIC_ANDROID_LIBRARIES := \
    SystemUIPluginLib \
    SystemUISharedLib \
    androidx.car_car \
    androidx.legacy_legacy-support-v4 \
    androidx.recyclerview_recyclerview \
    androidx.preference_preference \
    androidx.appcompat_appcompat \
    androidx.mediarouter_mediarouter \
    androidx.palette_palette \
    androidx.legacy_legacy-preference-v14 \
    androidx.leanback_leanback \
    androidx.slice_slice-core \
    androidx.slice_slice-view \
    androidx.slice_slice-builders \
    androidx.arch.core_core-runtime \
    androidx.lifecycle_lifecycle-extensions \

LOCAL_STATIC_JAVA_LIBRARIES := \
    SystemUI-tags \
    SystemUI-proto

LOCAL_JAVA_LIBRARIES := telephony-common \
    android.car

LOCAL_FULL_LIBS_MANIFEST_FILES := $(SYSTEM_UI_AOSP_PATH)/AndroidManifest.xml
LOCAL_MANIFEST_FILE := AndroidManifest.xml

LOCAL_MODULE_OWNER := google
LOCAL_PACKAGE_NAME := CarSystemUI
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true

LOCAL_PROGUARD_FLAG_FILES := $(RELATIVE_SYSTEM_UI_AOSP_PATH)/proguard.flags \
    proguard.flags

LOCAL_RESOURCE_DIR := \
    $(LOCAL_PATH)/res \
    $(SYSTEM_UI_AOSP_PATH)/res-keyguard \
    $(SYSTEM_UI_AOSP_PATH)/res

ifneq ($(INCREMENTAL_BUILDS),)
    LOCAL_PROGUARD_ENABLED := disabled
    LOCAL_JACK_ENABLED := incremental
endif

LOCAL_DX_FLAGS := --multi-dex
LOCAL_JACK_FLAGS := --multi-dex native

include frameworks/base/packages/SettingsLib/common.mk

LOCAL_OVERRIDES_PACKAGES := SystemUI

LOCAL_AAPT_FLAGS := --extra-packages com.android.keyguard

include $(BUILD_PACKAGE)

include $(call all-makefiles-under, $(SYSTEM_UI_CAR_PATH))
+24 −0
Original line number Original line 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.
  -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        package="com.android.systemui"
        android:sharedUserId="android.uid.systemui"
        coreApp="true">


</manifest>
+1 −0
Original line number Original line Diff line number Diff line
-keep class com.android.systemui.CarSystemUIFactory
+35 −0
Original line number Original line 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>

    <!-- Custom attributes to configure hvac values -->
    <declare-styleable name="AnimatedTemperatureView">
        <attr name="hvacAreaId" format="integer"/>
        <attr name="hvacPropertyId" format="integer"/>
        <attr name="hvacTempFormat" format="string"/>
        <!-- how far away the animations should center around -->
        <attr name="hvacPivotOffset" format="dimension"/>
        <attr name="hvacMinValue" format="float"/>
        <attr name="hvacMaxValue" format="float"/>
        <attr name="hvacMinText" format="string|reference"/>
        <attr name="hvacMaxText" format="string|reference"/>
        <attr name="android:gravity"/>
        <attr name="android:minEms"/>
        <attr name="android:textAppearance"/>
    </declare-styleable>
</resources>
+83 −0
Original line number Original line 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>
    <string name="config_statusBarComponent" translatable="false">com.android.systemui.statusbar.car.CarStatusBar</string>
    <string name="config_systemUIFactoryComponent" translatable="false">com.android.systemui.CarSystemUIFactory</string>
    <bool name="config_enableFullscreenUserSwitcher">true</bool>

    <!-- Notifications on the car should not show the gear icon. Swiping should only dismiss the
         cards. -->
    <bool name="config_showNotificationGear">false</bool>

    <!-- No need to draw a background around a notification because there is no gear icon. -->
    <bool name="config_drawNotificationBackground">false</bool>

    <!-- The notification shade should only be shown on a facet click and not by dragging. -->
    <bool name="config_enableNotificationShadeDrag">false</bool>

    <!-- There should not be the ability to clear all notifications with a button. -->
    <bool name="config_enableNotificationsClearAll">false</bool>

    <!-- Hide the notification shelf so that the cards in the notification center scroll smoothly
         off-screen. -->
    <bool name="config_showNotificationShelf">false</bool>

    <!-- The notifications should always fade when being dismissed. -->
    <bool name="config_fadeNotificationsOnDismiss">true</bool>

    <!-- The entire notification row should be translated because the cards are smaller than the
         width of the screen. If the row is not translated, then they will be clipped. -->
    <bool name="config_translateNotificationContentsOnSwipe">false</bool>

    <!-- The notifications should fade as they are being swiped off screen. -->
    <bool name="config_fadeDependingOnAmountSwiped">true</bool>

     <!-- The expand icon should be displayed at the top right corner of the notifications. -->
    <bool name="config_showNotificationExpandButtonAtEnd">true</bool>

    <!-- A notification card that has been scrolled off screen should not be clipped in height. This
         maintains the illusion that the cards are being scrolled underneath the status bar
         shelf. -->
    <bool name="config_clipNotificationScrollToTop">false</bool>

    <!-- The auto notification have rounded corners. Ensure that any content is clipped to these
         corners. -->
    <bool name="config_clipNotificationsToOutline">true</bool>

    <!-- Notifications should always be in their expanded state so that the actions are visible.
         This will make it easier for an auto user to interact with them. -->
    <bool name="config_alwaysExpandNonGroupedNotifications">true</bool>

    <!-- Auto does not allow notifications to be toggled to and from their expanded states to
         reduce driver distraction. -->
    <bool name="config_enableNonGroupedNotificationExpand">false</bool>

    <!-- There should always be a dividing line between notifications. -->
    <bool name="config_showDividersWhenGroupNotificationExpanded">true</bool>

    <!--- Hide the dividing lines when the notification group is expanding. -->
    <bool name="config_hideDividersDuringTransition">true</bool>

    <!-- Child notifications are displayed with no dividing space between them in auto, so disable
         the shadow. -->
    <bool name="config_enableShadowOnChildNotifications">false</bool>

    <!-- Keep the notification background when the container has been expanded. The children will
         expand inline within the container, so it can keep its original background. -->
    <bool name="config_showGroupNotificationBgWhenExpanded">true</bool>
</resources>
Loading