Modify CarEvsManager APIs
- Modify generateSessionToken() to return an invalid token instead of
null.
- Rename requestToStartService() as startActivity().
- Rename requestToStopService() as stopActivity().
- Modify stopActivity() not to return any value.
- Add android.car.Car.PERMISSION_REQUEST_CAR_EVS_ACTIVITY and update
startActivity() and stopActivity() require this new permission.
- Add android.car.Car.PERMISSION_CONTROL_CAR_EVS_ACTIVITY and update
generateSessionToken() requires this new permission.
- Rename android.car.Car.PERMISSION_USE_CAR_EVS_SERVICE as
android.car.Car.PERMISSION_USE_CAR_EVS_CAMERA.
- Add a new API that checks the availability of CarEvsService types.
In addition, this change removes a private logd() method from
CarEvsService and adds a missing permision check to CarEvsService's
generateSessionToken().
Fix: 180451643
Fix: 183141701
CTS-Coverage-Bug: 179508501
Test: m -j
Change-Id: I88c47b86ba2839103ed581ed6bc1506d371454f5
Merged-In: I88c47b86ba2839103ed581ed6bc1506d371454f5
(cherry picked from commit ef59e9464604d30747f1fd64d76852eaafbea6f1)
diff --git a/service/AndroidManifest.xml b/service/AndroidManifest.xml
index b978404..c7e719d 100644
--- a/service/AndroidManifest.xml
+++ b/service/AndroidManifest.xml
@@ -370,15 +370,31 @@
android:label="@string/car_permission_label_driving_state"
android:description="@string/car_permission_desc_driving_state"/>
- <!-- Allows an application to use car's EVS service.
+ <!-- Allows an application to request to launch the EVS previewing activity.
<p>Protection level: signature|privileged
-->
- <permission android:name="android.car.permission.USE_CAR_EVS_SERVICE"
+ <permission android:name="android.car.permission.REQUEST_CAR_EVS_ACTIVITY"
android:protectionLevel="signature|privileged"
- android:label="@string/car_permission_label_use_evs_service"
- android:description="@string/car_permission_desc_use_evs_service"/>
+ android:label="@string/car_permission_label_request_evs_activity"
+ android:description="@string/car_permission_desc_request_evs_activity"/>
- <!-- Allows an application to monitor a current status of car's EVS service.
+ <!-- Allows an application to control the EVS previewing activity.
+ <p>Protection level: signature|privileged
+ -->
+ <permission android:name="android.car.permission.CONTROL_CAR_EVS_ACTIVITY"
+ android:protectionLevel="signature|privileged"
+ android:label="@string/car_permission_label_control_evs_activity"
+ android:description="@string/car_permission_desc_control_evs_activity"/>
+
+ <!-- Allows an application to use EVS camera streams.
+ <p>Protection level: signature|privileged
+ -->
+ <permission android:name="android.car.permission.USE_CAR_EVS_CAMERA"
+ android:protectionLevel="signature|privileged"
+ android:label="@string/car_permission_label_use_evs_camera"
+ android:description="@string/car_permission_desc_use_evs_camera"/>
+
+ <!-- Allows an application to monitor a current status of the EVS service.
<p>Protection level: signature|privileged
-->
<permission android:name="android.car.permission.MONITOR_CAR_EVS_STATUS"