Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd1ee3d4 authored by Wei Wang's avatar Wei Wang
Browse files

Fix Bluetooth crash when all filters are used.

Bug:18963121

Change-Id: Ia69ad697d5be5b0a5e076f33e513aa2698a7468c
parent a7e922a3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -441,7 +441,8 @@ public class ScanManager {
        }

        void startRegularScan(ScanClient client) {
            if (mFilterIndexStack.isEmpty() && isFilteringSupported()) {
            if (isFilteringSupported() && mFilterIndexStack.isEmpty() &&
                    mClientFilterIndexMap.isEmpty()) {
                initFilterIndexStack();
            }
            if (isFilteringSupported()) {
@@ -748,7 +749,7 @@ public class ScanManager {
            if (client.filters == null || client.filters.isEmpty()) {
                return true;
            }
            return client.filters.size() < mClientFilterIndexMap.size();
            return client.filters.size() > mFilterIndexStack.size();
        }

        private void addFilterToController(int clientIf, ScanFilterQueue.Entry entry,