summaryrefslogtreecommitdiffstats
path: root/vpn
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2010-10-13 23:32:17 +0800
committerHung-ying Tyan <tyanh@google.com>2010-10-14 16:54:47 +0800
commitbd57eeafe034cf850225db403700b5dc5db5ebcc (patch)
tree052db2ebe953138c06360cf02422ee38a80d21ae /vpn
parent3bb1044243ad38da35ccddc3e0d6d92d64fefe3e (diff)
downloadframeworks_base-bd57eeafe034cf850225db403700b5dc5db5ebcc.zip
frameworks_base-bd57eeafe034cf850225db403700b5dc5db5ebcc.tar.gz
frameworks_base-bd57eeafe034cf850225db403700b5dc5db5ebcc.tar.bz2
SipService: add wake lock for multiple components.
+ Add MyWakeLock to maintain a global wake lock for multiple components. + Use a Set to store components that want to hold the lock. + When the first component enters the set, we grab the global wake lock. + When the set becomes empty, we release the global lock. + In places like no account being opened to receive calls, we reset the wake lock just to be safe from possible leakage. + Make MyExecutor aware of the wake lock. It will grab the wake lock on behalf of the task so that tasks don't need to worry about the lock. + Connectivity receiver is modified to be executed in MyExecutor. + WakeupTimer handler is already protected by AlarmManager's wake lock but all the timeout handlers that register themselves to the WakeupTimer are to be executed in MyExecutor to be protected by the wake lock. + Remove unnecessary code in the Keepalive and registration processes. Since both processes are executed in MyExecutor submitted by the WakeupTimer (as they are timeout handlers registered to the WakeupTimer), they don't need to add themselves to MyExecutor explicitly in their run() callbacks. + Make the keepalive process wait for at most 3 seconds instead of forever for server response. It could cause the wake lock to be held longer than necessary and is a potential cause for ANR. http://b/issue?id=3081828 Related bug: http://b/issue?id=3087153 Change-Id: Idee0ddb837e67daa0d5092c012bb242bd7c18431
Diffstat (limited to 'vpn')
0 files changed, 0 insertions, 0 deletions