[NS01.5] Fix an embarrassing bug

The existing implementations override the function with the
int, so the default impl of the function with the int has
to call the new one, not the other way around. Otherwise,
when implementations are migrated to overriding the new one
the old code continues to call the function with the int
and that wouldn't work as expected if it didn't call the
newly overridden method.

Test: TH
Change-Id: Ic31cec6481781e0185a0ba150be52390597737e7
This commit is contained in:
Chalard Jean 2021-01-13 16:01:06 +09:00
commit 5b76d8d7dc

View file

@ -366,12 +366,12 @@ public class NetworkFactory extends Handler {
/** @deprecated none of the implementors use the score : migrate them */
@Deprecated
protected void needNetworkFor(NetworkRequest networkRequest, int score) {
if (++mRefCount == 1) startNetwork();
needNetworkFor(networkRequest);
}
// override to do fancier stuff
protected void needNetworkFor(NetworkRequest networkRequest) {
needNetworkFor(networkRequest, 0);
if (++mRefCount == 1) startNetwork();
}
protected void releaseNetworkFor(NetworkRequest networkRequest) {