add app blocking api
- launches CarAppBlockingPolicyService and read Policy on startup
- also provides setAppBlockingPolicy API
- not working fully due to missng framework api but only sets internal
state for now.
- also fixed some build warnings
- also renamed all permisisons to android.support.car
- remaining TODO:
monitor app install / uninstall and re-activate policy
plumb framework side policy setting
bug: 25261583
Change-Id: I6da09468c95a28f2e3d7d59e6e91279ca018239b
diff --git a/service/AndroidManifest.xml b/service/AndroidManifest.xml
index 5974edc..d2fd481 100644
--- a/service/AndroidManifest.xml
+++ b/service/AndroidManifest.xml
@@ -35,7 +35,7 @@
android:label="@string/car_permission_label_fuel"
android:description="@string/car_permission_desc_fuel" />
<permission
- android:name="com.android.car.permission.CAR_HVAC"
+ android:name="android.support.car.permission.CAR_HVAC"
android:permissionGroup="android.support.car.permission.CAR_INFORMATION"
android:protectionLevel="system|signature"
android:label="@string/car_permission_label_hvac"
@@ -59,7 +59,7 @@
android:label="@string/car_permission_label_vendor_extension"
android:description="@string/car_permission_desc_vendor_extension" />
<permission
- android:name="com.android.car.permission.CAR_RADIO"
+ android:name="android.support.car.permission.CAR_RADIO"
android:permissionGroup="android.support.car.permission.CAR_INFORMATION"
android:protectionLevel="system|signature"
android:label="@string/car_permission_label_radio"
@@ -71,6 +71,13 @@
android:label="@string/car_permission_label_mock_vehicle_hal"
android:description="@string/car_permission_desc_mock_vehicle_hal" />
+ <!-- may replace this with system permission if proper one is defined. -->
+ <permission
+ android:name="android.support.car.permission.CONTROL_APP_BLOCKING"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_control_app_blocking"
+ android:description="@string/car_permission_desc_control_app_blocking" />
+
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
<uses-permission android:name="android.permission.DEVICE_POWER" />