Fix potential race bug where notification may persist after job finish.
The job's OnFinished callback occurs on a separate thread from the
JobWatcher. It's hypothetically possible that OnFinished is called
after the JobWatcher checks isFinished but before it calls notify().
The onFinished call's actions cancel the notification, but JobWatcher
could then reinstate it as a non-foreground notification.
Bug: 64974697
Test: docsui unit tests
Change-Id: Id5b9e4ae6ca31b560c243022283ea7be211ece98
1 file changed