Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 532b6143 authored by Paul Jensen's avatar Paul Jensen
Browse files

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
parent d8a21bbe
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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) {