2013年8月26日星期一

Android SystemProperties.set problem, very strange. .

This SystemProperties.set (string name, string value) we are very familiar with it, what have encountered this problem
When the program first set SystemProperties.set ("frank", "1");
Then keep setting SystemProperties.set ("frank", "2");

String lang = SystemProperties.get ("frank"); shown as a;

SystemProperties.set ("frank", "2"); actually invalid. . . Added a while (true) {

If reading is less than 2, it has been SystemProperties.set ("frank", "2"); reading, brake;


}
can. . SystemProperties is reflective. . Oh, how could this not be a continuous, slow response Mody. .



------ Solution ------------------------------------ --------
SystemProperties permission is required by the prefix for verification.
You can set the program to UID System, and then use System permissions Properties, such as service starts with.
------ Solution ---------------------------------------- ----
SystemProperties is prop service operating it, this is not necessarily synchronized
but to prop service responds to the request, do deal with it
------ reference ----------------------- ----------------
Oh prefix validate these times spent oh. . Justified

------ reference ------------------------------------ ---
Xianxie try

------ reference ------------------------------------ ---

looked at the source ~ ~ should be, LS two expert said right. Yes, thanks, oh
------ reference ------------------------------- --------
I also encountered this problem, I told the landlord, like a dead loop. . . The result was invalid, SystemProperties.set ("persist.sys.onoffsounds", "0"); log out has always been a hit to begin setting "1", did not understand why. . . Solving

没有评论:

发表评论