Create Espresso test for WifiSettings.

This method was being stripped by proguard and hence the tests could not
run.

Bug: b/36403696
Test:  runtest --path
packages/apps/Settings/tests/app/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: I30b26e960a876c0c024154bee809c0ab6e988e39
diff --git a/packages/SettingsLib/Android.mk b/packages/SettingsLib/Android.mk
index 67ef40a..1ad4fea 100644
--- a/packages/SettingsLib/Android.mk
+++ b/packages/SettingsLib/Android.mk
@@ -6,6 +6,7 @@
 LOCAL_MODULE := SettingsLib
 
 LOCAL_SHARED_ANDROID_LIBRARIES := \
+    android-support-annotations \
     android-support-v4 \
     android-support-v7-recyclerview \
     android-support-v7-preference \
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTrackerFactory.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTrackerFactory.java
index d3bdeb7..ab7c6d2 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTrackerFactory.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTrackerFactory.java
@@ -17,6 +17,7 @@
 
 import android.content.Context;
 import android.os.Looper;
+import android.support.annotation.Keep;
 
 /**
  * Factory method used to inject WifiTracker instances.
@@ -26,14 +27,7 @@
 
     private static WifiTracker sTestingWifiTracker;
 
-    public static void enableTestingMode() {
-        sTestingMode = true;
-    }
-
-    public static void disableTestingMode() {
-        sTestingMode = false;
-    }
-
+    @Keep
     public static void setTestingWifiTracker(WifiTracker tracker) {
         sTestingWifiTracker = tracker;
     }