Merge "Add empty check for path in UsageGraph" into qt-dev

am: 825ac6e370

Change-Id: Ic29926ea84ec4be6f2200eaa34103c618a65727e
This commit is contained in:
Lei Yu
2019-05-15 16:51:42 -07:00
committed by android-build-merger
2 changed files with 17 additions and 1 deletions

View File

@@ -288,7 +288,11 @@ public class UsageGraph extends View {
canvas.drawPath(mPath, paint);
}
private void drawFilledPath(Canvas canvas, SparseIntArray localPaths, Paint paint) {
@VisibleForTesting
void drawFilledPath(Canvas canvas, SparseIntArray localPaths, Paint paint) {
if (localPaths.size() == 0) {
return;
}
mPath.reset();
float lastStartX = localPaths.keyAt(0);
mPath.moveTo(localPaths.keyAt(0), localPaths.valueAt(0));