From 448c18e5fff8f0c7b5b142452207a20240d67478 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Mon, 25 Mar 2024 11:56:24 -0700 Subject: [PATCH] Fix ImpossibleNullComparison errorprone warning Protobuf fields cannot be null. Bug: 253827323 Test: m RUN_ERROR_PRONE=true javac-check Change-Id: Ied830dbf9ddde4c43281feb38a01f01d0750fea7 --- .../fuelgauge/batteryusage/bugreport/BatteryUsageLogUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/fuelgauge/batteryusage/bugreport/BatteryUsageLogUtils.java b/src/com/android/settings/fuelgauge/batteryusage/bugreport/BatteryUsageLogUtils.java index 4017131de31..e3829e3b32f 100644 --- a/src/com/android/settings/fuelgauge/batteryusage/bugreport/BatteryUsageLogUtils.java +++ b/src/com/android/settings/fuelgauge/batteryusage/bugreport/BatteryUsageLogUtils.java @@ -95,7 +95,7 @@ public final class BatteryUsageLogUtils { .append(ConvertUtils.utcToLocalTimeForLogging(entry.getTimestamp())) .append(" " + entry.getAction()); final String description = entry.getActionDescription(); - if (description != null && !description.isEmpty()) { + if (!description.isEmpty()) { builder.append(" " + description); } return builder.toString();