Add new IScreenProtectorDetectorService interface to twoshay.

Fixes denial:
SELinux : avc:  denied  { add } for pid=9557 uid=0 name=com.google.input.algos.spd.IScreenProtectorDetectorService/default scontext=u:r:twoshay:s0 tcontext=u:object_r:default_android_service:s0 tclass=service_manager permissive=0

Bug: 260302317
Test: Device boot without denials.
Change-Id: I3d4d19405e32165285f8c47e3ba5f74bcc643f77
Signed-off-by: Mark Chang <changmark@google.com>
diff --git a/input/platform_app.te b/input/platform_app.te
index 17cc511..be9509c 100644
--- a/input/platform_app.te
+++ b/input/platform_app.te
@@ -1,2 +1,3 @@
+allow platform_app screen_protector_detector_service:service_manager find;
 allow platform_app touch_context_service:service_manager find;
 binder_call(platform_app, twoshay)
diff --git a/input/service.te b/input/service.te
index 989cd1b..bf9df0c 100644
--- a/input/service.te
+++ b/input/service.te
@@ -1 +1,2 @@
 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 95e70f8..8a9f592 100644
--- a/input/service_contexts
+++ b/input/service_contexts
@@ -1 +1,2 @@
 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 0511f3d..9878c11 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)
 binder_call(twoshay, platform_app)