summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Etan Cohen <etancohen@google.com> 2019-01-19 17:39:41 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-01-19 17:39:41 +0000
commit0d2740ca697b441f5a37713e3b9e2630f0c9aac3 (patch)
treed5e5b341dfd52a208e68a426decb680cdeb9288c
parent62cb5ce251c1702719d0cbf737efbac29499bb5b (diff)
parenta914a2ef0b610b6eca6bb33c8b48c1e9bc4a5f87 (diff)
Merge "[WIFI] Open up the getRandomizedMacAddress API"
-rw-r--r--api/current.txt1
-rw-r--r--wifi/java/android/net/wifi/WifiConfiguration.java5
2 files changed, 5 insertions, 1 deletions
diff --git a/api/current.txt b/api/current.txt
index 93e70b0d1ff5..07614caa4699 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -29743,6 +29743,7 @@ package android.net.wifi {
ctor public WifiConfiguration();
method public int describeContents();
method public android.net.ProxyInfo getHttpProxy();
+ method public android.net.MacAddress getRandomizedMacAddress();
method public boolean isPasspoint();
method public void setHttpProxy(android.net.ProxyInfo);
method public void writeToParcel(android.os.Parcel, int);
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index e019f282cd33..d2d711f10944 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -955,9 +955,12 @@ public class WifiConfiguration implements Parcelable {
}
/**
- * @hide
* Returns MAC address set to be the local randomized MAC address.
* Does not guarantee that the returned address is valid for use.
+ * <p>
+ * Information is restricted to Device Owner, Profile Owner, and Carrier apps
+ * (which will only obtain addresses for configurations which they create). Other callers
+ * will receive a default "02:00:00:00:00:00" MAC address.
*/
public @NonNull MacAddress getRandomizedMacAddress() {
return mRandomizedMacAddress;