summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Koskovich <zvnexus@outlook.com>2020-07-30 14:17:30 -0400
committeralk3pInjection <webmaster@raspii.tech>2022-03-07 17:20:18 +0800
commitf4cb74bf0bede05abb45646bd4b4bbf36280ad27 (patch)
treee4a01ef13e695885dfd6243c7f7ca211d5eb4b8c
parentb6ceb81578636735716655855a410b4d4db72281 (diff)
common: Introduce GPS component
Change-Id: I3d88f36b7da6e06a9a340b9202864ede36378cca
-rw-r--r--common.mk4
-rw-r--r--gps/Android.bp16
-rwxr-xr-xgps/extract-files.sh31
-rw-r--r--gps/overlay/QCOMGPSFrameworksOverlay/Android.bp19
-rw-r--r--gps/overlay/QCOMGPSFrameworksOverlay/AndroidManifest.xml23
-rw-r--r--gps/overlay/QCOMGPSFrameworksOverlay/res/values/config.xml38
-rw-r--r--gps/proprietary-files.txt10
-rw-r--r--gps/qti-gps.mk33
-rwxr-xr-xgps/setup-makefiles.sh25
9 files changed, 199 insertions, 0 deletions
diff --git a/common.mk b/common.mk
index 13fb050..12cd5ce 100644
--- a/common.mk
+++ b/common.mk
@@ -68,6 +68,10 @@ ifneq (,$(filter display, $(TARGET_COMMON_QTI_COMPONENTS)))
include $(LOCAL_PATH)/display/qti-display.mk
endif
+ifneq (,$(filter gps, $(TARGET_COMMON_QTI_COMPONENTS)))
+include $(LOCAL_PATH)/gps/qti-gps.mk
+endif
+
ifneq (,$(filter perf, $(TARGET_COMMON_QTI_COMPONENTS)))
include $(LOCAL_PATH)/perf/qti-perf.mk
endif
diff --git a/gps/Android.bp b/gps/Android.bp
new file mode 100644
index 0000000..00cdece
--- /dev/null
+++ b/gps/Android.bp
@@ -0,0 +1,16 @@
+// Copyright (C) 2021 Paranoid Android
+//
+// 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.
+
+soong_namespace {
+}
diff --git a/gps/extract-files.sh b/gps/extract-files.sh
new file mode 100755
index 0000000..5d7a273
--- /dev/null
+++ b/gps/extract-files.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# Copyright (C) 2018-2019 The LineageOS Project
+# Copyright (C) 2020 Paranoid Android
+#
+# 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.
+#
+
+# If we're being sourced by the common script that we called,
+# stop right here. No need to go down the rabbit hole.
+if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
+ return
+fi
+
+set -e
+
+# Required!
+export COMPONENT=gps
+export VENDOR=qcom/common
+
+"../extract-files.sh" "$@"
diff --git a/gps/overlay/QCOMGPSFrameworksOverlay/Android.bp b/gps/overlay/QCOMGPSFrameworksOverlay/Android.bp
new file mode 100644
index 0000000..51650ed
--- /dev/null
+++ b/gps/overlay/QCOMGPSFrameworksOverlay/Android.bp
@@ -0,0 +1,19 @@
+// Copyright (C) 2021 Paranoid Android
+//
+// 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.
+
+runtime_resource_overlay {
+ name: "QCOMGPSFrameworksOverlay",
+ product_specific: true,
+ sdk_version: "current",
+}
diff --git a/gps/overlay/QCOMGPSFrameworksOverlay/AndroidManifest.xml b/gps/overlay/QCOMGPSFrameworksOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..ef23301
--- /dev/null
+++ b/gps/overlay/QCOMGPSFrameworksOverlay/AndroidManifest.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2020 Paranoid Android
+
+ 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.qualcomm.gps.overlay">
+
+ <overlay
+ android:isStatic="true"
+ android:priority="650"
+ android:targetPackage="android" />
+</manifest>
diff --git a/gps/overlay/QCOMGPSFrameworksOverlay/res/values/config.xml b/gps/overlay/QCOMGPSFrameworksOverlay/res/values/config.xml
new file mode 100644
index 0000000..ec31ea6
--- /dev/null
+++ b/gps/overlay/QCOMGPSFrameworksOverlay/res/values/config.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2022 Project ICE
+
+ 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>
+
+ <!-- Whether to enable network location overlay which allows network
+ location provider to be replaced by an app at run-time. -->
+ <bool name="config_enableNetworkLocationOverlay" translatable="false">false</bool>
+
+ <!-- Package name providing network location support. Used only when
+ config_enableNetworkLocationOverlay is false. -->
+ <string name="config_networkLocationProviderPackageName" translatable="false">com.qualcomm.location</string>
+
+ <!-- Whether to enable fused location provider overlay which allows fused
+ location provider to be replaced by an app at run-time. -->
+ <bool name="config_enableFusedLocationOverlay" translatable="false">false</bool>
+
+ <!-- Package name providing fused location support. Used only when
+ config_enableFusedLocationOverlay is false. -->
+ <string name="config_fusedLocationProviderPackageName" translatable="false">com.qualcomm.location</string>
+
+ <!-- Component name of the combo network location provider. -->
+ <string name="config_comboNetworkLocationProvider" translatable="false">com.qualcomm.location</string>
+
+</resources>
diff --git a/gps/proprietary-files.txt b/gps/proprietary-files.txt
new file mode 100644
index 0000000..270c6c8
--- /dev/null
+++ b/gps/proprietary-files.txt
@@ -0,0 +1,10 @@
+system_ext/etc/permissions/com.qti.location.sdk.xml
+system_ext/etc/permissions/com.qualcomm.location.xml
+system_ext/etc/permissions/com.qualcomm.qmapbridge.xml
+system_ext/etc/permissions/com.qualcomm.qti.izattools.xml
+system_ext/etc/permissions/izat.xt.srv.xml
+system_ext/etc/permissions/privapp-permissions-com.qualcomm.location.xml
+-system_ext/framework/com.qti.location.sdk.jar
+-system_ext/framework/izat.xt.srv.jar
+-system_ext/framework/qmapbridge.jar
+-system_ext/priv-app/com.qualcomm.location/com.qualcomm.location.apk
diff --git a/gps/qti-gps.mk b/gps/qti-gps.mk
new file mode 100644
index 0000000..257c275
--- /dev/null
+++ b/gps/qti-gps.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2021 Paranoid Android
+#
+# 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.
+
+PRODUCT_SOONG_NAMESPACES += \
+ device/qcom/common/gps
+
+# Flags
+BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
+
+# Inherit the GPS HAL.
+$(call inherit-product-if-exists, hardware/qcom/gps/gps_vendor_product.mk)
+
+# Overlays
+PRODUCT_PACKAGES += \
+ QCOMGPSFrameworksOverlay
+
+# Permissions
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml
+
+# Get non-open-source specific aspects
+$(call inherit-product-if-exists, vendor/qcom/common/gps/gps-vendor.mk)
diff --git a/gps/setup-makefiles.sh b/gps/setup-makefiles.sh
new file mode 100755
index 0000000..5333387
--- /dev/null
+++ b/gps/setup-makefiles.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Copyright (C) 2018-2019 The LineageOS Project
+# Copyright (C) 2020 Paranoid Android
+#
+# 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.
+#
+
+set -e
+
+# Required!
+export COMPONENT=gps
+export VENDOR=qcom/common
+
+"../setup-makefiles.sh" "$@"