Make ApplicationStatus.getStateForActivity handle null input.
Holding a weak reference to activities is the preferred approach in a lot of client code, so making this support null seems OK to me. I think it would be fine to update each client as well... don't have a strong preference. The gotcha (which I wasn't aware of) is that ConcurrentHashMap does not handle null keys/calls of get(<key>). BUG=792377 Change-Id: I34549aecf68c04f6140bbc4eaaa3405409347cba Reviewed-on: https://chromium-review.googlesource.com/811431Reviewed-by:Yaron Friedman <yfriedman@chromium.org> Commit-Queue: David Trainor <dtrainor@chromium.org> Cr-Commit-Position: refs/heads/master@{#522315}
Showing
Please register or sign in to comment