diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-03-23 22:53:46 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-03-23 22:53:46 +0000 |
commit | e7efc1b20e644ff622b8f9f042afa34b2a4452ad (patch) | |
tree | bed6a2647f9356e356bb64f48f9819b9aaff3f3b /service | |
parent | a7de2b43f64463282a07dfa9377e8292e4491d86 (diff) | |
parent | 6a5a04fa4fcd71b1448cc6499599b8935f246b6a (diff) |
Merge "hotspot2: use android.graphics.drawable.Icon for Passpoint icon data"
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/hotspot2/PasspointManager.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointManager.java b/service/java/com/android/server/wifi/hotspot2/PasspointManager.java index 0e4620673..f472d86db 100644 --- a/service/java/com/android/server/wifi/hotspot2/PasspointManager.java +++ b/service/java/com/android/server/wifi/hotspot2/PasspointManager.java @@ -22,13 +22,14 @@ import static android.net.wifi.WifiManager.ACTION_PASSPOINT_SUBSCRIPTION_REMEDIA import static android.net.wifi.WifiManager.EXTRA_BSSID_LONG; import static android.net.wifi.WifiManager.EXTRA_DELAY; import static android.net.wifi.WifiManager.EXTRA_ESS; -import static android.net.wifi.WifiManager.EXTRA_ICON_INFO; +import static android.net.wifi.WifiManager.EXTRA_FILENAME; +import static android.net.wifi.WifiManager.EXTRA_ICON; import static android.net.wifi.WifiManager.EXTRA_SUBSCRIPTION_REMEDIATION_METHOD; import static android.net.wifi.WifiManager.EXTRA_URL; import android.content.Context; import android.content.Intent; -import android.net.wifi.IconInfo; +import android.graphics.drawable.Icon; import android.net.wifi.ScanResult; import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiEnterpriseConfig; @@ -123,7 +124,10 @@ public class PasspointManager { Intent intent = new Intent(ACTION_PASSPOINT_ICON); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); intent.putExtra(EXTRA_BSSID_LONG, bssid); - intent.putExtra(EXTRA_ICON_INFO, new IconInfo(fileName, data)); + intent.putExtra(EXTRA_FILENAME, fileName); + if (data != null) { + intent.putExtra(EXTRA_ICON, Icon.createWithData(data, 0, data.length)); + } mContext.sendBroadcastAsUser(intent, UserHandle.ALL, android.Manifest.permission.ACCESS_WIFI_STATE); } |