Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Prabir Pradhan | 4810866 | 2022-09-09 21:22:04 +0000 | [diff] [blame] | 17 | #pragma once |
Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 18 | |
| 19 | #include <stdint.h> |
| 20 | #include <sys/types.h> |
| 21 | |
Michael Wright | 6f78360 | 2015-02-13 17:35:16 -0800 | [diff] [blame] | 22 | #include "InputHost.h" |
| 23 | |
Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 24 | #include <android/os/BnInputFlinger.h> |
Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 25 | #include <binder/Binder.h> |
Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 26 | #include <cutils/compiler.h> |
Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 27 | #include <utils/String16.h> |
Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 28 | #include <utils/String8.h> |
Michael Wright | 6f78360 | 2015-02-13 17:35:16 -0800 | [diff] [blame] | 29 | #include <utils/StrongPointer.h> |
Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 30 | |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 31 | using android::gui::FocusRequest; |
Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 32 | using android::os::BnInputFlinger; |
Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 33 | |
Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 34 | namespace android { |
| 35 | |
| 36 | class InputFlinger : public BnInputFlinger { |
| 37 | public: |
| 38 | static char const* getServiceName() ANDROID_API { |
| 39 | return "inputflinger"; |
| 40 | } |
| 41 | |
| 42 | InputFlinger() ANDROID_API; |
| 43 | |
Siarhei Vishniakou | 7766c03 | 2021-03-02 20:32:20 +0000 | [diff] [blame] | 44 | status_t dump(int fd, const Vector<String16>& args) override; |
Siarhei Vishniakou | 7766c03 | 2021-03-02 20:32:20 +0000 | [diff] [blame] | 45 | binder::Status createInputChannel(const std::string&, InputChannel*) override { |
Garfield Tan | 1560166 | 2020-09-22 15:32:38 -0700 | [diff] [blame] | 46 | return binder::Status::ok(); |
| 47 | } |
Siarhei Vishniakou | 7766c03 | 2021-03-02 20:32:20 +0000 | [diff] [blame] | 48 | binder::Status removeInputChannel(const sp<IBinder>&) override { return binder::Status::ok(); } |
| 49 | binder::Status setFocusedWindow(const FocusRequest&) override { return binder::Status::ok(); } |
Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 50 | |
Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 51 | private: |
Siarhei Vishniakou | 7766c03 | 2021-03-02 20:32:20 +0000 | [diff] [blame] | 52 | ~InputFlinger() override; |
Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 53 | |
| 54 | void dumpInternal(String8& result); |
Michael Wright | 6f78360 | 2015-02-13 17:35:16 -0800 | [diff] [blame] | 55 | |
| 56 | sp<InputHostInterface> mHost; |
Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 57 | }; |
| 58 | |
| 59 | } // namespace android |