summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry Cutts <hcutts@google.com>2024-03-11 15:05:31 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2024-03-13 13:08:50 +0000
commitb824af1e782a4e741fbfe4b0c311de3bc161e2fc (patch)
tree324e8e9f95bc24aa75c77bbc58186453367e2a47
parent8fa2ecca2f4a5f08f58d9a75dc712dcb1d8ba4c8 (diff)
downloadlibchrome-gestures-b824af1e782a4e741fbfe4b0c311de3bc161e2fc.tar.gz
Upgrade some Log calls to Err
These all indicate states that we shouldn't get into, so they should be logged with the higher severity level. BUG=b:314743031 TEST=run unit tests LOW_COVERAGE_REASON=only modifies logging for unexpected cases Change-Id: If503b726511082d16c52858cf62291cc00926b16 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/gestures/+/5358098 Commit-Queue: Harry Cutts <hcutts@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Tested-by: Harry Cutts <hcutts@chromium.org> Reviewed-by: Sean O'Brien <seobrien@chromium.org> Code-Coverage: Sean O'Brien <seobrien@chromium.org>
-rw-r--r--src/gestures.cc2
-rw-r--r--src/immediate_interpreter.cc8
-rw-r--r--src/non_linearity_filter_interpreter.cc1
3 files changed, 6 insertions, 5 deletions
diff --git a/src/gestures.cc b/src/gestures.cc
index a8594cc..cd49c68 100644
--- a/src/gestures.cc
+++ b/src/gestures.cc
@@ -506,7 +506,7 @@ void GestureInterpreter::SetTimerProvider(GesturesTimerProvider* tp,
interpret_timer_ = nullptr;
}
if (interpret_timer_)
- Log("How was interpret_timer_ not null?!");
+ Err("How was interpret_timer_ not null?!");
timer_provider_ = tp;
timer_provider_data_ = data;
if (timer_provider_)
diff --git a/src/immediate_interpreter.cc b/src/immediate_interpreter.cc
index f52f097..9f63427 100644
--- a/src/immediate_interpreter.cc
+++ b/src/immediate_interpreter.cc
@@ -2540,7 +2540,7 @@ stime_t ImmediateInterpreter::TimeoutForTtcState(TapToClickState state) {
case kTtcDragRelease: return tap_drag_timeout_.val_;
case kTtcDragRetouch: return tap_timeout_.val_;
default:
- Log("Unknown state!");
+ Err("Unknown TapToClickState %u!", state);
return 0.0;
}
}
@@ -2735,7 +2735,7 @@ void ImmediateInterpreter::UpdateTapState(
break;
}
if (!hwstate) {
- Log("hwstate is null but no timeout?!");
+ Err("hwstate is null but not a timeout?!");
break;
}
tap_record_.Update(
@@ -2785,7 +2785,7 @@ void ImmediateInterpreter::UpdateTapState(
break;
case kTtcSubsequentTapBegan:
if (!is_timeout && !hwstate) {
- Log("hwstate is null but not a timeout?!");
+ Err("hwstate is null but not a timeout?!");
break;
}
if (hwstate)
@@ -2889,7 +2889,7 @@ void ImmediateInterpreter::UpdateTapState(
break;
}
if (!hwstate) {
- Log("not timeout but hwstate is null?!");
+ Err("hwstate is null but not a timeout?!");
break;
}
if (tap_record_.Moving(*hwstate, tap_move_dist_.val_))
diff --git a/src/non_linearity_filter_interpreter.cc b/src/non_linearity_filter_interpreter.cc
index d871ba0..4d5c1e4 100644
--- a/src/non_linearity_filter_interpreter.cc
+++ b/src/non_linearity_filter_interpreter.cc
@@ -74,6 +74,7 @@ void NonLinearityFilterInterpreter::LoadData() {
}
FILE* data_fd = fopen(data_location_.val_, "rb");
if (!data_fd) {
+ // TODO(b/329268257): make this an Err, not a Log.
Log("Unable to open non-linearity filter data '%s'", data_location_.val_);
return;
}