Search in sources :

Example 1 with ModemRestart

use of com.android.internal.telephony.nano.TelephonyProto.TelephonyEvent.ModemRestart in project android_frameworks_opt_telephony by LineageOS.

the class TelephonyMetrics method writeModemRestartEvent.

/**
 * Write Modem Restart event
 *
 * @param phoneId Phone id
 * @param reason Reason for the modem reset.
 */
public void writeModemRestartEvent(int phoneId, String reason) {
    final ModemRestart modemRestart = new ModemRestart();
    String basebandVersion = Build.getRadioVersion();
    if (basebandVersion != null)
        modemRestart.basebandVersion = basebandVersion;
    if (reason != null)
        modemRestart.reason = reason;
    TelephonyEvent event = new TelephonyEventBuilder(phoneId).setModemRestart(modemRestart).build();
    addTelephonyEvent(event);
}
Also used : TelephonyEvent(com.android.internal.telephony.nano.TelephonyProto.TelephonyEvent) ModemRestart(com.android.internal.telephony.nano.TelephonyProto.TelephonyEvent.ModemRestart)

Aggregations

TelephonyEvent (com.android.internal.telephony.nano.TelephonyProto.TelephonyEvent)1 ModemRestart (com.android.internal.telephony.nano.TelephonyProto.TelephonyEvent.ModemRestart)1