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

Skip to content
Commit 2bb35ff3 authored by Jason Huang's avatar Jason Huang
Browse files

network: fix binder object leakage in settings

Summary:
When BT ON and enter into NetworkDashboardFragment, and turning BT OFF and exiting the fragment, the `BluetoothAdapter.closeProfileProxy(BluetoothProfile.PAN)` will not be called.
This causes binder leakage on next time the NetworkDashboardFragment is entered, until killing Settings process.

Reproduce Steps:
1. Turn BT ON
2. Open Settings process
3. Enter "Network & internet" (NetworkDashboardFragment)
4. Turn BT OFF
5. Back to previous page (do not kill Settings process)
* Repeat Step 3-5

Solution:
Do not set value of `mBluetoothPan` to null when `onServiceDisconnected` raised, to ensure the binder object (profile proxy) be closed in lifecycle `onDestroy()`.

Bug: 243128377
Test: enter "Network & internet" page, turn off BT and leave the page
Change-Id: Ieca3e5401c23d1b0ffece1bbb0db96988044262d
parent 2af83663
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment