Consolidate all wrappers used for testing.
- Add the wrapper package and move all wrappers to the wrapper package. - Get rid of some wrapper interface/impl implementation and have a wrapper class directly. Bug: 65634579 Test: make RunSettingsRoboTests Change-Id: Ic757d8f7bacfa7a034c7e692205bc1dc4b0e1de1
This commit is contained in:
23
src/com/android/settings/wrapper/WifiManagerWrapper.java
Normal file
23
src/com/android/settings/wrapper/WifiManagerWrapper.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package com.android.settings.wrapper;
|
||||
|
||||
import android.net.wifi.WifiManager;
|
||||
|
||||
/**
|
||||
* Wrapper around {@link WifiManager} to facilitate unit testing.
|
||||
*
|
||||
* TODO: delete this class once robolectric supports Android O
|
||||
*/
|
||||
public class WifiManagerWrapper {
|
||||
private final WifiManager mWifiManager;
|
||||
|
||||
public WifiManagerWrapper(WifiManager wifiManager) {
|
||||
mWifiManager = wifiManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link WifiManager#getCurrentNetworkWpsNfcConfigurationToken}
|
||||
*/
|
||||
public String getCurrentNetworkWpsNfcConfigurationToken() {
|
||||
return mWifiManager.getCurrentNetworkWpsNfcConfigurationToken();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user