summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/Program.java
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2020-11-24 13:24:53 +0100
committerMartijn Coenen <maco@google.com>2021-03-08 10:25:36 +0000
commit031e607a5a391bc2ab704447c624f8753c9bac0d (patch)
treed53b7dbd29c4af47bb8234ae4e0fab1d71e8d277 /rs/java/android/renderscript/Program.java
parent01f8961bce7bbf64e1e9e95eccd8c7b5a64c7251 (diff)
Use futures for binding and talking to the ExternalStorageService.
Patching this CL since it fixes the issue of screen freezing after switching user. The existing CountdownLatch logic had some corner cases where it would continue waiting for the latch to count down, even when it was already clear that the operation couldn't succeed (eg, a bind failed). To fix this, as well as try and simplify some of this code, switch to using futures, which have a nicely defined way of cancelling outstanding operations. Additionally, switch to using a dedicated handler thread for receiving bind events for all users, not just demo users. This avoids having to wait for a long time when the system_server main thread is busy. Fix: 180930791 Test: atest AdoptableHostTest atest CtsScopedStorageHostTest atest android.multiuser.UserLifecycleTests#managedProfileUnlock atest android.multiuser.UserLifecycleTests#managedProfileUnlockAndLaunchApp_stopped Change-Id: Id58970106d152e5d200cfd3993fd83b93b975156 Merged-In: I1b7fde2f6ed1074b9c814d56808ab1614f25aead (cherry picked from commit 9252dfb49348928247b082435a61edbacfc60ef7)
Diffstat (limited to 'rs/java/android/renderscript/Program.java')
0 files changed, 0 insertions, 0 deletions