In AOSP (8.0) source I have found Surface.aidl
moved from frameworks/base/core/java/android/view/Surface.aidl
to frameworks/native/aidl/gui/android/view/Surface.aidl
.
Actually the problem is that my application AIDL needs to use Surface class.
Below is the code snippet
import android.view.Surface;
interface sampleService {
void setSurface(in Surface sampleSurface);
}
During build my application AIDL not able to resolve the Surface class. But if I add Surface.aidl
class inside frameworks/base/core/java/android/view/
then my AIDL compiled successfully and running without error.
Now my question is that frameworks/base/Android.mk
includes frameworks/native/aidl/gui/android/view/Surface.aidl
but still my AIDL not able to import Surface class.
I am not able to figure out the problem. Please help me to find a way out.
Here is the Change Log
Just adding inside Android.mk and its working
LOCAL_AIDL_INCLUDES += \
frameworks/native/aidl/gui