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

Commit 5de27cf7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "GATT: Fix FD leak caused by GATT profile"

parents e844b369 dd98e233
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -89,6 +89,16 @@ class AdvertiseManager {
    void cleanup() {
        logd("advertise clients cleared");
        mAdvertiseClients.clear();

        if (mHandler != null) {
            // Shut down the thread
            mHandler.removeCallbacksAndMessages(null);
            Looper looper = mHandler.getLooper();
            if (looper != null) {
                looper.quit();
            }
            mHandler = null;
        }
    }

    /**
+10 −0
Original line number Diff line number Diff line
@@ -109,6 +109,16 @@ public class ScanManager {
        mRegularScanClients.clear();
        mBatchClients.clear();
        mScanNative.cleanup();

        if (mHandler != null) {
            // Shut down the thread
            mHandler.removeCallbacksAndMessages(null);
            Looper looper = mHandler.getLooper();
            if (looper != null) {
                looper.quit();
            }
            mHandler = null;
        }
    }

    /**