Skip to content
Commit 6f260f36 authored by Hugo Benichi's avatar Hugo Benichi
Browse files

ConnectivityManager: fix potential NPE

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
parent ed6d75d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment