biod: Temporarily disable maintenance timer

The maintenance timer could be triggered during an auth/unlock session.
This has been shown to silently abort the auth/unlock session, which
manifests to the user as fingerprint unlock just not working.

We need to disable this timer until we can find a safe way for
these operations to coexist.

BUG=b:184783529,b:187951992
TEST=FEATURES=test emerge-hatch biod

Change-Id: I293faa7b833f8726e2699916a08c1f1efc3b0621
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2892333
Tested-by: Craig Hesling <hesling@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Commit-Queue: Craig Hesling <hesling@chromium.org>
(cherry picked from commit 8775aef2837cbc42b1590fe5e90e67a000114067)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2896251
Reviewed-by: Josie Nordrum <josienordrum@google.com>
diff --git a/biod/cros_fp_biometrics_manager.cc b/biod/cros_fp_biometrics_manager.cc
index 146026f..ba556e0 100644
--- a/biod/cros_fp_biometrics_manager.cc
+++ b/biod/cros_fp_biometrics_manager.cc
@@ -335,10 +335,16 @@
 
   use_positive_match_secret_ = cros_dev_->SupportsPositiveMatchSecret();
 
+// TODO(b/187951992): The following automatic maintenance routine needs to
+// be re-enabled in such a way that it will not interfere with the
+// auth/unlock or enroll session. This maintenance timer was disabled due
+// to b/184783529.
+#if 0
   maintenance_timer_->Start(
       FROM_HERE, base::TimeDelta::FromDays(1),
       base::Bind(&CrosFpBiometricsManager::OnMaintenanceTimerFired,
                  base::Unretained(this)));
+#endif
 }
 
 CrosFpBiometricsManager::~CrosFpBiometricsManager() {}
diff --git a/biod/cros_fp_biometrics_manager_test.cc b/biod/cros_fp_biometrics_manager_test.cc
index 59d52fa..c5a979c 100644
--- a/biod/cros_fp_biometrics_manager_test.cc
+++ b/biod/cros_fp_biometrics_manager_test.cc
@@ -297,21 +297,35 @@
   metrics::MockBiodMetrics* mock_metrics_;
 };
 
-TEST_F(CrosFpBiometricsManagerMockTest, TestMaintenanceTimer_TooShort) {
+// TODO(b/187951992): The following tests for the automatic maintenance timer
+// need to be re-enabled when the maintenace-auth interference is fixed.
+// The tests were disabled due to b/184783529.
+TEST_F(CrosFpBiometricsManagerMockTest,
+       DISABLED_TestMaintenanceTimer_TooShort) {
   EXPECT_CALL(*mock_, OnMaintenanceTimerFired).Times(0);
   task_environment_.FastForwardBy(base::TimeDelta::FromHours(12));
 }
 
-TEST_F(CrosFpBiometricsManagerMockTest, TestMaintenanceTimer_Once) {
+TEST_F(CrosFpBiometricsManagerMockTest, DISABLED_TestMaintenanceTimer_Once) {
   EXPECT_CALL(*mock_, OnMaintenanceTimerFired).Times(1);
   task_environment_.FastForwardBy(base::TimeDelta::FromDays(1));
 }
 
-TEST_F(CrosFpBiometricsManagerMockTest, TestMaintenanceTimer_Multiple) {
+TEST_F(CrosFpBiometricsManagerMockTest,
+       DISABLED_TestMaintenanceTimer_Multiple) {
   EXPECT_CALL(*mock_, OnMaintenanceTimerFired).Times(2);
   task_environment_.FastForwardBy(base::TimeDelta::FromDays(2));
 }
 
+// TODO(b/187951992): The following test must be removed when the
+// maintenace-auth interference is fixed.
+// This test was added when the maintenance timer was disabled due to
+// b/184783529.
+TEST_F(CrosFpBiometricsManagerMockTest, TestMaintenanceTimer_Disabled) {
+  EXPECT_CALL(*mock_, OnMaintenanceTimerFired).Times(0);
+  task_environment_.FastForwardBy(base::TimeDelta::FromDays(1));
+}
+
 TEST_F(CrosFpBiometricsManagerMockTest, TestOnMaintenanceTimerFired) {
   constexpr int kNumDeadPixels = 1;