Ensure nri is satisfied before returning.
When a network preference is set, the highest priority nri will be a managed default request that disallows default networking. In the case where there is no satisfying network, mNoServiceNetwork is used as the satisfier instead of null. (see computeNetworkReassignment) mNoServiceNetwork should not be returned in any public API. Check for the nri being satisfied before returning the satisfier to ensure mNoServiceNetwork is not returned. Fixes: 301222648 Test: atest FrameworksNetTests Change-Id: I22d67a7e8d0274d8ad4f6123fbedf6d37eed18e7
This commit is contained in:
parent
48c14686a3
commit
ed972a6fd2
1 changed files with 5 additions and 6 deletions
|
|
@ -8021,6 +8021,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!highestPriorityNri.isBeingSatisfied()) return null;
|
||||
return highestPriorityNri.getSatisfier();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue