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

Skip to content
Commit 7876a18e authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Don't reuse NetworkFactory objects.

Currently, the bluetooth tethering code calls unregister() on its
NetworkFactory, and then expects to be able to reuse it later.
This is currently causing a crash when disabling bluetooth
tethering and in general is unsafe given NetworkFactory's design.
As a result, NetworkFactory is being turned into a one-time
object that cannot be reused.

This CL creates a new NetworkFactory every time the PAN profile
connects, instead of re-using the NetworkFactory created during
start(). Instead of determining whether start() has been called
by looking at whether mNetworkFactory is null, introduce an
mStarted boolean that is true iff start() has been called

Test: None
Fix: 148635501
Change-Id: I9b20d77ccc0d46fd3f1f52a63bee502d3f6e7a1e
parent f247ab8e
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