Clarify the behavior about event and property triggers
See the comment threads at [1] for the rationale behind the behavior.
[1] https://android-review.git.corp.google.com/c/platform/system/core/+/161601/16/init/action.cpp#232
Bug: N/A
Test: N/A
Change-Id: I8b271073ec14ad9fa9add5df60577b34d1df3241
diff --git a/init/README.md b/init/README.md
index 6596528..f48fa6b 100644
--- a/init/README.md
+++ b/init/README.md
@@ -162,6 +162,17 @@
setprop e 1
setprop f 2
+If the property `true` wasn't `true` when the `boot` was triggered, then the
+order of the commands executed will be:
+
+ setprop a 1
+ setprop b 2
+ setprop e 1
+ setprop f 2
+
+If the property `true` becomes `true` *AFTER* `boot` was triggered, nothing will
+be executed. The condition `boot && property:true=true` will be evaluated to
+false because the `boot` trigger is a past event.
Services
--------
@@ -433,7 +444,9 @@
For example:
`on boot && property:a=b` defines an action that is only executed when
-the 'boot' event trigger happens and the property a equals b.
+the 'boot' event trigger happens and the property a equals b at the moment. This
+will NOT be executed when the property a transitions to value b after the `boot`
+event was triggered.
`on property:a=b && property:c=d` defines an action that is executed
at three times: