Merge "Shore up dividing by zero protections."

This commit is contained in:
TreeHugger Robot
2018-02-09 18:54:31 +00:00
committed by Android (Google) Code Review

View File

@@ -187,6 +187,7 @@ public class NetworkStatsCollection implements FileRotator.Reader {
*/
@VisibleForTesting
public static long multiplySafe(long value, long num, long den) {
if (den == 0) den = 1;
long x = value;
long y = num;