Remove preference "Searching for Wi-Fi networks..."

When we add the preference "Searching for Wi-Fi networks...", we didn't
provide a key to the preference. As a result, each time when we get
access point update and try to show such tile, it creates a new one, and
results in multiple entries of such tile. Adding a key to the preference
will prevent the multiple entry from being added.

Test: Manual -
1. Turn wifi off and on several times, verify that there is only one entry
   of "Searching for Wi-Fi networks..." when initializing the wifi access
   point list.
2. Verifies that when the access point list is established, the
   "Searching for Wi-Fi networks..." entry is gone.

Change-Id: Iaad329d89f8e4b52129d0661501aa34fbd956692

Change-Id: I1bfa77051e068926e8c876a89adf14d143970e7e
Fixes: 31143961
(cherry picked from commit b8e8485720757bcc1c8e5e1e3c5f3f8b2d33ae03)
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index a34ccab..1116627 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -114,6 +114,8 @@
     private static final String SAVE_DIALOG_ACCESS_POINT_STATE = "wifi_ap_state";
     private static final String SAVED_WIFI_NFC_DIALOG_STATE = "wifi_nfc_dlg_state";
 
+    private static final String PREF_KEY_EMPTY_WIFI_LIST = "wifi_empty_list";
+
     protected WifiManager mWifiManager;
     private WifiManager.ActionListener mConnectListener;
     private WifiManager.ActionListener mSaveListener;
@@ -662,6 +664,7 @@
                     pref.setSelectable(false);
                     pref.setSummary(R.string.wifi_empty_list_wifi_on);
                     pref.setOrder(0);
+                    pref.setKey(PREF_KEY_EMPTY_WIFI_LIST);
                     getPreferenceScreen().addPreference(pref);
                     mAddPreference.setOrder(1);
                     getPreferenceScreen().addPreference(mAddPreference);