diff options
author | Paul Jensen <pauljensen@google.com> | 2014-11-10 09:50:02 -0500 |
---|---|---|
committer | Paul Jensen <pauljensen@google.com> | 2014-11-10 09:50:02 -0500 |
commit | 532b6143f6369224b0c220bad08ae48a979b5adf (patch) | |
tree | 9e9d52deb0d3999b32e4dc495a8189656960edd1 /services/core/java/com/android/server/connectivity/NetworkMonitor.java | |
parent | d8a21bbedbaeb752b7f458823ed709b9a01c14c1 (diff) | |
download | frameworks_base-532b6143f6369224b0c220bad08ae48a979b5adf.zip frameworks_base-532b6143f6369224b0c220bad08ae48a979b5adf.tar.gz frameworks_base-532b6143f6369224b0c220bad08ae48a979b5adf.tar.bz2 |
Fix NetworkMonitor logging to include NetID.
This was broken when NetID selection was moved to after
NetworkAgentInfo construction time. NetworkMonitor inherits
from StateMachine whose log tag is immutable after construction
making it impossible to include the NetID. Instead define a
simple log function in NetworkMonitor that includes correct
NetID. This makes debugging via logs much easier and avoids
ambiguities that can make logs useless.
Change-Id: Ie72fc210b92bd425184d288b35ed476669e2e073
Diffstat (limited to 'services/core/java/com/android/server/connectivity/NetworkMonitor.java')
-rw-r--r-- | services/core/java/com/android/server/connectivity/NetworkMonitor.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java index fb98236..593a28a 100644 --- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java +++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java @@ -46,6 +46,7 @@ import android.telephony.CellInfoGsm; import android.telephony.CellInfoLte; import android.telephony.CellInfoWcdma; import android.telephony.TelephonyManager; +import android.util.Log; import com.android.internal.util.Protocol; import com.android.internal.util.State; @@ -272,6 +273,11 @@ public class NetworkMonitor extends StateMachine { start(); } + @Override + protected void log(String s) { + Log.d(TAG + mNetworkAgentInfo.name(), s); + } + private class DefaultState extends State { @Override public boolean processMessage(Message message) { |