问题
Android camera framework has evolved a lot over the years.
During the days of API 1, the camera application framework (Java implementation) used to interact with native camera service (C++ implementation) using a JNI glue layer which also implemented binder. This mechanism was fairly straightforward to understand, on a higher level.
Now, I can see that for API 2, JNI layer is removed and application framework talks directly to the native camera service using aidl interfaces.
Refer architecture diagram: https://source.android.com/devices/camera/index.html
Even though the architecture diagram shows both API 1 and API 2 path, the description is provided only for API 1. I want to know how this works for API 2.
To summarize, can someone help me understand how aidl achieves the same functionality without using JNI? Also, more importantly, what could be the benefits of switching to this new mechanism?
来源:https://stackoverflow.com/questions/33255954/android-camera-framework-for-api2