how to make on property:xxx=* get act only when property changed?

29 views
Skip to first unread message

yf...@mobvoi.com

unread,
Feb 14, 2017, 2:56:09 PM2/14/17
to Android Building
In my init.project.rc file, I observe a property by doing this:

on property:persist.sys.test=*
    start testservice

my purpose is to run testservice each time when persist.sys.test changed, but testservice will also get act when system reboots. Is there any way I can make this as what I want?

Yafei Liu

unread,
Feb 28, 2017, 12:50:31 AM2/28/17
to android-...@googlegroups.com
I'v read the init.c and found out if form like "=*", each time property is set, the target will triger.
I'v modifid the code to add a new trigger to ensure being called when property is actually chaned, since this won't be merged by google, I did not borth uploading it. Any one who is interested this could ask me for a patch

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-building+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages