From 330a7ccd895b4047323d4b633e36489daf1f8f4c Mon Sep 17 00:00:00 2001 From: Michael Plass Date: Fri, 17 Jan 2020 16:56:49 -0800 Subject: Remove WifiScoreCard entries when forgetting a network Bug: 146460486 Test: atest FrameworksWifiTests FrameworksWifiApiTests Test: Manual - Check that the entries for wifi networks are removed as those networks are forgotten. adb pull /data/user_de/0/com.android.networkstack/databases/IpMemoryStore.db sqlite3 IpMemoryStore.db .dump Change-Id: I2fee17aa4cfcd2afbd3e7d36937e2bf8ae4f3313 --- .../com/android/server/wifi/WifiHealthMonitorTest.java | 17 +++++++++++++++++ .../src/com/android/server/wifi/WifiScoreCardTest.java | 15 +++++++++++++++ 2 files changed, 32 insertions(+) (limited to 'tests') diff --git a/tests/wifitests/src/com/android/server/wifi/WifiHealthMonitorTest.java b/tests/wifitests/src/com/android/server/wifi/WifiHealthMonitorTest.java index 0660e5eec..4e0b5b75e 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiHealthMonitorTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiHealthMonitorTest.java @@ -332,6 +332,14 @@ public class WifiHealthMonitorTest extends WifiBaseTest { mKeys.add(key); mBlobs.add(value); } + + @Override + public void setCluster(String key, String cluster) { + } + + @Override + public void removeCluster(String cluster) { + } }); mBlobListeners.get(0).onBlobRetrieved(serialized); @@ -688,11 +696,20 @@ public class WifiHealthMonitorTest extends WifiBaseTest { public void read(String key, String name, WifiScoreCard.BlobListener listener) { mBlobListeners.add(listener); } + @Override public void write(String key, String name, byte[] value) { mKeys.add(key); mBlobs.add(value); } + + @Override + public void setCluster(String key, String cluster) { + } + + @Override + public void removeCluster(String cluster) { + } }); mBlobListeners.get(0).onBlobRetrieved(serialized); diff --git a/tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java b/tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java index e5525c4c7..1ad767c6e 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java @@ -688,6 +688,14 @@ public class WifiScoreCardTest extends WifiBaseTest { public void write(String key, String name, byte[] value) { // ignore for now } + @Override + public void setCluster(String key, String cluster) { + // ignore for now + } + @Override + public void removeCluster(String cluster) { + // ignore for now + } }); // Now make some changes @@ -724,6 +732,13 @@ public class WifiScoreCardTest extends WifiBaseTest { mKeys.add(key); mBlobs.add(value); } + @Override + public void setCluster(String key, String cluster) { + } + @Override + public void removeCluster(String cluster) { + // ignore for now + } }); // Make some changes -- cgit v1.2.3