Remove notifyConfigurationChanged listener and policy calls
We found that notifyConfigurationChanged and input devices
changed are synonymous for most use cases. From WM perspective
the configuration can possibly change due to input device
added/removed and hence we had the concept of configuration
changed which was called when "device scan" was finished.
But we realized configuration change can occur after a device
is added/removed like associated display changes, keyboard type
changes, etc. So, we think using input devices changed callback
is better, making notifyConfigurationChanged callback not
necessary.
With this change, we remove:
- notifyConfigurationChanged policy call
- notifyConfigurationChanged listener calls in inputflinger
- Call configuration change to WM on input devices changed
- Move any logic on notifyConfigurationChanged listenr call
to notifyInputDeviceChanged
Bug: 245989146
Test: atest inputflinger_tests
Flag: EXEMPT refactor
Change-Id: Id30e8f1f24aa7206e3eacba88618ff2f48cda014
diff --git a/services/inputflinger/include/NotifyArgs.h b/services/inputflinger/include/NotifyArgs.h
index db417cf..14487fe 100644
--- a/services/inputflinger/include/NotifyArgs.h
+++ b/services/inputflinger/include/NotifyArgs.h
@@ -39,21 +39,6 @@
NotifyInputDevicesChangedArgs& operator=(const NotifyInputDevicesChangedArgs&) = default;
};
-/* Describes a configuration change event. */
-struct NotifyConfigurationChangedArgs {
- int32_t id;
- nsecs_t eventTime;
-
- inline NotifyConfigurationChangedArgs() {}
-
- NotifyConfigurationChangedArgs(int32_t id, nsecs_t eventTime);
-
- bool operator==(const NotifyConfigurationChangedArgs& rhs) const = default;
-
- NotifyConfigurationChangedArgs(const NotifyConfigurationChangedArgs& other) = default;
- NotifyConfigurationChangedArgs& operator=(const NotifyConfigurationChangedArgs&) = default;
-};
-
/* Describes a key event. */
struct NotifyKeyArgs {
int32_t id;
@@ -234,8 +219,8 @@
};
using NotifyArgs =
- std::variant<NotifyInputDevicesChangedArgs, NotifyConfigurationChangedArgs, NotifyKeyArgs,
- NotifyMotionArgs, NotifySensorArgs, NotifySwitchArgs, NotifyDeviceResetArgs,
+ std::variant<NotifyInputDevicesChangedArgs, NotifyKeyArgs, NotifyMotionArgs,
+ NotifySensorArgs, NotifySwitchArgs, NotifyDeviceResetArgs,
NotifyPointerCaptureChangedArgs, NotifyVibratorStateArgs>;
const char* toString(const NotifyArgs& args);