Remove redundant silent mode check
SilentModeHandler uses FileObserver to monitor HWState file change. The
delay of the propagation of the change to kernel silent mode change
could break the immediately status assert. However, assertSilentMode
method already check the status change with a timeout mechanism. Therefore,
the pre-check is redundant.
Bug: 194206039, 194205914
Test: atest CarServiceUnitTest:SilentModeHandlerUnitTest
over seahawk, emulator and cuttlefish
Change-Id: I8b3328a0fd913d580baf3a581b79e60c9b2332f9
diff --git a/tests/carservice_unit_test/src/com/android/car/power/SilentModeHandlerUnitTest.java b/tests/carservice_unit_test/src/com/android/car/power/SilentModeHandlerUnitTest.java
index fdaf4ef..6c3637b 100644
--- a/tests/carservice_unit_test/src/com/android/car/power/SilentModeHandlerUnitTest.java
+++ b/tests/carservice_unit_test/src/com/android/car/power/SilentModeHandlerUnitTest.java
@@ -176,9 +176,6 @@
writeStringToFile(mFileHwStateMonitoring.getFile(),
expectedSilentMode ? VALUE_SILENT_MODE : VALUE_NON_SILENT_MODE);
- String contents = readFileAsString(mFileKernelSilentMode.getPath());
- assertWithMessage("Kernel silent mode").that(contents).isEqualTo(
- expectedSilentMode ? VALUE_SILENT_MODE : VALUE_NON_SILENT_MODE);
assertSilentMode(handler, expectedSilentMode);
}