From 0e1bf3ac4636fd062a3ce1fbabcd4338abeb3fc0 Mon Sep 17 00:00:00 2001 From: Paul DeMarco Date: Mon, 20 Apr 2020 11:37:17 -0400 Subject: [PATCH] [android] Clear scan results list on startScan. --- .../java/com/pauldemarco/flutter_blue/FlutterBluePlugin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/java/com/pauldemarco/flutter_blue/FlutterBluePlugin.java b/android/src/main/java/com/pauldemarco/flutter_blue/FlutterBluePlugin.java index 12a6185a..b4563589 100644 --- a/android/src/main/java/com/pauldemarco/flutter_blue/FlutterBluePlugin.java +++ b/android/src/main/java/com/pauldemarco/flutter_blue/FlutterBluePlugin.java @@ -744,6 +744,7 @@ private void startScan(MethodCall call, Result result) { try { settings = Protos.ScanSettings.newBuilder().mergeFrom(data).build(); allowDuplicates = settings.getAllowDuplicates(); + macDeviceScanned.clear(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { startScan21(settings); } else {