[PROTO] Make LCD per app energy same as global
authorDmitry Bogatov <d.bogatov@samsung.com>
Mon, 9 Dec 2013 11:54:55 +0000 (15:54 +0400)
committerDmitry Bogatov <d.bogatov@samsung.com>
Mon, 9 Dec 2013 12:51:30 +0000 (16:51 +0400)
Change-Id: I2be98467fbb1406c32c1b0aa8e91ca8261e7f713
Signed-off-by: Dmitry Bogatov <d.bogatov@samsung.com>
daemon/sys_stat.c

index a5dd8f0..65a98e9 100644 (file)
@@ -2357,8 +2357,9 @@ int get_system_info(struct system_info_t *sys_info, int* pidarray, int pidcount)
                for (i = 0; i != supported_devices_count; ++i) {
                        sys_info->energy_per_device[i] =
                                pop_sys_energy_per_device(i);
-                       sys_info->app_energy_per_device[i] =
-                               pop_app_energy_per_device(i);
+                       sys_info->app_energy_per_device[i] = (i == DEVICE_LCD)
+                               ? sys_info->energy_per_device[i]
+                               : pop_app_energy_per_device(i);
                }
        }