Replace InputWindowInfo#inputChannel with an IBinder token.
The IBinder token is now being used as the UUID for InputWindows.
We can pass it around without the channel to avoid unnecessary FD
parcelling, duping, and other juggling.
Test: Existing tests pass.
Bug: 80101428
Bug: 113136004
Bug: 111440400
Change-Id: I8eba3fa05f249b7dfcb5c3d9817241cbfe9ab76c
diff --git a/include/input/InputWindow.h b/include/input/InputWindow.h
index 9e3d334..6164aa6 100644
--- a/include/input/InputWindow.h
+++ b/include/input/InputWindow.h
@@ -117,7 +117,7 @@
INPUT_FEATURE_DISABLE_USER_ACTIVITY = 0x00000004,
};
- sp<InputChannel> inputChannel;
+ sp<IBinder> token;
std::string name;
int32_t layoutParamsFlags;
int32_t layoutParamsType;
@@ -174,14 +174,14 @@
return &mInfo;
}
- sp<InputChannel> getInputChannel() const;
+ sp<IBinder> getToken() const;
inline std::string getName() const {
- return mInfo.inputChannel ? mInfo.name : "<invalid>";
+ return mInfo.token ? mInfo.name : "<invalid>";
}
inline nsecs_t getDispatchingTimeout(nsecs_t defaultValue) const {
- return mInfo.inputChannel? mInfo.dispatchingTimeout : defaultValue;
+ return mInfo.token ? mInfo.dispatchingTimeout : defaultValue;
}
/**