diff options
-rw-r--r-- | include/input/Input.h | 6 | ||||
-rw-r--r-- | include/input/KeyCharacterMap.h | 4 | ||||
-rw-r--r-- | libs/input/Android.bp | 29 | ||||
-rw-r--r-- | libs/input/Input.cpp | 6 | ||||
-rw-r--r-- | libs/input/KeyCharacterMap.cpp | 5 | ||||
-rw-r--r-- | libs/ui/Android.bp | 4 |
6 files changed, 29 insertions, 25 deletions
diff --git a/include/input/Input.h b/include/input/Input.h index ced1d0e429..d3a9694a50 100644 --- a/include/input/Input.h +++ b/include/input/Input.h @@ -177,9 +177,7 @@ struct AInputDevice { namespace android { -#ifdef __ANDROID__ class Parcel; -#endif const char* inputEventTypeToString(int32_t type); @@ -346,10 +344,8 @@ struct PointerCoords { return getAxisValue(AMOTION_EVENT_AXIS_Y); } -#ifdef __ANDROID__ status_t readFromParcel(Parcel* parcel); status_t writeToParcel(Parcel* parcel) const; -#endif bool operator==(const PointerCoords& other) const; inline bool operator!=(const PointerCoords& other) const { @@ -708,10 +704,8 @@ public: // Matrix is in row-major form and compatible with SkMatrix. void transform(const std::array<float, 9>& matrix); -#ifdef __ANDROID__ status_t readFromParcel(Parcel* parcel); status_t writeToParcel(Parcel* parcel) const; -#endif static bool isTouchEvent(uint32_t source, int32_t action); inline bool isTouchEvent() const { diff --git a/include/input/KeyCharacterMap.h b/include/input/KeyCharacterMap.h index d874347929..339c7ebfeb 100644 --- a/include/input/KeyCharacterMap.h +++ b/include/input/KeyCharacterMap.h @@ -19,9 +19,7 @@ #include <stdint.h> -#ifdef __ANDROID__ #include <binder/IBinder.h> -#endif #include <android-base/result.h> #include <input/Input.h> @@ -134,13 +132,11 @@ public: void tryRemapKey(int32_t scanCode, int32_t metaState, int32_t* outKeyCode, int32_t* outMetaState) const; -#ifdef __ANDROID__ /* Reads a key map from a parcel. */ static std::shared_ptr<KeyCharacterMap> readFromParcel(Parcel* parcel); /* Writes a key map to a parcel. */ void writeToParcel(Parcel* parcel) const; -#endif KeyCharacterMap(const KeyCharacterMap& other); diff --git a/libs/input/Android.bp b/libs/input/Android.bp index d8c3e6fbc7..fce3000a0f 100644 --- a/libs/input/Android.bp +++ b/libs/input/Android.bp @@ -40,8 +40,11 @@ cc_library { "Keyboard.cpp", "KeyCharacterMap.cpp", "KeyLayoutMap.cpp", + "LatencyStatistics.cpp", "PropertyMap.cpp", "TouchVideoFrame.cpp", + "VelocityControl.cpp", + "VelocityTracker.cpp", "VirtualKeyMap.cpp", ], @@ -69,9 +72,6 @@ cc_library { srcs: [ "InputTransport.cpp", "InputWindow.cpp", - "LatencyStatistics.cpp", - "VelocityControl.cpp", - "VelocityTracker.cpp", "android/FocusRequest.aidl", "android/InputApplicationInfo.aidl", "android/os/IInputConstants.aidl", @@ -99,12 +99,33 @@ cc_library { shared: { enabled: false, }, + include_dirs: [ + "frameworks/native/libs/arect/include", + ], + }, + linux_glibc: { + srcs: [ + "InputTransport.cpp", + "InputWindow.cpp", + "android/FocusRequest.aidl", + "android/InputApplicationInfo.aidl", + "android/os/IInputConstants.aidl", + "android/os/IInputFlinger.aidl", + "android/os/ISetInputWindowsListener.aidl", + "android/os/TouchOcclusionMode.aidl", + ], + static_libs: [ + "libhostgraphics", + ], + shared_libs: [ + "libbinder", + ], }, }, aidl: { local_include_dirs: ["."], - export_aidl_headers: true + export_aidl_headers: true, }, } diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp index c6604cbe3d..ad7db75c1a 100644 --- a/libs/input/Input.cpp +++ b/libs/input/Input.cpp @@ -28,8 +28,8 @@ #include <input/InputDevice.h> #include <input/InputEventLabels.h> -#ifdef __ANDROID__ #include <binder/Parcel.h> +#ifdef __ANDROID__ #include <sys/random.h> #endif @@ -254,7 +254,6 @@ void PointerCoords::applyOffset(float xOffset, float yOffset) { setAxisValue(AMOTION_EVENT_AXIS_Y, getY() + yOffset); } -#ifdef __ANDROID__ status_t PointerCoords::readFromParcel(Parcel* parcel) { bits = parcel->readInt64(); @@ -278,7 +277,6 @@ status_t PointerCoords::writeToParcel(Parcel* parcel) const { } return OK; } -#endif void PointerCoords::tooManyAxes(int axis) { ALOGW("Could not set value for axis %d because the PointerCoords structure is full and " @@ -540,7 +538,6 @@ void MotionEvent::transform(const std::array<float, 9>& matrix) { } } -#ifdef __ANDROID__ static status_t readFromParcel(ui::Transform& transform, const Parcel& parcel) { float dsdx, dtdx, tx, dtdy, dsdy, ty; status_t status = parcel.readFloat(&dsdx); @@ -677,7 +674,6 @@ status_t MotionEvent::writeToParcel(Parcel* parcel) const { } return OK; } -#endif bool MotionEvent::isTouchEvent(uint32_t source, int32_t action) { if (source & AINPUT_SOURCE_CLASS_POINTER) { diff --git a/libs/input/KeyCharacterMap.cpp b/libs/input/KeyCharacterMap.cpp index 7ac8a2e02c..2623ecde45 100644 --- a/libs/input/KeyCharacterMap.cpp +++ b/libs/input/KeyCharacterMap.cpp @@ -19,10 +19,7 @@ #include <stdlib.h> #include <string.h> -#ifdef __ANDROID__ #include <binder/Parcel.h> -#endif - #include <android/keycodes.h> #include <attestation/HmacKeyManager.h> #include <input/InputEventLabels.h> @@ -590,7 +587,6 @@ void KeyCharacterMap::addLockedMetaKey(Vector<KeyEvent>& outEvents, } } -#ifdef __ANDROID__ std::shared_ptr<KeyCharacterMap> KeyCharacterMap::readFromParcel(Parcel* parcel) { if (parcel == nullptr) { ALOGE("%s: Null parcel", __func__); @@ -676,7 +672,6 @@ void KeyCharacterMap::writeToParcel(Parcel* parcel) const { parcel->writeInt32(0); } } -#endif // --- KeyCharacterMap::Key --- diff --git a/libs/ui/Android.bp b/libs/ui/Android.bp index e3ae27000f..7c68aaa389 100644 --- a/libs/ui/Android.bp +++ b/libs/ui/Android.bp @@ -243,6 +243,8 @@ filegroup { name: "libui_host_common", srcs: [ "Rect.cpp", - "PixelFormat.cpp" + "Region.cpp", + "PixelFormat.cpp", + "Transform.cpp" ], } |