Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Issue 1057563002: [Android] Convert to BatteryUtils (Closed)

Created:
5 years, 8 months ago by rnephew (Reviews Here)
Modified:
5 years, 8 months ago
CC:
chromium-reviews, telemetry-reviews_chromium.org, klundberg+watch_chromium.org, yfriedman+watch_chromium.org, jbudorick+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android] Convert to BatteryUtils Switch all battery related device interaction from DeviceUtils to BatteryUtils. Currently they reside in device utils, which has a lot of functionality around a lot of different device interactions. This will consolidate all current and future power related phone interactions into one location. BUG=472763 Committed: https://crrev.com/58368d3ea55f26f5eb98a76cb7985f580f23ff8c Cr-Commit-Position: refs/heads/master@{#323940}

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Total comments: 8

Patch Set 4 : #

Total comments: 4

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 2

Patch Set 8 : #

Total comments: 4

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -18 lines) Patch
M build/android/provision_devices.py View 1 2 3 chunks +3 lines, -16 lines 0 comments Download
M build/android/pylib/device/battery_utils.py View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
M build/android/pylib/device/battery_utils_test.py View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/core/platform/power_monitor/android_dumpsys_power_monitor.py View 3 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 46 (9 generated)
rnephew (Wrong account)
For the telemetry changes, trybot is running now link: https://codereview.chromium.org/1057563002
5 years, 8 months ago (2015-04-01 17:28:00 UTC) #2
rnephew (Wrong account)
5 years, 8 months ago (2015-04-01 17:28:28 UTC) #4
jbudorick
https://codereview.chromium.org/1057563002/diff/1/build/android/provision_devices.py File build/android/provision_devices.py (right): https://codereview.chromium.org/1057563002/diff/1/build/android/provision_devices.py#newcode213 build/android/provision_devices.py:213: battery = battery_utils.BatteryUtils(device) Let's just move this into ChargeDeviceToLevel.
5 years, 8 months ago (2015-04-01 17:29:47 UTC) #5
rnephew (Wrong account)
On 2015/04/01 17:28:00, rnephew wrote: > For the telemetry changes, trybot is running now link: ...
5 years, 8 months ago (2015-04-01 17:36:31 UTC) #6
rnephew (Wrong account)
https://codereview.chromium.org/1057563002/diff/1/build/android/provision_devices.py File build/android/provision_devices.py (right): https://codereview.chromium.org/1057563002/diff/1/build/android/provision_devices.py#newcode213 build/android/provision_devices.py:213: battery = battery_utils.BatteryUtils(device) On 2015/04/01 17:29:47, jbudorick wrote: > ...
5 years, 8 months ago (2015-04-01 17:42:54 UTC) #7
nednguyen
On 2015/04/01 17:42:54, rnephew wrote: > https://codereview.chromium.org/1057563002/diff/1/build/android/provision_devices.py > File build/android/provision_devices.py (right): > > https://codereview.chromium.org/1057563002/diff/1/build/android/provision_devices.py#newcode213 > ...
5 years, 8 months ago (2015-04-01 18:01:27 UTC) #8
rnephew (Wrong account)
On 2015/04/01 18:01:27, nednguyen wrote: > On 2015/04/01 17:42:54, rnephew wrote: > > > https://codereview.chromium.org/1057563002/diff/1/build/android/provision_devices.py ...
5 years, 8 months ago (2015-04-01 18:04:26 UTC) #9
rnephew (Wrong account)
On 2015/04/01 18:04:26, rnephew wrote: > On 2015/04/01 18:01:27, nednguyen wrote: > > On 2015/04/01 ...
5 years, 8 months ago (2015-04-01 18:24:48 UTC) #10
nednguyen
On 2015/04/01 18:24:48, rnephew wrote: > On 2015/04/01 18:04:26, rnephew wrote: > > On 2015/04/01 ...
5 years, 8 months ago (2015-04-01 20:21:03 UTC) #11
rnephew (Wrong account)
On 2015/04/01 20:21:03, nednguyen wrote: > On 2015/04/01 18:24:48, rnephew wrote: > > On 2015/04/01 ...
5 years, 8 months ago (2015-04-01 21:11:14 UTC) #12
nednguyen
https://codereview.chromium.org/1057563002/diff/20001/build/android/provision_devices.py File build/android/provision_devices.py (left): https://codereview.chromium.org/1057563002/diff/20001/build/android/provision_devices.py#oldcode211 build/android/provision_devices.py:211: device.SetCharging(True) This removal looks like a functional change. https://codereview.chromium.org/1057563002/diff/20001/build/android/provision_devices.py ...
5 years, 8 months ago (2015-04-01 21:22:16 UTC) #13
rnephew (Wrong account)
https://codereview.chromium.org/1057563002/diff/20001/build/android/provision_devices.py File build/android/provision_devices.py (left): https://codereview.chromium.org/1057563002/diff/20001/build/android/provision_devices.py#oldcode211 build/android/provision_devices.py:211: device.SetCharging(True) On 2015/04/01 21:22:15, nednguyen wrote: > This removal ...
5 years, 8 months ago (2015-04-01 21:58:11 UTC) #14
nednguyen
https://codereview.chromium.org/1057563002/diff/40001/build/android/pylib/device/battery_utils.py File build/android/pylib/device/battery_utils.py (right): https://codereview.chromium.org/1057563002/diff/40001/build/android/pylib/device/battery_utils.py#newcode250 build/android/pylib/device/battery_utils.py:250: def ChargeDeviceToLevel(self, level): Maybe this needn't be addressed in ...
5 years, 8 months ago (2015-04-01 22:17:39 UTC) #15
jbudorick
https://codereview.chromium.org/1057563002/diff/40001/build/android/pylib/device/battery_utils.py File build/android/pylib/device/battery_utils.py (right): https://codereview.chromium.org/1057563002/diff/40001/build/android/pylib/device/battery_utils.py#newcode250 build/android/pylib/device/battery_utils.py:250: def ChargeDeviceToLevel(self, level): On 2015/04/01 22:17:39, nednguyen wrote: > ...
5 years, 8 months ago (2015-04-01 22:32:21 UTC) #16
jbudorick
https://codereview.chromium.org/1057563002/diff/40001/build/android/pylib/device/battery_utils.py File build/android/pylib/device/battery_utils.py (right): https://codereview.chromium.org/1057563002/diff/40001/build/android/pylib/device/battery_utils.py#newcode250 build/android/pylib/device/battery_utils.py:250: def ChargeDeviceToLevel(self, level): On 2015/04/01 22:32:21, jbudorick wrote: > ...
5 years, 8 months ago (2015-04-01 22:34:15 UTC) #17
nednguyen
https://codereview.chromium.org/1057563002/diff/40001/build/android/pylib/device/battery_utils.py File build/android/pylib/device/battery_utils.py (right): https://codereview.chromium.org/1057563002/diff/40001/build/android/pylib/device/battery_utils.py#newcode250 build/android/pylib/device/battery_utils.py:250: def ChargeDeviceToLevel(self, level): On 2015/04/01 22:34:15, jbudorick wrote: > ...
5 years, 8 months ago (2015-04-01 22:49:06 UTC) #18
jbudorick
https://codereview.chromium.org/1057563002/diff/40001/build/android/pylib/device/battery_utils.py File build/android/pylib/device/battery_utils.py (right): https://codereview.chromium.org/1057563002/diff/40001/build/android/pylib/device/battery_utils.py#newcode250 build/android/pylib/device/battery_utils.py:250: def ChargeDeviceToLevel(self, level): On 2015/04/01 22:49:06, nednguyen wrote: > ...
5 years, 8 months ago (2015-04-01 22:58:51 UTC) #19
rnephew (Wrong account)
https://codereview.chromium.org/1057563002/diff/40001/build/android/pylib/device/battery_utils.py File build/android/pylib/device/battery_utils.py (right): https://codereview.chromium.org/1057563002/diff/40001/build/android/pylib/device/battery_utils.py#newcode250 build/android/pylib/device/battery_utils.py:250: def ChargeDeviceToLevel(self, level): On 2015/04/01 22:58:51, jbudorick wrote: > ...
5 years, 8 months ago (2015-04-01 23:01:04 UTC) #20
nednguyen
lgtm
5 years, 8 months ago (2015-04-01 23:11:40 UTC) #21
jbudorick
lgtm w/ nits https://codereview.chromium.org/1057563002/diff/60001/build/android/pylib/device/battery_utils.py File build/android/pylib/device/battery_utils.py (right): https://codereview.chromium.org/1057563002/diff/60001/build/android/pylib/device/battery_utils.py#newcode251 build/android/pylib/device/battery_utils.py:251: """ Enables charging and waits for ...
5 years, 8 months ago (2015-04-01 23:14:21 UTC) #22
rnephew (Wrong account)
https://codereview.chromium.org/1057563002/diff/60001/build/android/pylib/device/battery_utils.py File build/android/pylib/device/battery_utils.py (right): https://codereview.chromium.org/1057563002/diff/60001/build/android/pylib/device/battery_utils.py#newcode251 build/android/pylib/device/battery_utils.py:251: """ Enables charging and waits for device to be ...
5 years, 8 months ago (2015-04-01 23:19:58 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1057563002/80001
5 years, 8 months ago (2015-04-01 23:21:41 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/50030)
5 years, 8 months ago (2015-04-02 01:22:07 UTC) #28
perezju
A bit late to the party, but lgtm too, when the try jobs do pass.
5 years, 8 months ago (2015-04-02 08:40:07 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1057563002/80001
5 years, 8 months ago (2015-04-02 12:53:43 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/50253)
5 years, 8 months ago (2015-04-02 14:04:11 UTC) #33
jbudorick
On 2015/04/02 14:04:11, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
5 years, 8 months ago (2015-04-02 14:05:17 UTC) #34
nednguyen
On 2015/04/02 14:05:17, jbudorick wrote: > On 2015/04/02 14:04:11, I haz the power (commit-bot) wrote: ...
5 years, 8 months ago (2015-04-02 15:35:44 UTC) #35
rnephew (Reviews Here)
On 2015/04/02 15:35:44, nednguyen wrote: > On 2015/04/02 14:05:17, jbudorick wrote: > > On 2015/04/02 ...
5 years, 8 months ago (2015-04-02 21:19:05 UTC) #36
rnephew (Reviews Here)
> Mocked out battery_utils in android_platform_backend_unittests. I am not overly > familiar with how the ...
5 years, 8 months ago (2015-04-02 22:22:23 UTC) #37
nednguyen
https://codereview.chromium.org/1057563002/diff/120001/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py File tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py (right): https://codereview.chromium.org/1057563002/diff/120001/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py#newcode37 tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py:37: with mock.patch.object(battery_utils, 'BatteryUtils'): Can we move this to setUp ...
5 years, 8 months ago (2015-04-06 17:46:27 UTC) #38
rnephew (Wrong account)
https://codereview.chromium.org/1057563002/diff/120001/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py File tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py (right): https://codereview.chromium.org/1057563002/diff/120001/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py#newcode37 tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py:37: with mock.patch.object(battery_utils, 'BatteryUtils'): On 2015/04/06 17:46:27, nednguyen wrote: > ...
5 years, 8 months ago (2015-04-06 18:28:38 UTC) #39
nednguyen
lgtm https://codereview.chromium.org/1057563002/diff/140001/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py File tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py (right): https://codereview.chromium.org/1057563002/diff/140001/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py#newcode31 tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py:31: battery_utils.BatteryUtils.__init__ = mock.Mock(return_value=None) nit: you can use: self.battery_patcher ...
5 years, 8 months ago (2015-04-06 18:42:25 UTC) #40
rnephew (Wrong account)
https://codereview.chromium.org/1057563002/diff/140001/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py File tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py (right): https://codereview.chromium.org/1057563002/diff/140001/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py#newcode31 tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py:31: battery_utils.BatteryUtils.__init__ = mock.Mock(return_value=None) On 2015/04/06 18:42:25, nednguyen wrote: > ...
5 years, 8 months ago (2015-04-06 18:53:14 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1057563002/160001
5 years, 8 months ago (2015-04-06 18:54:00 UTC) #44
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 8 months ago (2015-04-06 20:02:56 UTC) #45
commit-bot: I haz the power
5 years, 8 months ago (2015-04-06 20:05:35 UTC) #46
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/58368d3ea55f26f5eb98a76cb7985f580f23ff8c
Cr-Commit-Position: refs/heads/master@{#323940}

Powered by Google App Engine
This is Rietveld 408576698