diff options
author | Daichi Hirono <hirono@google.com> | 2017-03-17 09:12:12 +0900 |
---|---|---|
committer | Daichi Hirono <hirono@google.com> | 2017-03-22 05:58:20 +0000 |
commit | ce522835eace4fe2cb1d374ffe10afd308d6b473 (patch) | |
tree | 28de44e0b0df573f94a07833c347218168a6c722 /rs/java/android/renderscript/ProgramVertexFixedFunction.java | |
parent | 58ba53bd53d08c8d23f8fa338aa4c4bb6bc86c91 (diff) |
Stop holding mProxyLock while downloading PAC script data.
Holding PacManager#mProxyLock for long time eventually causes ANR when
launching new applications.
1. ActivityThread#handleBindApplication blocks until
ActivityThread#handleBindApplication
-> ConnectivityService#getProxyForNetwork()
-> ConnectivityService#getDefaultProxy()
obtains the lock of ConnectivityService#mProxyLock
2. ConnectivityService#mProxyLock can be held by
ConnectivityService#setGlobalProxy() running on another thread until
ConnectivityService#setGlobalProxy()
-> ConnectivityService#sendProxyBroadcast()
-> PacManager#setCurrentProxyScriptUrl()
obtains the lock of PacManager#mProxyLock
3. Before the CL, PacManager#mProxyLock could be held by
mPacDownloader#run() on mNetThread until downloading a PAC script
completed.
The CL fixes the step 3 so that mPacDownloader#run does not keep the
lock of PacManager#mProxyLock. It eventually fixes long blocking at
ActivityThread#handleBindApplication and ANR when launching an
application.
Bug: 36317236
Test: Build succeeded
Merged-In: I864e41e1142178681f8f1b4fb7750d37e3ab2076
Change-Id: I864e41e1142178681f8f1b4fb7750d37e3ab2076
Diffstat (limited to 'rs/java/android/renderscript/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions