summaryrefslogtreecommitdiff
path: root/include/input/InputWindow.h
diff options
context:
space:
mode:
author Robert Carr <racarr@google.com> 2018-10-11 19:03:41 -0700
committer Robert Carr <racarr@google.com> 2018-11-27 12:39:33 -0800
commit740167f1a2b5a141debb0efc952eb4e57152bdd4 (patch)
treef3d66560710ce79a3aec809c0d6d570bb6252624 /include/input/InputWindow.h
parent5c8a026133d5bbcb6f416952937a7a810bccc8b1 (diff)
Rework InputApplicationInfo
First we move it inside of InputWindowInfo instead of InputWindowHandle so it is part of the data sent across binder. Second we give it a persistent identity of an IBinder token and use this for comparisons. Bug: 80101428 Bug: 113136004 Bug: 111440400 Test: EndToEndNativeInputTest. Existing tests pass. Change-Id: Id89a40e66887d834020f8e645fd1fb48adb7ee2e
Diffstat (limited to 'include/input/InputWindow.h')
-rw-r--r--include/input/InputWindow.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/input/InputWindow.h b/include/input/InputWindow.h
index 6164aa6f09..1a46825692 100644
--- a/include/input/InputWindow.h
+++ b/include/input/InputWindow.h
@@ -138,6 +138,7 @@ struct InputWindowInfo {
int32_t ownerUid;
int32_t inputFeatures;
int32_t displayId;
+ InputApplicationInfo applicationInfo;
void addTouchableRegion(const Rect& region);
@@ -168,7 +169,6 @@ struct InputWindowInfo {
*/
class InputWindowHandle : public RefBase {
public:
- const sp<InputApplicationHandle> inputApplicationHandle;
inline const InputWindowInfo* getInfo() const {
return &mInfo;
@@ -176,6 +176,10 @@ public:
sp<IBinder> getToken() const;
+ sp<IBinder> getApplicationToken() {
+ return mInfo.applicationInfo.token;
+ }
+
inline std::string getName() const {
return mInfo.token ? mInfo.name : "<invalid>";
}
@@ -202,7 +206,7 @@ public:
void releaseChannel();
protected:
- explicit InputWindowHandle(const sp<InputApplicationHandle>& inputApplicationHandle);
+ explicit InputWindowHandle();
virtual ~InputWindowHandle();
InputWindowInfo mInfo;