summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSal Savage <salsavage@google.com>2023-02-06 15:17:08 -0800
committerSal Savage <salsavage@google.com>2023-02-07 17:40:26 +0000
commita40daa07646edcd4bdcdd5686f745656c5acbc96 (patch)
treeb8e3047a41137529a15a8fff0a5a989c5b0957fb
parentc7a3523365d8e0533dd6aabce469e5e6fad3ae72 (diff)
downloadgoogle_car-a40daa07646edcd4bdcdd5686f745656c5acbc96.tar.gz
Enable RROs for car phone builds
This change adds a set place for RROs for all google car phone devices. The only overlays being used are currently the Fast Pair feature, so partner teams can directly use build server builds for testing. Bug: 268102136 Test: adb shell dumpsys activity service com.android.car/.CarPerUserService | grep ": 6080155" && echo "Passed" || echo "Failed" Change-Id: I5e417ebf51adcf5b604020458095a5c714dfc310
-rw-r--r--common/pre_google_car.mk4
-rw-r--r--common/rro_overlays/CarServiceOverlay/Android.bp27
-rw-r--r--common/rro_overlays/CarServiceOverlay/AndroidManifest.xml25
-rw-r--r--common/rro_overlays/CarServiceOverlay/res/values/config.xml30
-rw-r--r--common/rro_overlays/CarServiceOverlay/res/xml/overlays.xml20
5 files changed, 106 insertions, 0 deletions
diff --git a/common/pre_google_car.mk b/common/pre_google_car.mk
index 6012c95..deb94d3 100644
--- a/common/pre_google_car.mk
+++ b/common/pre_google_car.mk
@@ -30,6 +30,10 @@ PRODUCT_ENFORCE_RRO_TARGETS :=
# Enable mainline checking
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := false
+# Set Car Service RRO
+PRODUCT_PACKAGES += CarServiceOverlayPhoneCar
+GOOGLE_CAR_SERVICE_OVERLAY += CarServiceOverlayPhoneCarGoogle
+
# All components inherited here go to system image
# Skip this for 64 bit only devices
ifneq ($(DEVICE_IS_64BIT_ONLY),true)
diff --git a/common/rro_overlays/CarServiceOverlay/Android.bp b/common/rro_overlays/CarServiceOverlay/Android.bp
new file mode 100644
index 0000000..2c1a60d
--- /dev/null
+++ b/common/rro_overlays/CarServiceOverlay/Android.bp
@@ -0,0 +1,27 @@
+// Copyright (C) 2023 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.
+//
+//
+
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+runtime_resource_overlay {
+ name: "CarServiceOverlayPhoneCar",
+ resource_dirs: ["res"],
+ manifest: "AndroidManifest.xml",
+ sdk_version: "current",
+ product_specific: true
+}
diff --git a/common/rro_overlays/CarServiceOverlay/AndroidManifest.xml b/common/rro_overlays/CarServiceOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..2d19a04
--- /dev/null
+++ b/common/rro_overlays/CarServiceOverlay/AndroidManifest.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2023 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"
+ package="com.android.car.resources.google_car">
+ <application android:hasCode="false"/>
+ <overlay android:priority="2001"
+ android:targetPackage="com.android.car.updatable"
+ android:targetName="CarServiceCustomization"
+ android:resourcesMap="@xml/overlays"
+ android:isStatic="true" />
+</manifest>
diff --git a/common/rro_overlays/CarServiceOverlay/res/values/config.xml b/common/rro_overlays/CarServiceOverlay/res/values/config.xml
new file mode 100644
index 0000000..85c1c1a
--- /dev/null
+++ b/common/rro_overlays/CarServiceOverlay/res/values/config.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2023, 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 to configure car service based on each OEM's preference. -->
+<resources>
+ <!-- The Model ID to advertise Bluetooth Fast Pair connections with. Must be overlaid with
+ device specific model id. A model id of 0 will disable Fast Pair-->
+ <integer name="fastPairModelId">0x5CC69B</integer>
+
+ <!-- The Anti Spoofing Public key associated with the advertised Fast Pair Model ID, base64
+ encoded. -->
+ <string name="fastPairAntiSpoofKey"
+ translatable="false">w8WfTvivRPc5kvoysLooga9rrlxQ7zlj1X+THUTSg/8=</string>
+</resources>
diff --git a/common/rro_overlays/CarServiceOverlay/res/xml/overlays.xml b/common/rro_overlays/CarServiceOverlay/res/xml/overlays.xml
new file mode 100644
index 0000000..daf4c7e
--- /dev/null
+++ b/common/rro_overlays/CarServiceOverlay/res/xml/overlays.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2023 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.
+ -->
+<overlay>
+ <item target="integer/fastPairModelId" value="@integer/fastPairModelId" />
+ <item target="string/fastPairAntiSpoofKey" value="@string/fastPairAntiSpoofKey" />
+</overlay>