Delay disconnect secondary check

Current check for disconnecting the secondary is too early and causes
unwanted disconnect in the following sequence:

1. primary connected
2. secondary internet connected to same SSID as primary
3. network selection chooses same network for primary again, and the
   secondary is disconnected due to the check.
4. secondary will connect again - possibly loop 3 and 4

In reality, the disconnect at step 3 is not needed since it's the same
network as the already connected one. A later check will abort the
connection attempt.

This fix moves the disconnect secondary check to a later place, after
verifying connection is actually needed.

Bug: 291880788
Test: atest com.android.server.wifi
Change-Id: If4bbe59b3a71735c7ebdc44dc7121bd48b52a313
1 file changed