From 21c151489135e892d78ed34389fa43b3907d523a Mon Sep 17 00:00:00 2001 From: Peter Qiu Date: Mon, 14 Nov 2016 15:05:22 -0800 Subject: [PATCH] osu: remove calls to deprecated APIs The hidden APIs WifiManager#addPasspointManagmentObject and WifiManager#addPasspointManagementObject will removed, so remove all callsites. The OSU app is still under developement and is not included in any device builds. However, it is being built by the Treehugger for generic AOSP builds. So fix it to allow the API removal CLs to be submitted. Bug: 32509661 Test: None Change-Id: Ic405695ee8edfd0c08b831834797f163fe445595 --- .../Osu/src/com/android/hotspot2/flow/PlatformAdapter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/Osu/src/com/android/hotspot2/flow/PlatformAdapter.java b/packages/Osu/src/com/android/hotspot2/flow/PlatformAdapter.java index 43cc1d6bfe39b..d95af61a27c1e 100644 --- a/packages/Osu/src/com/android/hotspot2/flow/PlatformAdapter.java +++ b/packages/Osu/src/com/android/hotspot2/flow/PlatformAdapter.java @@ -530,7 +530,8 @@ public class PlatformAdapter { private int addSP(String xml) throws IOException, SAXException { WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); - return wifiManager.addPasspointManagementObject(xml); + // TODO(b/32883320): use the new API for adding Passpoint configuration. + return 0; } private int modifySP(HomeSP homeSP, Collection mods) throws IOException { @@ -540,7 +541,8 @@ public class PlatformAdapter { defMods.add(new PasspointManagementObjectDefinition(mod.getBaseURI(), mod.getURN(), mod.getMOTree().toXml())); } - return wifiManager.modifyPasspointManagementObject(homeSP.getFQDN(), defMods); + // TODO(b/32883320): use the new API to update Passpoint configuration. + return 0; } private void reconnect(Network osuNetwork, int newNwkId) {