summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Liu <steveliu@google.com>2019-07-29 08:37:11 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-07-29 08:37:11 -0700
commit34068104dbdc0e335e9b003e65fe36e6833195c9 (patch)
treef727cc4df87f34d083c3638f29f472b73329bb85
parent6a79bf9090e33cc1e1297c1625a920b17deded2f (diff)
parented76e4a297e80a01ace2847a2674eba501ce8d72 (diff)
Merge "notify the factory reset event to installer which have permission of NETWORK_CARRIER_PROVISIONING." into qt-r1-dev
am: ed76e4a297 Change-Id: I990cc04c576bfe94df1100218506ececff5df475
-rw-r--r--service/java/com/android/server/wifi/WifiServiceImpl.java11
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);