summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Antony Sargent <asargent@google.com> 2017-07-26 11:02:16 +0000
committer android-build-merger <android-build-merger@google.com> 2017-07-26 11:02:16 +0000
commit9975186ae59218ce3b9d00a104c9f6da0905a48e (patch)
treef6423e304ac129296f8e77d453929ac63c93f064
parent059137469b1958b67ff9d4748a1ba72c923527af (diff)
parent1e74fdb6842be9a1202dc1657cccf42381580489 (diff)
Merge "@Keep all the things in TestAccessPointBuilder" into oc-dr1-dev
am: 1e74fdb684 Change-Id: I0ccabd7441257ae1631ad8b362b64be37cf1a386
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java b/packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java
index 4307cb0f1b7b..3413f249cf0c 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java
@@ -22,6 +22,7 @@ import android.net.NetworkInfo;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
import android.os.Bundle;
+import android.support.annotation.Keep;
/**
* Build and return a valid AccessPoint.
@@ -30,6 +31,7 @@ import android.os.Bundle;
* applications. AccessPoints were designed to only be populated by the mechanisms of scan results
* and wifi configurations.
*/
+@Keep
public class TestAccessPointBuilder {
// match the private values in WifiManager
private static final int MIN_RSSI = -100;
@@ -49,10 +51,12 @@ public class TestAccessPointBuilder {
Context mContext;
+ @Keep
public TestAccessPointBuilder(Context context) {
mContext = context;
}
+ @Keep
public AccessPoint build() {
Bundle bundle = new Bundle();
@@ -77,6 +81,7 @@ public class TestAccessPointBuilder {
return ap;
}
+ @Keep
public TestAccessPointBuilder setActive(boolean active) {
if (active) {
mNetworkInfo = new NetworkInfo(
@@ -96,6 +101,7 @@ public class TestAccessPointBuilder {
* <p>Side effect: if this AccessPoint was previously unreachable,
* setting the level will also make it reachable.
*/
+ @Keep
public TestAccessPointBuilder setLevel(int level) {
// Reversal of WifiManager.calculateSignalLevels
if (level == 0) {
@@ -110,11 +116,13 @@ public class TestAccessPointBuilder {
return this;
}
+ @Keep
public TestAccessPointBuilder setNetworkInfo(NetworkInfo info) {
mNetworkInfo = info;
return this;
}
+ @Keep
public TestAccessPointBuilder setRssi(int rssi) {
mRssi = rssi;
return this;
@@ -125,6 +133,7 @@ public class TestAccessPointBuilder {
* Side effect: if the signal level was not previously set,
* making an AccessPoint reachable will set the signal to the minimum level.
*/
+ @Keep
public TestAccessPointBuilder setReachable(boolean reachable) {
if (reachable) {
// only override the mRssi if it hasn't been set yet
@@ -137,6 +146,7 @@ public class TestAccessPointBuilder {
return this;
}
+ @Keep
public TestAccessPointBuilder setSaved(boolean saved){
if (saved) {
mNetworkId = 1;
@@ -146,26 +156,31 @@ public class TestAccessPointBuilder {
return this;
}
+ @Keep
public TestAccessPointBuilder setSecurity(int security) {
mSecurity = security;
return this;
}
+ @Keep
public TestAccessPointBuilder setSsid(String newSsid) {
ssid = newSsid;
return this;
}
+ @Keep
public TestAccessPointBuilder setFqdn(String fqdn) {
mFqdn = fqdn;
return this;
}
+ @Keep
public TestAccessPointBuilder setProviderFriendlyName(String friendlyName) {
mProviderFriendlyName = friendlyName;
return this;
}
+ @Keep
public TestAccessPointBuilder setWifiInfo(WifiInfo info) {
mWifiInfo = info;
return this;
@@ -177,6 +192,7 @@ public class TestAccessPointBuilder {
* <p>Setting this to a value other than {@link WifiConfiguration#INVALID_NETWORK_ID} makes this
* AccessPoint a saved network.
*/
+ @Keep
public TestAccessPointBuilder setNetworkId(int networkId) {
mNetworkId = networkId;
return this;