Fix the logic for handling network status change

In the current design, MmsNetworkManager assume that there is
only one network will be available for mms request. It releases
the request when the network lost. But there may be multiple
networks if the carrier network supports it.

Another issue is that a suspended network should not be an
available network. When the network becomes suspended, the
target network object should be clear to allow callers to
know that there is no available network until the network
resumes.

Starting from O, onAvailable will always immediately be followed
by a onCapabilitiesChanged. The available network may also
be a suspended network. It will need to check if the coming
available network is usable or not. Thus, remove the onAvailable
callback to check the network in onCapabilitiesChanged.

Bug: 172050345
Test: atest MmsNetworkManagerTest
Test: manually send and receive mms
Change-Id: I176477263314fac8f8be8debb16958b27933fb24
2 files changed
tree: 4c86457f63f2c1fe7da15267c6d21949833397ea
  1. res/
  2. src/
  3. tests/
  4. Android.bp
  5. AndroidManifest.xml
  6. OWNERS
  7. proguard.flags