Skip to content
Commit b2d6ed3c authored by Geoffrey Pitsch's avatar Geoffrey Pitsch
Browse files

Prevent notifyScreenshotError() from calling twice

Found this while investigating the attached bug.
Fixes potential race condition between onServiceDisconnected and
mScreenshotTimeout both calling notifyScreenshotError.

If onServiceDisconnected is going to show an error to the user, I think
it should also unbind, as we would expect the user to re-take the shot
at that point.  Ideally, this would replace the timeout handler entirely.

Not exactly sure how to test this - I tried crashing the
TakeScreenshotService locally, but onServiceDisconnected didn't trigger.

Bug: 28982719
Change-Id: I5093c61735b0661f9874c686e197cd894c3ef7ae
parent edaaef30
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment