android - AppOpsService:what's the difference between startOperation() and noteOperation()? -
since android 4.2 google put appops function settings app ,but after few weeks ,they close entrance of function, , close entrance,the function code can found in frameworks/base/services/java/com/android/server/appopsservice.java 。
but in source code , found there 2 functions check whether operation can permission. 1 startoperation() , noteoperation(), through reading remark , know : startoperation long-term permission check,and must call finishoperation after operation done. noteoperation short-term.though knew can't tell time should use startoperation , time should chose noteoperation .
did read soucecode, , plz give me suggesstion. thank in advance.
well , after few days late , found answer finally. difference between startop , noteop : startop prepare opereation work long time ,like gps,like vibrator , on , can start monitor permission use startop , end monitor use finishop , remember , finishop must called after end monitor. noteop short term operation , example : check whether app has permission send sms or receiver sms. ,above difference between 2 methods. last not least : ****
Comments
Post a Comment