[MockModem] Fix the null sNetworkCallback object problem

Symptom: Even if beforeTest is skipped, afterTest will still run.
In afterTest, the method unregisterNetworkCallback() is called,
which might throw an exception if sNetworkCallback was never registered
(because the beforetest logic was skipped).

- add the null check for sNetworkCallback

Bug: 297027180
Bug: 296660850
Test: Build Pass
Change-Id: I7494eedcc7abc1a56bbae9f68f45f3fd436ed4b9
1 file changed