Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sepolicy: add hal_lineage_powershare #2

Open
wants to merge 1 commit into
base: ten
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions common/dynamic/hal_lineage_powershare.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# HWBinder IPC from client to server
binder_call(hal_lineage_powershare_client, hal_lineage_powershare_server)

add_hwservice(hal_lineage_powershare_server, hal_lineage_powershare_hwservice)
allow hal_lineage_powershare_client hal_lineage_powershare_hwservice:hwservice_manager find;

# Allow binder communication with platform_app
binder_call(hal_lineage_powershare, platform_app)
1 change: 1 addition & 0 deletions common/dynamic/hwservice.te
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
type hal_lineage_camera_motor_hwservice, hwservice_manager_type;
type hal_lineage_fod_hwservice, hwservice_manager_type;
type hal_lineage_livedisplay_hwservice, hwservice_manager_type;
type hal_lineage_powershare_hwservice, hwservice_manager_type;
type hal_lineage_touch_hwservice, hwservice_manager_type;
1 change: 1 addition & 0 deletions common/dynamic/hwservice_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ vendor.lineage.livedisplay::IPictureAdjustment u:object
vendor.lineage.livedisplay::IReadingEnhancement u:object_r:hal_lineage_livedisplay_hwservice:s0
vendor.lineage.livedisplay::ISunlightEnhancement u:object_r:hal_lineage_livedisplay_hwservice:s0
vendor.lineage.power::ILineagePower u:object_r:hal_power_hwservice:s0
vendor.lineage.powershare::IPowerShare u:object_r:hal_lineage_powershare_hwservice:s0
vendor.lineage.touch::IGloveMode u:object_r:hal_lineage_touch_hwservice:s0
vendor.lineage.touch::IKeyDisabler u:object_r:hal_lineage_touch_hwservice:s0
vendor.lineage.touch::IStylusMode u:object_r:hal_lineage_touch_hwservice:s0
Expand Down
3 changes: 3 additions & 0 deletions common/private/platform_app.te
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ hal_client_domain(platform_app, hal_lineage_fod)

# Allow LiveDisplay HAL service to be found
hal_client_domain(platform_app, hal_lineage_livedisplay)

# Allow PowerShare HAL service to be found
hal_client_domain(platform_app, hal_lineage_powershare)
1 change: 1 addition & 0 deletions common/private/system_server.te
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ allow system_server storage_stub_file:dir getattr;
hal_client_domain(system_server, hal_lineage_fod)
hal_client_domain(system_server, hal_lineage_livedisplay)
hal_client_domain(system_server, hal_lineage_touch)
hal_client_domain(system_server, hal_lineage_powershare)
1 change: 1 addition & 0 deletions common/public/attributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ hal_attribute(lineage_camera_motor)
hal_attribute(lineage_fod)
hal_attribute(lineage_livedisplay)
hal_attribute(lineage_touch)
hal_attribute(lineage_powershare)
5 changes: 5 additions & 0 deletions common/vendor/hal_lineage_powershare_default.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type hal_lineage_powershare_default, domain;
hal_server_domain(hal_lineage_powershare_default, hal_lineage_powershare)

type hal_lineage_powershare_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_lineage_powershare_default)