Search in sources :

Example 1 with HealthStatsParceler

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);
}
Also used : HealthStatsWriter(android.os.health.HealthStatsWriter) HealthStatsParceler(android.os.health.HealthStatsParceler) IBatteryStats(com.android.internal.app.IBatteryStats) BatteryStats(android.os.BatteryStats)

Example 2 with HealthStatsParceler

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);
}
Also used : HealthStatsWriter(android.os.health.HealthStatsWriter) HealthStatsParceler(android.os.health.HealthStatsParceler) IBatteryStats(com.android.internal.app.IBatteryStats) BatteryStats(android.os.BatteryStats)

Example 3 with HealthStatsParceler

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);
}
Also used : HealthStatsWriter(android.os.health.HealthStatsWriter) HealthStatsParceler(android.os.health.HealthStatsParceler) IBatteryStats(com.android.internal.app.IBatteryStats) BatteryStats(android.os.BatteryStats)

Example 4 with HealthStatsParceler

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);
}
Also used : HealthStatsWriter(android.os.health.HealthStatsWriter) HealthStatsParceler(android.os.health.HealthStatsParceler) IBatteryStats(com.android.internal.app.IBatteryStats) BatteryStats(android.os.BatteryStats)

Example 5 with HealthStatsParceler

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);
}
Also used : HealthStatsWriter(android.os.health.HealthStatsWriter) HealthStatsParceler(android.os.health.HealthStatsParceler) IBatteryStats(com.android.internal.app.IBatteryStats) BatteryStats(android.os.BatteryStats)

Aggregations

BatteryStats (android.os.BatteryStats)5 HealthStatsParceler (android.os.health.HealthStatsParceler)5 HealthStatsWriter (android.os.health.HealthStatsWriter)5 IBatteryStats (com.android.internal.app.IBatteryStats)5