Skip to content

Commit

Permalink
Commonise hotword enrollment
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Vashi <[email protected]>
Change-Id: Ia00a2367a18a1aa9a1e1b80319cd66a096473666
Signed-off-by: NurKeinNeid <[email protected]>
  • Loading branch information
neobuddy89 authored and ScrubMcDub69 committed Oct 11, 2021
1 parent 7843cf6 commit e12095c
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 26 deletions.
26 changes: 26 additions & 0 deletions 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 google/google.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PRODUCT_SOONG_NAMESPACES += \
vendor/oneplus/google

PRODUCT_COPY_FILES += \
vendor/oneplus/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/oneplus/google/proprietary/system_ext/framework/com.android.hotwordenrollment.common.util.jar:$(TARGET_COPY_OUT_SYSTEM_EXT)/framework/com.android.hotwordenrollment.common.util.jar \
vendor/oneplus/google/proprietary/product/etc/permissions/privapp-permissions-google-hotword.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-google-hotword.xml \
vendor/oneplus/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.
24 changes: 0 additions & 24 deletions sm8150-common/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -110,30 +110,6 @@ android_app_import {
product_specific: true,
}

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

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

android_app_import {
name: "NxpNfcNci",
owner: "oneplus",
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 0 additions & 2 deletions sm8150-common/sm8150-common-vendor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1055,8 +1055,6 @@ PRODUCT_PACKAGES += \
TimeService \
com.qualcomm.qti.gpudrivers.msmnile.api30 \
PowerOffAlarm \
HotwordEnrollmentOKGoogleWCD9340 \
HotwordEnrollmentXGoogleWCD9340 \
NxpNfcNci \
QtiTelephonyService \
IFAAService \
Expand Down

0 comments on commit e12095c

Please sign in to comment.