Add Car service support for Trusted device.
Support added for:
1. Implementing the APIs for CarTrustAgentEnrollmentManager.
2. A BLE Trust Agent for car that the system binds to.
3. A BLE Service that sets up GATT service and characteristics for
enrollment and unlock.
Bug: 120911995
Test: Test Trusted device enrollment and unlock works.
Change-Id: I563cddded0dedd16593d38c65d84ab8ae8de6dc3
diff --git a/service/AndroidManifest.xml b/service/AndroidManifest.xml
index 76c4d37..3949233 100644
--- a/service/AndroidManifest.xml
+++ b/service/AndroidManifest.xml
@@ -283,6 +283,7 @@
<uses-permission android:name="android.permission.MANAGE_USERS" />
<uses-permission android:name="android.permission.LOCATION_HARDWARE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+ <uses-permission android:name="android.permission.PROVIDE_TRUST_AGENT" />
<application android:label="@string/app_title"
android:directBootAware="true"
@@ -297,6 +298,21 @@
</intent-filter>
</service>
<service android:name=".PerUserCarService" android:exported="false" />
+
+ <service
+ android:name="com.android.car.trust.CarBleTrustAgent"
+ android:permission="android.permission.BIND_TRUST_AGENT"
+ android:singleUser="true">
+ <intent-filter>
+ <action android:name="android.service.trust.TrustAgentService" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <!-- Warning: the meta data must be included if the service is direct boot aware.
+ If not included, the device will crash before boot completes. Rendering the
+ device unusable. -->
+ <meta-data android:name="android.service.trust.trustagent"
+ android:resource="@xml/car_trust_agent"/>
+ </service>
<activity android:name="com.android.car.pm.ActivityBlockingActivity"
android:excludeFromRecents="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar"