use of android.util.StatsEvent in project android_frameworks_opt_telephony by LineageOS.
the class MetricsCollector method pullSupportedRadioAccessFamily.
private static int pullSupportedRadioAccessFamily(List<StatsEvent> data) {
long rafSupported = 0L;
try {
// The bitmask is defined in android.telephony.TelephonyManager.NetworkTypeBitMask
for (Phone phone : PhoneFactory.getPhones()) {
rafSupported |= phone.getRadioAccessFamily();
}
} catch (IllegalStateException e) {
// Phones have not been made yet
return StatsManager.PULL_SKIP;
}
StatsEvent e = StatsEvent.newBuilder().setAtomId(SUPPORTED_RADIO_ACCESS_FAMILY).writeLong(rafSupported).build();
data.add(e);
return StatsManager.PULL_SUCCESS;
}
Aggregations