Add DO API to get wifi mac address
Bug 25496044 Change-Id: Ib1f0ce4ca10951edcfaa0aa79ae5c2d142a74599
This commit is contained in:
@@ -4649,4 +4649,21 @@ public class DevicePolicyManager {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by device owner to get the MAC address of the Wi-Fi device.
|
||||
*
|
||||
* @return the MAC address of the Wi-Fi device, or null when the information is not
|
||||
* available. (For example, Wi-Fi hasn't been enabled, or the device doesn't support Wi-Fi.)
|
||||
*
|
||||
* <p>The address will be in the {@code XX:XX:XX:XX:XX:XX} format.
|
||||
*/
|
||||
public String getWifiMacAddress() {
|
||||
try {
|
||||
return mService.getWifiMacAddress();
|
||||
} catch (RemoteException re) {
|
||||
Log.w(TAG, "Failed talking with device policy service", re);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,4 +236,5 @@ interface IDevicePolicyManager {
|
||||
List<String> getKeepUninstalledPackages(in ComponentName admin);
|
||||
boolean isManagedProfile(in ComponentName admin);
|
||||
boolean isSystemOnlyUser(in ComponentName admin);
|
||||
String getWifiMacAddress();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user