Merge "Transition mediacodec to /dev/hwbinder and /dev/vndbinder" into oc-dev
diff --git a/public/mediacodec.te b/public/mediacodec.te
index b8cde80..c67078b 100644
--- a/public/mediacodec.te
+++ b/public/mediacodec.te
@@ -8,7 +8,14 @@
# and use macro hal_server_domain
get_prop(mediacodec, hwservicemanager_prop)
-binder_use(mediacodec)
+full_treble_only(`
+ # on full-Treble devices, route all /dev/binder traffic to /dev/vndbinder
+ vndbinder_use(mediacodec)
+')
+not_full_treble(`
+ # on legacy devices, continue to allow /dev/binder traffic
+ binder_use(mediacodec)
+')
binder_call(mediacodec, binderservicedomain)
binder_call(mediacodec, appdomain)
binder_service(mediacodec)