Commit d14e8173 authored by Min Qin's avatar Min Qin Committed by Commit Bot

Speculative fix to service not calling startForeground before shutdown

Calling stopForeground should reset the fgRequired bit. Hopefully this fixes
the crash, which checks whether that big is true when calling stopSelf()

BUG=826998

Change-Id: Ib2dee1c5d87f406d4755b924c755697588010658
Reviewed-on: https://chromium-review.googlesource.com/1125080Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572335}
parent b343bad7
...@@ -354,6 +354,8 @@ public class MediaNotificationManager { ...@@ -354,6 +354,8 @@ public class MediaNotificationManager {
@VisibleForTesting @VisibleForTesting
void stopListenerService() { void stopListenerService() {
// Call stopForeground to guarantee Android unset the foreground bit.
stopForeground(true /* removeNotification */);
stopSelf(); stopSelf();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment