Commit f934e7b3 authored by Xing Liu's avatar Xing Liu Committed by Commit Bot

Revert "Download notification: Fix a crash that startForeground is not called."

This reverts commit 1be8a3ba.

Reason for revert: Still crash.

Original change's description:
> Download notification: Fix a crash that startForeground is not called.
>
> If stopForeground is called between startForegroundService and
> startForeground. startForeground will not be called since we clear the
> cached service object. This will lead to a crash on O_MR1+.
>
> Android can reuse the service binder object when this happens.
>
> Bug: 1121096
> Change-Id: Ic4088af174ca9561714442b29c2e6162995ddc51
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2429635
> Reviewed-by: David Trainor <dtrainor@chromium.org>
> Commit-Queue: Xing Liu <xingliu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#810857}

TBR=dtrainor@chromium.org,qinmin@chromium.org,xingliu@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1121096
Change-Id: I59ae44f21cbb0ae41f01d698c7c1faddccd2156c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2436784
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: default avatarXing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811601}
parent 407d5cfd
...@@ -276,6 +276,7 @@ public class DownloadForegroundServiceManager { ...@@ -276,6 +276,7 @@ public class DownloadForegroundServiceManager {
stopAndUnbindServiceInternal( stopAndUnbindServiceInternal(
stopForegroundNotification, mPinnedNotificationId, oldNotification); stopForegroundNotification, mPinnedNotificationId, oldNotification);
mBoundService = null;
mPinnedNotificationId = INVALID_NOTIFICATION_ID; mPinnedNotificationId = INVALID_NOTIFICATION_ID;
} }
......
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