Skip to content

Commit

Permalink
Commonise hotword enrollment
Browse files Browse the repository at this point in the history
Signed-off-by: default avatarPranav Vashi <neobuddy89@gmail.com>
Change-Id: Ia00a2367a18a1aa9a1e1b80319cd66a096473666
Signed-off-by: default avatarNurKeinNeid <mralexman3000@gmail.com>
Signed-off-by: nranjan17's avatarNRanjan-17 <nalinishranjan05@gmail.com>
  • Loading branch information
SonicBSV committed Jan 14, 2023
1 parent 8baa47d commit 28f0187
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 0 deletions.
26 changes: 26 additions & 0 deletions markw/google/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
soong_namespace {
}

android_app_import {
name: "HotwordEnrollmentOKGoogleWCD9340",
owner: "oneplus",
apk: "proprietary/product/priv-app/HotwordEnrollmentOKGoogleWCD9340/HotwordEnrollmentOKGoogleWCD9340.apk",
presigned: true,
dex_preopt: {
enabled: false,
},
privileged: true,
product_specific: true,
}

android_app_import {
name: "HotwordEnrollmentXGoogleWCD9340",
owner: "oneplus",
apk: "proprietary/product/priv-app/HotwordEnrollmentXGoogleWCD9340/HotwordEnrollmentXGoogleWCD9340.apk",
presigned: true,
dex_preopt: {
enabled: false,
},
privileged: true,
product_specific: true,
}
12 changes: 12 additions & 0 deletions markw/google/google.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PRODUCT_SOONG_NAMESPACES += \
vendor/xiaomi/markw/google

PRODUCT_COPY_FILES += \
vendor/xiaomi/markw/google/proprietary/system_ext/etc/permissions/com.android.hotwordenrollment.common.util.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/permissions/com.android.hotwordenrollment.common.util.xml \
vendor/xiaomi/markw/google/proprietary/system_ext/framework/com.android.hotwordenrollment.common.util.jar:$(TARGET_COPY_OUT_SYSTEM_EXT)/framework/com.android.hotwordenrollment.common.util.jar \
vendor/xiaomi/markw/google/proprietary/product/etc/permissions/privapp-permissions-google-hotword.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-google-hotword.xml \
vendor/xiaomi/markw/google/proprietary/product/etc/sysconfig/hotword-hiddenapi-package-whitelist.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/sysconfig/hotword-hiddenapi-package-whitelist.xml

PRODUCT_PACKAGES += \
HotwordEnrollmentOKGoogleWCD9340 \
HotwordEnrollmentXGoogleWCD9340
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?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
-->

<!--
This XML file declares which signature|privileged permissions should be granted to privileged
applications in /product GMS or Google-branded devices.
It allows additional grants on top of privapp-permissions-platform.xml
-->
<permissions>

<privapp-permissions package="com.android.hotwordenrollment.okgoogle">
<permission name="android.permission.MANAGE_VOICE_KEYPHRASES"/>
<permission name="android.permission.KEYPHRASE_ENROLLMENT_APPLICATION"/>
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
</privapp-permissions>

<privapp-permissions package="com.android.hotwordenrollment.xgoogle">
<permission name="android.permission.MANAGE_VOICE_KEYPHRASES"/>
<permission name="android.permission.KEYPHRASE_ENROLLMENT_APPLICATION"/>
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
</privapp-permissions>

</permissions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This XML file declares which platform apps that need to access internal APIs.
-->
<config>
<hidden-api-whitelisted-app package="com.android.hotwordenrollment.okgoogle" />
<hidden-api-whitelisted-app package="com.android.hotwordenrollment.xgoogle" />
</config>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?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.
-->
<permissions>
<library name="com.android.hotwordenrollment.common.util" file="/system_ext/framework/com.android.hotwordenrollment.common.util.jar"/>
</permissions>

Binary file not shown.

0 comments on commit 28f0187

Please sign in to comment.