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

Commit 5317b3e8 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android Git Automerger
Browse files

am 987d6a1e: Merge "Revert "DO NOT MERGE Add logging to detect the start of a...

am 987d6a1e: Merge "Revert "DO NOT MERGE Add logging to detect the start of a sync problem."" into mnc-dev

* commit '987d6a1e':
  Revert "DO NOT MERGE Add logging to detect the start of a sync problem."
parents f48ea02c 987d6a1e
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -454,12 +454,6 @@ public class PhoneFactory {
        }
    }

    public static LocalLog getLocalLog(String key) {
        synchronized (sLocalLogs) {
            return sLocalLogs.get(key);
        }
    }

    public static void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("PhoneFactory:");
        PhoneProxy [] phones = (PhoneProxy[])PhoneFactory.getPhones();
+2 −26
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ public class ApnContext {
        }
    }

    public void incRefCount(LocalLog log, int serialNum) {
    public void incRefCount(LocalLog log) {
        synchronized (mRefCountLock) {
            if (mRefCount == 0) {
               // we wanted to leave the last in so it could actually capture the tear down
@@ -302,11 +302,10 @@ public class ApnContext {
            if (mRefCount++ == 0) {
                mDcTracker.setEnabled(mDcTracker.apnTypeToId(mApnType), true);
            }
            DctController.getInstance().ackNetworkExecution(serialNum);
        }
    }

    public void decRefCount(LocalLog log, int serialNum) {
    public void decRefCount(LocalLog log) {
        synchronized (mRefCountLock) {
            // leave the last log alive to capture the actual tear down
            if (mRefCount != 1) {
@@ -321,29 +320,6 @@ public class ApnContext {
            if (mRefCount-- == 1) {
                mDcTracker.setEnabled(mDcTracker.apnTypeToId(mApnType), false);
            }
            DctController.getInstance().ackNetworkExecution(serialNum);
        }
    }

    public void clearRefCount() {
        synchronized (mRefCountLock) {
            for (LocalLog l : mLocalLogs) l.log("ApnContext.clearRefCount from " + mRefCount);
            mLocalLogs.clear();
            mRefCount = 0;
            mDcTracker.setEnabled(mDcTracker.apnTypeToId(mApnType), false);
        }
    }

    int getRefCount() {
        return mRefCount;
    }

    void copyLogTo(LocalLog other) {
        synchronized (mRefCountLock) {
            for (LocalLog l : mLocalLogs) {
                other.log("-----");
                l.copyTo(other, 30);
            }
        }
    }

+0 −1
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ public class DcSwitchAsyncChannel extends AsyncChannel {
        final NetworkRequest request;
        final int priority;
        private final LocalLog requestLog;
        int executionSerialNumber;

        public RequestInfo(NetworkRequest request, int priority, LocalLog l) {
            this.request = request;
+6 −36
Original line number Diff line number Diff line
@@ -69,7 +69,6 @@ import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.gsm.GSMPhone;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.PhoneFactory;
import com.android.internal.telephony.RILConstants;
import com.android.internal.telephony.uicc.IccRecords;
import com.android.internal.telephony.uicc.UiccController;
@@ -254,49 +253,20 @@ public final class DcTracker extends DcTrackerBase {
    }

    @Override
    public void incApnRefCount(String name, LocalLog log, int serialNum) {
    public void incApnRefCount(String name, LocalLog log) {
        ApnContext apnContext = mApnContexts.get(name);
        log.log("DcTracker.incApnRefCount on " + name + " found " + apnContext + " (" +
                serialNum + ")");
        log.log("DcTracker.incApnRefCount on " + name + " found " + apnContext);
        if (apnContext != null) {
            apnContext.incRefCount(log, serialNum);
            apnContext.incRefCount(log);
        }

    }

    @Override
    public void decApnRefCount(String name, LocalLog log, int serialNum) {
    public void decApnRefCount(String name, LocalLog log) {
        ApnContext apnContext = mApnContexts.get(name);
        log.log("DcTracker.decApnRefCount on " + name + " found " + apnContext + " (" +
                serialNum + ")");
        log.log("DcTracker.decApnRefCount on " + name + " found " + apnContext);
        if (apnContext != null) {
            apnContext.decRefCount(log, serialNum);
        }
    }

    @Override
    public int currentRequestCount() {
        int total = 0;
        for (ApnContext apnContext: mApnContexts.values()) {
            total += apnContext.getRefCount();
        }
        return total;
    }

    @Override
    public void clearApnRefCounts() {
        for (ApnContext apnContext : mApnContexts.values()) {
            apnContext.clearRefCount();
        }
    }

    public void snapshotContexts(String logName) {
        LocalLog l = PhoneFactory.getLocalLog(logName);
        if (l != null) {
            for (ApnContext apnContext : mApnContexts.values()) {
                l.log(apnContext.toString());
                apnContext.copyLogTo(l);
            }
            apnContext.decRefCount(log);
        }
    }

+2 −8
Original line number Diff line number Diff line
@@ -662,15 +662,9 @@ public abstract class DcTrackerBase extends Handler {
        mPhone.notifyDataActivity();
    }

    abstract public void incApnRefCount(String name, LocalLog log, int serialNum);
    abstract public void incApnRefCount(String name, LocalLog log);

    abstract public void decApnRefCount(String name, LocalLog log, int serialNum);

    abstract public int currentRequestCount();

    abstract public void clearApnRefCounts();

    abstract public void snapshotContexts(String logName);
    abstract public void decApnRefCount(String name, LocalLog log);

    public boolean isApnSupported(String name) {
        return false;
Loading