Stop using PerUidCounter#transact
PerUidCounter#transact is used to adjust the request counter for
the per-app API flows. Directly adjusting the counter is not
ideal however in the per-app flows, the nris can't be removed
until they are used to create the new nris upon set.
In fact, satisfiers are the info that new nris need reference.
Without satisfiers in new nris, the avaiable callbacks would be
sent to listeners agin when assign new satisfiers. Even the new
best networks are same as previous satisfiers, but the new nris
have lost those info if calling handleRemoveNetworkRequests()
before createPerAppCallbackRequestsToRegister().
However, removing satisfiers from nris is not necessary actually
because the CS will update the best network to nri when compute
network reassignment. It doesn't need to be cleared when
calling handleRemoveNetworkRequest(). Thus, keep that info and
adjust the sequence to remove nri first. The counter is still
correct and doesn't hit limit artificially.
Bug: 201648050
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I4cbc953def7866b23c2b8ebc8deaadf0ffc3b75d
1 file changed