Allow TouchContextService dump am: f7be0c4896 am: de7a7c1338

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/pixel-sepolicy/+/22873473

Change-Id: I5fc7c64e61df0dbeebd93195f0b06f8cc817e148
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/common/vendor/attributes b/common/vendor/attributes
new file mode 100644
index 0000000..25b59ac
--- /dev/null
+++ b/common/vendor/attributes
@@ -0,0 +1,2 @@
+attribute pixel_battery_domain;
+attribute pixel_battery_service_type;
diff --git a/googlebattery/hal_googlebattery.te b/googlebattery/hal_googlebattery.te
index 2cc3a7c..370b8d6 100644
--- a/googlebattery/hal_googlebattery.te
+++ b/googlebattery/hal_googlebattery.te
@@ -1,4 +1,4 @@
-type hal_googlebattery, domain;
+type hal_googlebattery, domain, pixel_battery_domain;
 type hal_googlebattery_exec, exec_type, vendor_file_type, file_type;
 
 init_daemon_domain(hal_googlebattery)
diff --git a/googlebattery/service.te b/googlebattery/service.te
index e68baa9..440b1ce 100644
--- a/googlebattery/service.te
+++ b/googlebattery/service.te
@@ -1 +1 @@
-type hal_googlebattery_service, hal_service_type, service_manager_type;
+type hal_googlebattery_service, hal_service_type, service_manager_type, pixel_battery_service_type;
diff --git a/input/platform_app.te b/input/platform_app.te
index 2d47236..9b4a7af 100644
--- a/input/platform_app.te
+++ b/input/platform_app.te
@@ -1,3 +1,4 @@
+allow platform_app screen_protector_detector_service:service_manager find;
 allow platform_app touch_context_service:service_manager find;
 allow platform_app gril_antenna_tuning_service:service_manager find;
 binder_call(platform_app, twoshay)
diff --git a/input/service.te b/input/service.te
index d521666..d59328b 100644
--- a/input/service.te
+++ b/input/service.te
@@ -1,2 +1,3 @@
 type gril_antenna_tuning_service, service_manager_type, hal_service_type;
 type touch_context_service, service_manager_type, hal_service_type;
+type screen_protector_detector_service, service_manager_type, hal_service_type;
diff --git a/input/service_contexts b/input/service_contexts
index ed69aef..f48eee4 100644
--- a/input/service_contexts
+++ b/input/service_contexts
@@ -1,2 +1,3 @@
 com.google.input.algos.gril.IGrilAntennaTuningService/default              u:object_r:gril_antenna_tuning_service:s0
 com.google.input.ITouchContextService/default              u:object_r:touch_context_service:s0
+com.google.input.algos.spd.IScreenProtectorDetectorService/default u:object_r:screen_protector_detector_service:s0
diff --git a/input/twoshay.te b/input/twoshay.te
index 3d48318..1cbbbc6 100644
--- a/input/twoshay.te
+++ b/input/twoshay.te
@@ -7,6 +7,7 @@
 allow twoshay twoshay:capability sys_nice;
 
 binder_use(twoshay)
+add_service(twoshay, screen_protector_detector_service)
 add_service(twoshay, touch_context_service)
 add_service(twoshay, gril_antenna_tuning_service)
 binder_call(twoshay, platform_app)