Commit 34a97ceb authored by Mei Liang's avatar Mei Liang Committed by Commit Bot

Fix ArithmeticException when recording tab launch type

This CL fixes the arithmetic exception when recording tab launch type.
TasksUma::recordTAbLaunchType should return early when total tab count
is equal to zero.

Bug: 906616
Change-Id: I03c9d069b1292d3adc73f14b1b99bc50c1709392
Reviewed-on: https://chromium-review.googlesource.com/c/1343534Reviewed-by: default avatarYusuf Ozuysal <yusufo@chromium.org>
Commit-Queue: Mei Liang <meiliang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610193}
parent 77af20dd
......@@ -60,6 +60,8 @@ public class TasksUma {
int othersCreatedCount = 0;
int totalTabCount = model.getCount();
if (totalTabCount == 0) return;
for (int i = 0; i < totalTabCount; i++) {
Integer tabLaunchType = model.getTabAt(i).getLaunchTypeAtInitialTabCreation();
if (tabLaunchType == null) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment