commit | 9c97553988b37201bd2e560e33e4588ab4edcae1 | [log] [tgz] |
---|---|---|
author | Adam Lesinski <adamlesinski@google.com> | Thu Aug 20 16:25:22 2015 -0700 |
committer | Adam Lesinski <adamlesinski@google.com> | Thu Aug 20 16:25:22 2015 -0700 |
tree | caa17011e0c1cd420e09f53b83df161b3487b339 | |
parent | 140dc14134704fc81b183fc7b2757b6e17af738d [diff] |
Fix cts test in DumpsysHostTest#testBatteryStatsOutput The output in BatteryStats is comma separated. Some of the values can be the empty string. When testing for the number of entries, We call String.split(str) and count the length of the resulting array. Unfortunately, when an empty string is the last value in the comma separated list, it is dropped. Using String.split(str, -1) retains the trailing empty string. Bug:22807424 Change-Id: I666f27614122bc962351e4fca681d838fd656df8