[chromecast] Fix Android gesture callback scoping
The callback wrapper being local stack allocated means the asynchronous callback invocation may fail if invoked after the method returns; this has been causing crash/JNI failure. Switch to a unique_ptr and move it along. Additionally the callback argument itself may go out of scope, so needs to be switched to the correctly scoped JNI handle. Bug: internal b/162882383 Test: manual on device Change-Id: I4bb4c87531e9a4b099f61ad9133ad1b3922de4be Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2364559 Commit-Queue: Ryan Daum <rdaum@chromium.org> Reviewed-by:Daniel Nicoara <dnicoara@chromium.org> Reviewed-by:
Simeon Anfinrud <sanfin@chromium.org> Cr-Commit-Position: refs/heads/master@{#800086}
Showing
Please register or sign in to comment