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

Commit feba3092 authored by Chenjie Yu's avatar Chenjie Yu
Browse files

fix subsystem sleep state to use correct puller

Test: cts test
Change-Id: Iacac0c0fa69de6da818d3788b7499e09e46c8393
Fix: 73128324
parent af018ce3
Loading
Loading
Loading
Loading
+68 −111
Original line number Diff line number Diff line
@@ -59,8 +59,7 @@ const std::map<int, PullAtomInfo> StatsPullerManagerImpl::kAllPullAtomInfo = {
         {{3, 4, 5, 6},
          {2},
          1,
      new StatsCompanionServicePuller(
          android::util::WIFI_BYTES_TRANSFER_BY_FG_BG)}},
          new StatsCompanionServicePuller(android::util::WIFI_BYTES_TRANSFER_BY_FG_BG)}},
        // mobile_bytes_transfer
        {android::util::MOBILE_BYTES_TRANSFER,
         {{2, 3, 4, 5},
@@ -72,92 +71,50 @@ const std::map<int, PullAtomInfo> StatsPullerManagerImpl::kAllPullAtomInfo = {
         {{3, 4, 5, 6},
          {2},
          1,
      new StatsCompanionServicePuller(
          android::util::MOBILE_BYTES_TRANSFER_BY_FG_BG)}},
          new StatsCompanionServicePuller(android::util::MOBILE_BYTES_TRANSFER_BY_FG_BG)}},
        // bluetooth_bytes_transfer
        {android::util::BLUETOOTH_BYTES_TRANSFER,
     {{2, 3},
      {},
      1,
      new StatsCompanionServicePuller(
          android::util::BLUETOOTH_BYTES_TRANSFER)}},
         {{2, 3}, {}, 1, new StatsCompanionServicePuller(android::util::BLUETOOTH_BYTES_TRANSFER)}},
        // kernel_wakelock
        {android::util::KERNEL_WAKELOCK,
     {{},
      {},
      1,
      new StatsCompanionServicePuller(android::util::KERNEL_WAKELOCK)}},
         {{}, {}, 1, new StatsCompanionServicePuller(android::util::KERNEL_WAKELOCK)}},
        // subsystem_sleep_state
    {android::util::SUBSYSTEM_SLEEP_STATE,
     {{},
      {},
      1,
      new StatsCompanionServicePuller(android::util::SUBSYSTEM_SLEEP_STATE)}},
        {android::util::SUBSYSTEM_SLEEP_STATE, {{}, {}, 1, new SubsystemSleepStatePuller()}},
        // cpu_time_per_freq
        {android::util::CPU_TIME_PER_FREQ,
     {{3},
      {2},
      1,
      new StatsCompanionServicePuller(android::util::CPU_TIME_PER_FREQ)}},
         {{3}, {2}, 1, new StatsCompanionServicePuller(android::util::CPU_TIME_PER_FREQ)}},
        // cpu_time_per_uid
    {android::util::CPU_TIME_PER_UID,
     {{2, 3}, {}, 1, new CpuTimePerUidPuller()}},
        {android::util::CPU_TIME_PER_UID, {{2, 3}, {}, 1, new CpuTimePerUidPuller()}},
        // cpu_time_per_uid_freq
    {android::util::CPU_TIME_PER_UID_FREQ,
     {{3}, {2}, 1, new CpuTimePerUidFreqPuller()}},
        {android::util::CPU_TIME_PER_UID_FREQ, {{3}, {2}, 1, new CpuTimePerUidFreqPuller()}},
        // wifi_activity_energy_info
        {android::util::WIFI_ACTIVITY_ENERGY_INFO,
     {{},
      {},
      1,
      new StatsCompanionServicePuller(
          android::util::WIFI_ACTIVITY_ENERGY_INFO)}},
         {{}, {}, 1, new StatsCompanionServicePuller(android::util::WIFI_ACTIVITY_ENERGY_INFO)}},
        // modem_activity_info
        {android::util::MODEM_ACTIVITY_INFO,
     {{},
      {},
      1,
      new StatsCompanionServicePuller(android::util::MODEM_ACTIVITY_INFO)}},
         {{}, {}, 1, new StatsCompanionServicePuller(android::util::MODEM_ACTIVITY_INFO)}},
        // bluetooth_activity_info
        {android::util::BLUETOOTH_ACTIVITY_INFO,
     {{},
      {},
      1,
      new StatsCompanionServicePuller(android::util::BLUETOOTH_ACTIVITY_INFO)}},
         {{}, {}, 1, new StatsCompanionServicePuller(android::util::BLUETOOTH_ACTIVITY_INFO)}},
        // system_elapsed_realtime
        {android::util::SYSTEM_ELAPSED_REALTIME,
     {{},
      {},
      1,
      new StatsCompanionServicePuller(android::util::SYSTEM_ELAPSED_REALTIME)}},
         {{}, {}, 1, new StatsCompanionServicePuller(android::util::SYSTEM_ELAPSED_REALTIME)}},
        // system_uptime
        {android::util::SYSTEM_UPTIME,
     {{},
      {},
      1,
      new StatsCompanionServicePuller(android::util::SYSTEM_UPTIME)}},
         {{}, {}, 1, new StatsCompanionServicePuller(android::util::SYSTEM_UPTIME)}},
        // cpu_active_time
    {android::util::CPU_ACTIVE_TIME,
     {{3}, {2}, 1, new KernelUidCpuActiveTimeReader()}},
        {android::util::CPU_ACTIVE_TIME, {{3}, {2}, 1, new KernelUidCpuActiveTimeReader()}},
        // cpu_cluster_time
    {android::util::CPU_CLUSTER_TIME,
     {{3}, {2}, 1, new KernelUidCpuClusterTimeReader()}},
        {android::util::CPU_CLUSTER_TIME, {{3}, {2}, 1, new KernelUidCpuClusterTimeReader()}},
        // disk_space
        {android::util::DISK_SPACE,
         {{}, {}, 1, new StatsCompanionServicePuller(android::util::DISK_SPACE)}},
        // remaining_battery_capacity
        {android::util::REMAINING_BATTERY_CAPACITY,
     {{},
      {},
      1,
      new ResourceHealthManagerPuller(
          android::util::REMAINING_BATTERY_CAPACITY)}},
         {{}, {}, 1, new ResourceHealthManagerPuller(android::util::REMAINING_BATTERY_CAPACITY)}},
        // full_battery_capacity
        {android::util::FULL_BATTERY_CAPACITY,
     {{},
      {},
      1,
      new ResourceHealthManagerPuller(android::util::FULL_BATTERY_CAPACITY)}}};
         {{}, {}, 1, new ResourceHealthManagerPuller(android::util::FULL_BATTERY_CAPACITY)}}};

StatsPullerManagerImpl::StatsPullerManagerImpl()
    : mCurrentPullingInterval(LONG_MAX) {