android_packages_modules_Co.../staticlibs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lorenzo Colitti 0e9e646d5b Make NetworkFactory a single-use object.
Currently, when bluetooth tethering is disabled, the bluetooth
process crashes because unregister() calls setScoreFilter() and
immediately nulls out mProvider. This crashes as soon as the
message posted by setScoreFilter() dereferences mProvider from
the handler thread.

This sort of teardown problem is very difficult to fix given
NetworkFactory's threading model where some code runs on the
handler thread and some code runs on whatever thread calls it.
Instead of complicating the code to do this, simply make it
impossible to call register() after having called unregister().
The only factory that does so today is bluetooth tethering, and
that can be trivially modified to create and register a new
factory instead.

This CL renames the unregister() method to terminate() in order
to make it clear that the object cannot be reused, and also to
ensure that no other code in the tree is unexpectedly calling
unregister().

Bug: 148635501
Test: atest FrameworksNetTests
Change-Id: Icf4c7a957e46e4ba017c0a5984e5c42a75b36ecd
Merged-In: Icf4c7a957e46e4ba017c0a5984e5c42a75b36ecd
2020-03-17 01:39:56 +09:00
..
src_frameworkcommon/android/net/util Merge "Add IpRange utility to convert IP ranges to IpPrefix" 2020-02-04 22:49:50 +00:00
src_servicescommon/android/net Make NetworkFactory a single-use object. 2020-03-17 01:39:56 +09:00
tests/unit Merge "Add IpRange utility to convert IP ranges to IpPrefix" 2020-02-04 22:49:50 +00:00
Android.bp Merge "Statically link DnsSdTxtRecord into framework-wifi" 2020-01-22 06:23:25 +00:00
jarjar-rules-shared.txt Build module common libs as system_current 2020-01-21 10:41:14 +09:00