Commit 80d675cb authored by Rayan Kanso's avatar Rayan Kanso Committed by Commit Bot

[Android Notifications] Enable FLAG_RECEIVER_FOREGROUND for N+

The flag ensures that the broadcast receiver for notification taps
gets foreground priority upon receiving the broadcast intent.

Bug: 868654
Change-Id: Ie45d039a3f0fb74fd40d467828ba2d7bf3e993ee
Reviewed-on: https://chromium-review.googlesource.com/968872Reviewed-by: default avatarAnita Woodruff <awdf@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544334}
parent 02bd1f2a
......@@ -339,7 +339,7 @@ public class NotificationPlatformBridge {
// This flag ensures the broadcast is delivered with foreground priority. It also means the
// receiver gets a shorter timeout interval before it may be killed, but this is ok because
// we schedule a job to handle the intent in NotificationService.Receiver on N+.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
}
......
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