Add hal_dumpstate attribute.
- Also allow dumpstate to talk to hal_dumpstate.
Bug: 31982882
Test: compiles
Change-Id: Ib9cf0027ee7e71fa40b9ccc29fc8dccea6977e5c
diff --git a/public/attributes b/public/attributes
index 9331437..4cfc098 100644
--- a/public/attributes
+++ b/public/attributes
@@ -116,6 +116,7 @@
# HALs
attribute hal_audio;
+attribute hal_dumpstate;
attribute hal_graphics_allocator;
attribute hal_graphics_composer;
attribute hal_ir;
diff --git a/public/dumpstate.te b/public/dumpstate.te
index 1d3a270..08d24ae 100644
--- a/public/dumpstate.te
+++ b/public/dumpstate.te
@@ -99,6 +99,7 @@
# Vibrate the device after we are done collecting the bugreport
# For binderized mode:
+binder_call(dumpstate, hal_dumpstate)
binder_call(dumpstate, hal_vibrator)
binder_call(dumpstate, hwservicemanager)
# For passthrough mode:
diff --git a/public/hal_dumpstate.te b/public/hal_dumpstate.te
new file mode 100644
index 0000000..3312b0a
--- /dev/null
+++ b/public/hal_dumpstate.te
@@ -0,0 +1,5 @@
+# hwbinder access
+hwbinder_use(hal_dumpstate)
+
+# call into dumpstate process (callbacks)
+binder_call(hal_dumpstate, dumpstate)