OSDN Git Service

Refresh the native app ops manager's token if needed.
authorSvet Ganov <svetoslavganov@google.com>
Fri, 26 Feb 2016 20:13:04 +0000 (12:13 -0800)
committerThe Android Automerger <android-build@google.com>
Fri, 26 Feb 2016 21:14:12 +0000 (13:14 -0800)
commit3cc1076a7c8d3b4e25f197703d6292f51bae3160
tree00889bd7e8e7f79721f2894e1721a9bf6631abf6
parent7ddeac5c4d4a84f0bc1b2c08a9680bd5baba88e2
Refresh the native app ops manager's token if needed.

The app ops manager serivce keeps track of started app ops
by a process by stashing them in a binder object that is
passed to the remote process to hold on to. Hence, the data
is in the system process and is referenced by the client
process it tracks to prevent garbage collaction and limit
risk of resource leaks. It is possible that the client
process is longer lived than the system seriver, e.g. camera
server starts an app op, the system server dies for some
reason, the camera server's app ops manager ends up with
a stale token. The solution is to check the validity of the
token and refresh it if needed.

bug:27344593

Change-Id: I0abb39e777b7b66b1b5cefede7e7b41c4404c4b1
libs/binder/AppOpsManager.cpp