Android PhotoPicker: Fix crash.
Earlier I fixed a crash in updateSelectionState by returning early. That, however, isn't enough because onSelectionState also calls isPictureTile, when it is not safe to do so (because initialize hasn't been called). A better way is to move the early return up one function in the callstack (from updateSelectionState to onSelectionState), which should catch both of these issues. To be sure, I also checked if updateSelectionState could be called outside of onSelectionState and found two variants: 1) It is called after initialize (when it is safe). 2) It is called after we call isPictureTile (e.g. in setChecked), in which case we would already be seeing crash stacks for that (but we're not). Bug: 760785, 656015 Change-Id: I0f200b16cd34698e103dc4c2b07b3f86c948adad Reviewed-on: https://chromium-review.googlesource.com/892886 Commit-Queue: Theresa <twellington@chromium.org> Reviewed-by:Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#532887}
Showing
Please register or sign in to comment