summaryrefslogtreecommitdiff
path: root/core/java/android/net/ConnectivityThread.java
Commit message (Collapse)AuthorAgeFilesLines
* Move module sources to packages/ConnectivityRemi NGUYEN VAN2021-02-011-56/+0
| | | | | | | | | | | | | | Files that are planned to be part of the connectivity module are grouped in packages/Connectivity, so they can be built separately and moved in one operation with their history into packages/modules/Connectivity. This places the files in the existing framework-connectivity-sources filegroup instead of the current framework-core-sources filegroup. Both are used the same way in framework-non-updatable-sources. Bug: 171540887 Test: m Change-Id: I62d9d91574ace6f5c4624035d190260c3126b91e
* ConnectivityThread: use lazy holder idiomHugo Benichi2016-10-201-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the way that the ConnectivityThread is lazily instantiated by using the "lazy initialization holder class idiom". The first code point that tries to obtain a reference to the unique ConnectivityThread instance will trigger the creation of the Singleton class, which will guarantee a thread-safe initialization of the static INSTANCE field inside Singleton according to the language specs. This is the Item #71 of Effective Java. The unique static instance of ConnectivityThread is not stored directly inside ConnectivityThread class but is stored in a static nested class. This is to avoid triggering the creation of that unique instance when Zygote does class preloading at phone startup. Otherwise this would lead to Zygote creating a new OS thread during preloading, which is a fatal error. Test: frameworks-wifi tests pass Bug: 26749700 Bug: 28537383 Bug: 32130437 Change-Id: I4d5672a3195d3af9a0a2c85f871695257abe782b
* Create ConnectivityThreadPaul Stewart2016-03-191-0/+51
Create a common singleton thread to be shared among all connectivity tasks. Instead of launching separate threads to handle downstream messages from the various service instances used in connectivity, these managers can choose to share this instance. Bug: 27695292 Change-Id: Idd1e37a3e793c5485091509c3d7351e4d29288f0