bc4ac9775f1337b37c2bd21313195c7f3aed742f
ConnectivityManager static sCallbackHandler is referenced and directly used in a way that is not ensuring its proper initialization. This patch fixes this potential NPE by using getHandler() instead. Also this patch changes sendRequestForNetwork's signature to only accept the subtype CallbackHandler instead of Handler: without using CallbackHandler the NetworkCallbacks are not triggered properly and bookkeeping of sCallbacks does not happen. sendRequestForNetwork's signature now makes this explicit. This step prepares the addition of overloaded versions of registerNetworkCallback and cie that takes custom Handlers. Test: build, flashed, manually checked connectivity Change-Id: I52e8a2cb5075e7aef7b35e30c9845cacba927d13
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%