use of android.os.health.HealthStatsParceler in project android_frameworks_base by ResurrectionRemix.
the class BatteryStatsService method getHealthStatsForUidLocked.
/**
* Gets a HealthStatsParceler for the given uid. You should probably call
* updateExternalStatsSync first.
*/
HealthStatsParceler getHealthStatsForUidLocked(int requestUid) {
final HealthStatsBatteryStatsWriter writer = new HealthStatsBatteryStatsWriter();
final HealthStatsWriter uidWriter = new HealthStatsWriter(UidHealthStats.CONSTANTS);
final BatteryStats.Uid uid = mStats.getUidStats().get(requestUid);
if (uid != null) {
writer.writeUid(uidWriter, mStats, uid);
}
return new HealthStatsParceler(uidWriter);
}
use of android.os.health.HealthStatsParceler in project android_frameworks_base by DirtyUnicorns.
the class BatteryStatsService method getHealthStatsForUidLocked.
/**
* Gets a HealthStatsParceler for the given uid. You should probably call
* updateExternalStatsSync first.
*/
HealthStatsParceler getHealthStatsForUidLocked(int requestUid) {
final HealthStatsBatteryStatsWriter writer = new HealthStatsBatteryStatsWriter();
final HealthStatsWriter uidWriter = new HealthStatsWriter(UidHealthStats.CONSTANTS);
final BatteryStats.Uid uid = mStats.getUidStats().get(requestUid);
if (uid != null) {
writer.writeUid(uidWriter, mStats, uid);
}
return new HealthStatsParceler(uidWriter);
}
use of android.os.health.HealthStatsParceler in project android_frameworks_base by AOSPA.
the class BatteryStatsService method getHealthStatsForUidLocked.
/**
* Gets a HealthStatsParceler for the given uid. You should probably call
* updateExternalStatsSync first.
*/
HealthStatsParceler getHealthStatsForUidLocked(int requestUid) {
final HealthStatsBatteryStatsWriter writer = new HealthStatsBatteryStatsWriter();
final HealthStatsWriter uidWriter = new HealthStatsWriter(UidHealthStats.CONSTANTS);
final BatteryStats.Uid uid = mStats.getUidStats().get(requestUid);
if (uid != null) {
writer.writeUid(uidWriter, mStats, uid);
}
return new HealthStatsParceler(uidWriter);
}
use of android.os.health.HealthStatsParceler in project platform_frameworks_base by android.
the class BatteryStatsService method getHealthStatsForUidLocked.
/**
* Gets a HealthStatsParceler for the given uid. You should probably call
* updateExternalStatsSync first.
*/
HealthStatsParceler getHealthStatsForUidLocked(int requestUid) {
final HealthStatsBatteryStatsWriter writer = new HealthStatsBatteryStatsWriter();
final HealthStatsWriter uidWriter = new HealthStatsWriter(UidHealthStats.CONSTANTS);
final BatteryStats.Uid uid = mStats.getUidStats().get(requestUid);
if (uid != null) {
writer.writeUid(uidWriter, mStats, uid);
}
return new HealthStatsParceler(uidWriter);
}
use of android.os.health.HealthStatsParceler in project android_frameworks_base by crdroidandroid.
the class BatteryStatsService method getHealthStatsForUidLocked.
/**
* Gets a HealthStatsParceler for the given uid. You should probably call
* updateExternalStatsSync first.
*/
HealthStatsParceler getHealthStatsForUidLocked(int requestUid) {
final HealthStatsBatteryStatsWriter writer = new HealthStatsBatteryStatsWriter();
final HealthStatsWriter uidWriter = new HealthStatsWriter(UidHealthStats.CONSTANTS);
final BatteryStats.Uid uid = mStats.getUidStats().get(requestUid);
if (uid != null) {
writer.writeUid(uidWriter, mStats, uid);
}
return new HealthStatsParceler(uidWriter);
}
Aggregations