Only filter the app-added networks if
the total number of networks is greater
than the app-added limit.

Note that numAppAddedNetworks <= numNetworks.
As long as the total number of networks is
less than the app-added limit, we are guaranteed
to not have any excess app-added networks.

In the worst case, all networks are app-added.

See the following table as an example.
Note that NW = networks and AA = app-added.

Total NW | AA NW | AA Limit | Excess AA NW
------------------------------------------
   100   |  50   |   100    |     0
   100   |  100  |   100    |     0
   101   |  100  |   100    |     0
   101   |  101  |   100    |     1

Bug: 289327814
Test: atest WifiConfigManagerTest
Change-Id: I2851249f90e3403e887deac13ff32e623ab75a75
1 file changed