diff options
| author | 2022-10-17 19:01:42 +0000 | |
|---|---|---|
| committer | 2022-10-17 19:01:42 +0000 | |
| commit | a4d8aaacbfd2f44b6d8a3041d247b2dc50dd0bd2 (patch) | |
| tree | 32848be7269213c44d5b6a8fa5211e433637f918 /services/inputflinger/InputThread.cpp | |
| parent | 3a785048711ccd973dfc700394ccdbc98a71f31f (diff) | |
| parent | 31977184520e99110e1deadceb6197636f76450a (diff) | |
Merge "Run some inputflinger_tests on host"
Diffstat (limited to 'services/inputflinger/InputThread.cpp')
| -rw-r--r-- | services/inputflinger/InputThread.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/inputflinger/InputThread.cpp b/services/inputflinger/InputThread.cpp index e2e64f992f..e74f258168 100644 --- a/services/inputflinger/InputThread.cpp +++ b/services/inputflinger/InputThread.cpp @@ -54,7 +54,13 @@ InputThread::~InputThread() { } bool InputThread::isCallingThread() { +#if defined(__ANDROID__) return gettid() == mThread->getTid(); +#else + // Assume that the caller is doing everything correctly, + // since thread information is not available on host + return false; +#endif } } // namespace android
\ No newline at end of file |