summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorDmitri Plotnikov <dplotnikov@google.com>2011-01-17 09:46:23 -0800
committerDmitri Plotnikov <dplotnikov@google.com>2011-01-17 09:46:23 -0800
commitfd119e986d531345c2df3022ea9d968bb7fd3858 (patch)
treeed1651fe8ebfb40230305103177da3d57266907e /graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
parentc6684f9e9790e92960504e9b32f20f27003d9f37 (diff)
Delivering null cursor to loader callbacks.
ContentProviders are allowed to return null and both of our contact directories (Focus and Exchange) actually do when they find no data to return. The problem is that when LoaderManager receives a result from a loader, it checks if the result is the same as previously received. That's fine, as long as the loader always returns a different result. Now consider a loader that returns null when it cannot produce the result. What we are seeing is that if the loader is rapidly restared and returns null twice in a row, the null is never delivered to the callbacks. In the case of the reported bug, the scenario is this: 1. We look for "foo" 2. Data for "foo" comes from a directory and we display it 3. We hit backspace twice in rapid succession. Each time we hit backspace, the loader is restared, but since we do this very fast, the second restart overrides the first. So far so good. 4. The directories are programmed to return null if the query string is less than 3 characters long, so the loader returns null twice. 5. Loader manager looks at the final result, compares it to the previous result and since they are the same (both null) concludes that it does not need to deliver either of them. 6. The UI attempts to show the stale data and blows up Bug: 3352125 Change-Id: I3e5bc505faa03f72ebe5cb010377a740f5c7d5b6
Diffstat (limited to 'graphics/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions