WifiNetworkSuggestionsManager: Add a dialog for first user approval
If a new app adds suggestions and the app is in foreground, pop up an
alert dialog for asking the user for approval. If the approval dialog
is dismissed for some reason, we will fall back
to showing the notification when one of the networks is in range (i.e
current behavior).
Also,
a) fix a concurrency issues with the existing broadcast receiver
(this class is not thread safe, so the receiver should run in the same
thread).
b) Refactored unit tests to use mock notification/notification.builder
similar to the new alert dialog tests.
Bug: 150433597
Test: Manual verification
Test: atest com.android.server.wifi
Change-Id: Ia158c27df889284d343c6f81e168cbab96528301
2 files changed