Update InputConsumer_test.cpp to use getFdStateDebug
Updated InputConsumer_test.cpp to use getFdStateDebug, and reverted the
changes introduced by LooperInterface in InputConsumerNoResampling
Bug: 297226446
Flag: EXEMPT refactor
Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_filter="InputConsumerTest*"
Change-Id: I7621fdf0923e16794142316a126d81e5faf3d708
diff --git a/include/input/InputConsumerNoResampling.h b/include/input/InputConsumerNoResampling.h
index 10c2aa0..c98b9cf 100644
--- a/include/input/InputConsumerNoResampling.h
+++ b/include/input/InputConsumerNoResampling.h
@@ -22,7 +22,6 @@
#include <input/Input.h>
#include <input/InputTransport.h>
-#include <input/LooperInterface.h>
#include <input/Resampler.h>
#include <utils/Looper.h>
@@ -72,16 +71,6 @@
class InputConsumerNoResampling final {
public:
/**
- * This constructor is exclusively for test code. Any real use of InputConsumerNoResampling must
- * use the constructor that takes an sp<Looper> parameter instead of
- * std::shared_ptr<LooperInterface>.
- */
- explicit InputConsumerNoResampling(const std::shared_ptr<InputChannel>& channel,
- std::shared_ptr<LooperInterface> looper,
- InputConsumerCallbacks& callbacks,
- std::unique_ptr<Resampler> resampler);
-
- /**
* @param callbacks are used to interact with InputConsumerNoResampling. They're called whenever
* the event is ready to consume.
* @param looper needs to be sp and not shared_ptr because it inherits from
@@ -126,7 +115,7 @@
private:
std::shared_ptr<InputChannel> mChannel;
- std::shared_ptr<LooperInterface> mLooper;
+ sp<Looper> mLooper;
InputConsumerCallbacks& mCallbacks;
std::unique_ptr<Resampler> mResampler;