diff --git a/input/gia/gia.mk b/input/gia/gia.mk index ea079ca..d46fa96 100644 --- a/input/gia/gia.mk +++ b/input/gia/gia.mk @@ -1,11 +1,19 @@ -BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/input/gia/sepolicy +# GIA is not designed for AOSP +ifeq (,$(filter aosp_%, $(TARGET_PRODUCT))) + BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/input/gia/sepolicy -PRODUCT_PACKAGES += gia -PRODUCT_PACKAGES += com.google.input.gia.giaservicemanager + # If Pixel System Service exists, allow it to access GIA + ifeq (,$(filter factory_%, $(TARGET_PRODUCT))) + BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/input/gia/sepolicy-pixelsystemservice + endif -PRODUCT_SOONG_NAMESPACES += vendor/google/interfaces -PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core -PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core-servicemanager + PRODUCT_PACKAGES += gia + PRODUCT_PACKAGES += com.google.input.gia.giaservicemanager -DEVICE_MANIFEST_FILE += device/google/gs-common/input/gia/aidl/manifest.xml -DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/input/gia/aidl/compatibility_matrix.xml + PRODUCT_SOONG_NAMESPACES += vendor/google/interfaces + PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core + PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core-servicemanager + + DEVICE_MANIFEST_FILE += device/google/gs-common/input/gia/aidl/manifest.xml + DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/input/gia/aidl/compatibility_matrix.xml +endif diff --git a/input/gia/sepolicy-pixelsystemservice/gia.te b/input/gia/sepolicy-pixelsystemservice/gia.te new file mode 100644 index 0000000..d7313cc --- /dev/null +++ b/input/gia/sepolicy-pixelsystemservice/gia.te @@ -0,0 +1,8 @@ +# SEPolicies to be configured only if and only if Pixel System Service exists on the device + +# allow pixelsystemservice_app to communicate with gia +binder_use(pixelsystemservice_app) +hal_client_domain(pixelsystemservice_app, hal_gia) + +# allow gia to execute callback for pixelsystemservice_app +binder_call(gia, pixelsystemservice_app) diff --git a/input/gia/sepolicy/gia.te b/input/gia/sepolicy/gia.te index a0244d2..2c84e7c 100644 --- a/input/gia/sepolicy/gia.te +++ b/input/gia/sepolicy/gia.te @@ -16,10 +16,3 @@ hal_server_domain(gia, hal_gia) # allow gia for accessing touch related system file-nodes allow gia sysfs_touch_gti:dir r_dir_perms; allow gia sysfs_touch_gti:file rw_file_perms; - -# allow pixelsystemservice_app to communicate with gia -binder_use(pixelsystemservice_app) -hal_client_domain(pixelsystemservice_app, hal_gia) - -# allow gia to execute callback for pixelsystemservice_app -binder_call(gia, pixelsystemservice_app)