camera: vndk: migrate from NativeHandle to ANativeWindow
The client side implementation of Camera vNDK used
NativeHandle to parcel NDK ANativeWindow, because ANativeWindow
wasn't parcelable over stable interfaces until recently. However,
this introduced an implicit dependency on HIDL as encoding
ANativeWindow to NativeHandle required HIDL Token Manager.
HIDL Token Manager is deprecated and scheduled to be removed soon.
This CL updates the client side vNDK implementation to use
ANativeWindow instead of NativeHandle. This includes updating
the shared code, which had special handling for when built for
the vNDK.
Bug: 283283111
Test: atest ACameraNdkVendorTest passes
atest CameraCtsTestCases:Native* tests pass
FaceHAL works OK!
Change-Id: I64a6918f041032c216dfa074d74ad2ea5b6abfeb
diff --git a/camera/ndk/impl/ACameraCaptureSession.cpp b/camera/ndk/impl/ACameraCaptureSession.cpp
index 73439c7..449c0b4 100644
--- a/camera/ndk/impl/ACameraCaptureSession.cpp
+++ b/camera/ndk/impl/ACameraCaptureSession.cpp
@@ -146,7 +146,7 @@
return ret;
}
-camera_status_t ACameraCaptureSession::prepare(ACameraWindowType* window) {
+camera_status_t ACameraCaptureSession::prepare(ANativeWindow* window) {
#ifdef __ANDROID_VNDK__
std::shared_ptr<acam::CameraDevice> dev = getDevicePtr();
#else