summaryrefslogtreecommitdiff
path: root/tools/aapt2/diff/Diff.cpp
diff options
context:
space:
mode:
authorFyodor Kupolov <fkupolov@google.com>2017-03-28 19:11:17 -0700
committerFyodor Kupolov <fkupolov@google.com>2017-03-29 17:27:57 +0000
commit9ac40f1cf1125c6144e92518a9d44b0eea2ef7b7 (patch)
treedcaabdbe87fae48d87a0dbb29137904600b09a8d /tools/aapt2/diff/Diff.cpp
parent76d779374a92f502579e72f822cf815e54be33ea (diff)
Only use cacheLock when it's needed
When reading from cache, we can avoid synchronization on dbLock if we only read from cache (no db access). When doing updates to db and cache, we should hold cacheLock only when updating the cache. This change improves locking in the following methods: - getAccountVisibilityFromCache - saveAuthTokenToDatabase - getAccountsFromCacheLocked no longer allows outside locking. The method was renamed to getAccountsFromCache and now self-manages locks - writeAuthTokenIntoCacheLocked - readAuthTokenInternal Test: AccountManagerServiceTest Bug: 36485175 Bug: 35262596 Change-Id: I9aca45c31716c4f0e0fd9f07859e88a7f5ba6922
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions