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

Commit 0db7db3a authored by Jack Yu's avatar Jack Yu Committed by Android (Google) Code Review
Browse files

Merge "Combined TelephonyEventLog and part of the connectivity metrics app...

Merge "Combined TelephonyEventLog and part of the connectivity metrics app into the new TelephonyMetrics" into nyc-mr1-dev
parents 484d1924 f2d0fa64
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -22,11 +22,17 @@ include $(CLEAR_VARS)
LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/src/java
LOCAL_SRC_FILES := $(call all-java-files-under, src/java) \
	$(call all-Iaidl-files-under, src/java) \
	$(call all-logtags-files-under, src/java)
	$(call all-logtags-files-under, src/java) \
	$(call all-proto-files-under, proto)

LOCAL_JAVA_LIBRARIES := voip-common ims-common
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := telephony-common
LOCAL_PROTOC_OPTIMIZE_TYPE := nano
LOCAL_PROTO_JAVA_OUTPUT_PARAMS := optional_field_style=accessors,store_unknown_fields=true,enum_style=java

LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/jarjar-rules.txt

ifeq ($(EMMA_INSTRUMENT_FRAMEWORK),true)
LOCAL_EMMA_INSTRUMENT := true

jarjar-rules.txt

0 → 100644
+2 −0
Original line number Diff line number Diff line
rule com.google.protobuf.nano.** com.android.framework.protobuf.nano.@1

proto/telephony.proto

0 → 100644
+1218 −0

File added.

Preview size limit exceeded, changes collapsed.

+12 −4
Original line number Diff line number Diff line
@@ -17,9 +17,9 @@
package com.android.internal.telephony;

import android.telephony.Rlog;
import android.text.TextUtils;

import com.android.internal.telephony.uicc.UiccController;
import com.android.internal.telephony.uicc.IccCardProxy;
import com.android.internal.telephony.metrics.TelephonyMetrics;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -43,9 +43,17 @@ public class DebugService {
     * Dump the state of various objects, add calls to other objects as desired.
     */
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        log("dump: +");
        if (args != null && args.length > 0) {
            if (TextUtils.equals(args[0], "--metrics") ||
                    TextUtils.equals(args[0], "--metricsproto"))
            {
                log("Collecting telephony metrics..");
                TelephonyMetrics.getInstance().dump(fd, pw, args);
                return;
            }
        }
        log("Dump telephony.");
        PhoneFactory.dump(fd, pw, args);
        log("dump: -");
    }

    private static void log(String s) {
+2 −6
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ import android.telephony.Rlog;
import android.util.EventLog;

import com.android.internal.telephony.cdma.CdmaCallWaitingNotification;
import com.android.internal.telephony.EventLogTags;
import com.android.internal.telephony.metrics.TelephonyMetrics;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -88,8 +88,6 @@ public class GsmCdmaCallTracker extends CallTracker {

    public PhoneConstants.State mState = PhoneConstants.State.IDLE;

    private TelephonyEventLog mEventLog;

    // Following member variables are for CDMA only
    private RegistrantList mCallWaitingRegistrants = new RegistrantList();
    private boolean mPendingCallInEcm;
@@ -152,8 +150,6 @@ public class GsmCdmaCallTracker extends CallTracker {
        mPhone.getContext().registerReceiver(mEcmExitReceiver, filter);

        updatePhoneType(true);

        mEventLog = new TelephonyEventLog(mPhone.getPhoneId());
    }

    public void updatePhoneType() {
@@ -719,7 +715,7 @@ public class GsmCdmaCallTracker extends CallTracker {
        }
        if (mState != oldState) {
            mPhone.notifyPhoneStateChanged();
            mEventLog.writePhoneState(mState);
            TelephonyMetrics.getInstance().writePhoneState(mPhone.getPhoneId(), mState);
        }
    }

Loading