Do not print misleading debug messages in some scenarios.
When the mobile network is not active, querying the network information might trigger the misleading debug messages. Added some condition checks to prevent this. bug: 30850733 Change-Id: Ice6d548a56f98bac7fe2ca6a06148350b505533d
This commit is contained in:
parent
6ba04e354e
commit
05cca1a4cb
1 changed files with 5 additions and 1 deletions
|
|
@ -175,7 +175,11 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> {
|
|||
|
||||
if (isNetworkTypeMobile(type)) {
|
||||
if (state.subscriberId == null) {
|
||||
Slog.w(TAG, "Active mobile network without subscriber!");
|
||||
if (state.networkInfo.getState() != NetworkInfo.State.DISCONNECTED &&
|
||||
state.networkInfo.getState() != NetworkInfo.State.UNKNOWN) {
|
||||
Slog.w(TAG, "Active mobile network without subscriber! ni = "
|
||||
+ state.networkInfo);
|
||||
}
|
||||
}
|
||||
|
||||
subscriberId = state.subscriberId;
|
||||
|
|
|
|||
Loading…
Reference in a new issue