Add FLAG_RECEIVER_FOREGROUND to secret code broadcasts.
This flag should ensure that apps can process the broadcast more quickly; given that dialer codes are dispatched directly in response to a user entering them in the Dialer app, it makes sense to process these as foreground activity. These broadcasts are only sent in response to (rare) user action, so there should be no major system health impact here. The primary risk is if a dialer code broadcast receiver takes too long, it is more likely to time out and be killed before completing processing. Many receivers just immediately launch an activity which is fine; for receivers which do asynchronous work, it may be necessary to defer this work to a Service. Bug: 64391957 Test: Successfully executed a few dialer codes on device Change-Id: I8a9d3947b3552de26550b62dcb6e0f25a753013b
Loading
Please register or sign in to comment