Mark all clients of Allocator HAL
This change associates all domains which are clients of Allocator HAL
with hal_allocator_client and the, required for all HAL client
domains, halclientdomain.
This enables this commit to remove the now unnecessary hwallocator_use
macro because its binder_call(..., hal_allocator_server) is covered by
binder_call(hal_allocator_client, hal_allocator_server) added in this
commit.
Unfortunately apps, except isolated app, are clients of Allocator HAL
as well. This makes it hard to use the hal_client_domain(...,
hal_allocator) macro because it translates into "typeattribute" which
currently does not support being provided with a set of types, such as
{ appdomain -isolated_app }. As a workaround, hopefully until
typeattribute is improved, this commit expresses the necessary
association operation in CIL. private/technical_debt.cil introduced by
this commit is appended into the platform policy CIL file, thus
ensuring that the hack has effect on the final monolithic policy.
P. S. This change also removes Allocator HAL access from isolated_app.
Isolated app shouldn't have access to this HAL anyway.
Test: Google Play Music plays back radios
Test: Google Camera records video with sound and that video is then
successfully played back with sound
Test: YouTube app plays back clips with sound
Test: YouTube in Chrome plays back clips with sound
Bug: 34170079
Change-Id: Id00bba6fde83e7cf04fb58bc1c353c2f66333f92
2017-03-21 22:28:53 +01:00
|
|
|
; THIS IS A WORKAROUND for the current limitations of the module policy language
|
|
|
|
; This should be used sparingly until we figure out a saner way to achieve the
|
|
|
|
; stuff below, for example, by improving typeattribute statement of module
|
|
|
|
; language.
|
|
|
|
;
|
|
|
|
; NOTE: This file has no effect on recovery policy.
|
|
|
|
|
|
|
|
; Apps, except isolated apps, are clients of Allocator HAL
|
|
|
|
; Unfortunately, we can't currently express this in module policy language:
|
|
|
|
; typeattribute { appdomain -isolated_app } hal_allocator_client;
|
|
|
|
; typeattribute hal_allocator_client halclientdomain;
|
|
|
|
(typeattributeset hal_allocator_client ((and (appdomain) ((not (isolated_app))))))
|
|
|
|
(typeattributeset halclientdomain (hal_allocator_client))
|
2017-03-30 04:08:34 +02:00
|
|
|
|
2017-04-17 21:53:40 +02:00
|
|
|
; Apps, except isolated apps, are clients of Graphics Allocator HAL
|
|
|
|
; Unfortunately, we can't currently express this in module policy language:
|
|
|
|
; typeattribute { appdomain -isolated_app } hal_graphics_allocator_client;
|
|
|
|
(typeattributeset hal_graphics_allocator_client ((and (appdomain) ((not (isolated_app))))))
|
|
|
|
|
2017-03-30 04:08:34 +02:00
|
|
|
; Domains hosting Camera HAL implementations are clients of Allocator HAL
|
|
|
|
; Unfortunately, we can't currently express this in module policy language:
|
|
|
|
; typeattribute hal_camera hal_allocator_client;
|
|
|
|
(typeattributeset hal_allocator_client (hal_camera))
|