diff options
| author | 2024-03-20 16:52:43 +0000 | |
|---|---|---|
| committer | 2024-03-20 16:52:43 +0000 | |
| commit | f7f74bc5dc4967b4818f9db1f630d1d2446a339f (patch) | |
| tree | e40d01f04fdf75ea403a6ba5b5c54d2f13f3ccfc | |
| parent | 3cb2f4c354c077d28cc5177468db6aa9166652db (diff) | |
| parent | 0cd721070706fceae387feaf5d0f2721bec59213 (diff) | |
Merge "Addressed NDK API feedback" into main
| -rw-r--r-- | native/android/OWNERS | 2 | ||||
| -rw-r--r-- | native/android/surface_control_input_receiver.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/native/android/OWNERS b/native/android/OWNERS index 0b86909929b0..9a3527da9623 100644 --- a/native/android/OWNERS +++ b/native/android/OWNERS @@ -16,6 +16,8 @@ per-file system_fonts.cpp = file:/graphics/java/android/graphics/fonts/OWNERS per-file native_window_jni.cpp = file:/services/core/java/com/android/server/wm/OWNERS per-file native_activity.cpp = file:/services/core/java/com/android/server/wm/OWNERS per-file surface_control.cpp = file:/services/core/java/com/android/server/wm/OWNERS +per-file surface_control_input_receiver.cpp = file:/services/core/java/com/android/server/wm/OWNERS +per-file input_transfer_token.cpp = file:/services/core/java/com/android/server/wm/OWNERS # Graphics per-file choreographer.cpp = file:/graphics/java/android/graphics/OWNERS diff --git a/native/android/surface_control_input_receiver.cpp b/native/android/surface_control_input_receiver.cpp index d178abc2c3d7..a84ec7309a62 100644 --- a/native/android/surface_control_input_receiver.cpp +++ b/native/android/surface_control_input_receiver.cpp @@ -192,7 +192,9 @@ const AInputTransferToken* AInputReceiver_getInputTransferToken(AInputReceiver* void AInputReceiver_release(AInputReceiver* aInputReceiver) { InputReceiver* inputReceiver = AInputReceiver_to_InputReceiver(aInputReceiver); - inputReceiver->remove(); + if (inputReceiver != nullptr) { + inputReceiver->remove(); + } delete inputReceiver; } |