diff options
author | Steven Liu <steveliu@google.com> | 2019-07-22 17:14:03 -0700 |
---|---|---|
committer | Steven Liu <steveliu@google.com> | 2019-07-25 11:48:00 -0700 |
commit | e8708791ffcb4c831e936bf6df3fafd0a3df92ba (patch) | |
tree | 2e02d1e3887068a3af28ff1363ceac21ec53a436 /service | |
parent | f272b21563525d7c21735df8202a6e90e43f5b77 (diff) | |
download | android_frameworks_opt_net_wifi-e8708791ffcb4c831e936bf6df3fafd0a3df92ba.tar.gz android_frameworks_opt_net_wifi-e8708791ffcb4c831e936bf6df3fafd0a3df92ba.tar.bz2 android_frameworks_opt_net_wifi-e8708791ffcb4c831e936bf6df3fafd0a3df92ba.zip |
notify the factory reset event to installer which
have permission of NETWORK_CARRIER_PROVISIONING.
Bug: 135489675
Test: Do 'reset settings', registered app got the Intent.
Change-Id: I1522d86d00a471508dff737557d3b227bfb30897
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiServiceImpl.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java index f04755fd9..b25a84593 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -2970,9 +2970,20 @@ public class WifiServiceImpl extends BaseWifiService { mWifiNetworkSuggestionsManager.clear(); mWifiInjector.getWifiScoreCard().clear(); }); + notifyFactoryReset(); } } + /** + * Notify the Factory Reset Event to application who may installed wifi configurations. + */ + private void notifyFactoryReset() { + Intent intent = new Intent(WifiManager.WIFI_NETWORK_SETTINGS_RESET_ACTION); + intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); + mContext.sendBroadcastAsUser(intent, UserHandle.ALL, + android.Manifest.permission.NETWORK_CARRIER_PROVISIONING); + } + /* private methods */ static boolean logAndReturnFalse(String s) { Log.d(TAG, s); |