summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorZim <zezeozue@google.com>2021-02-23 12:16:50 +0000
committerZim <zezeozue@google.com>2021-02-24 09:34:03 +0000
commit465e3b7115ac8974cae42cdf7b4e3896504ca9bc (patch)
treed887ab5f1a9241add80e0f8765410282e63db87e /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent59536a1edb3c2746ca3a02131ca6139e79724d54 (diff)
Extend AnrController to improve ANR dialog controls
I5431d22bd8faa75e3deab1960a2f721784f98d42 introduced a basic ANR controller interface to allow services within the system_server register to delay the ANR dialog during an ANR. Some limitations of that interface were: 1. No way to cancel the ANR dialog if the normal function of the app resumed during the delay 2. The AnrController#getAnrDelay method was serving a dual purpose of returning the delay and showing an interim UI 3. The interim UI might live within an updatable mainline module, hence forcing the system_server to block (asynchronously) on the 'getter' for the binder call. This cl addresses the problems above with the following new methods on AnrController: onAnrDelayStarted and onAnrDelayCompleted. These methods provide a clearer interface for the following reasons: 1. onAnrDelayCompleted will return a boolean value to indicate whether the ANR dialog should still be shown after the delay 2. onAnrDelayStarted is a more explicit API that can be called asynchronously without blocking to notify external components to show an interim UI 3. The existing getAnrDelay can be handled completely within the system_server without blocking on an external binder call See design (2a) in go/transcoding-anrs for more details Test: Manual Bug: 170486601 Change-Id: Idb9190a0e6014ce64bf1412c26f6ae03f97e922d
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions