Enable FLAG_RECEIVER_FOREGROUND for notification taps on Android N too |
||
Issue descriptionThis flag ensures that the broadcast receiver for notification taps gets foreground priority upon receiving the broadcast intent, which should help with reports of Chrome being slow to open upon web notification clicks. We set the flag in NotificationPlatformBridge.java in the makePendingIntent method, here: https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java?l=343 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); } We ended up only setting the flag on Android O to reduce risk when merging the fix after branch point to M63 - see Issue 764437 . Now that the flag has been enabled for a while in stable with no issues observed, let's enable it on Android N too. See discussion on Issue 764437 and internal bug b/67675286 for more context.
,
Mar 20 2018
,
Mar 22 2018
Looking at the JobStartDelay stats, O is currently much healthier than N - which is somewhat expected since O devices will probably be newer and faster, and there's a much smaller userbase, but such a big difference strongly suggests the flag is indeed having a big effect: Android O - ~99% of notifications have a delay of <500ms https://uma.googleplex.com/p/chrome/histograms/?endDate=20180320&dayCount=1&histograms=Notifications.Android.JobStartDelay&fixupData=true&showMax=true&filters=platform%2Ceq%2CA%2Cchannel%2Ceq%2C4%2Cosflavor%2Ceq%2CAndroid_N%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial vs Android N - 15% of notifications on N have a delay of >3 min. https://uma.googleplex.com/p/chrome/histograms/?endDate=20180320&dayCount=1&histograms=Notifications.Android.JobStartDelay&fixupData=true&showMax=true&filters=platform%2Ceq%2CA%2Cchannel%2Ceq%2C4%2Cosflavor%2Ceq%2CAndroid_O%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial we should see if we can cherry-pick r968872 to M66 if Canary stats shows that the delay decreases with the change Rayan made to enable the flag on N too. Rayan can you go to go/chromium-dash and see which Canary build your change made it into?
,
Mar 23 2018
* non-broken link to fix CL: https://chromium-review.googlesource.com/c/chromium/src/+/968872
,
Mar 26 2018
There distribution of the notification delay is very similar on Android N * pre-fix: https://uma.googleplex.com/p/chrome/histograms/?endDate=20180317&dayCount=1&histograms=Notifications.Android.JobStartDelay&fixupData=true&showMax=true&filters=platform%2Ceq%2CA%2Cchannel%2Ceq%2C2%2Cosflavor%2Ceq%2CAndroid_N%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial * post-fix: https://uma.googleplex.com/p/chrome/histograms/?endDate=20180324&dayCount=1&histograms=Notifications.Android.JobStartDelay&fixupData=true&showMax=true&filters=platform%2Ceq%2CA%2Csimple_version%2Ceq%2C67.0.3378.0%2Cosflavor%2Ceq%2CAndroid_N%2Cchannel%2Ceq%2C2%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial It doesn't seem worth cherry-picking to me |
||
►
Sign in to add a comment |
||
Comment 1 by awdf@chromium.org
, Mar 19 2018Status: Assigned (was: Available)