summaryrefslogtreecommitdiff
path: root/libs/binder/file.cpp
diff options
context:
space:
mode:
author Tony Guo <tony.guo.peng@gmail.com> 2023-11-27 04:33:20 +0000
committer Tony Guo <tony.guo.peng@gmail.com> 2023-11-27 05:22:04 +0000
commit26a42112cbfcc026e1f6f5cbf1e9105d3cb1f68d (patch)
treebb909aab8895a49615848d2124431f22c8112e0f /libs/binder/file.cpp
parent04b22dd2210c6d108c4bff4e5708cd3099ba770e (diff)
Explicitly includes IGraphicBufferProducer.h in gui/view/Surface.h
When using android.view.Surface in an AIDL file as below: --- package my.package; import android.view.Surface; interface IFoo { Surface getInputSurface(); } --- and Cpp backend is enabled, the auto-generated Cpp files will not be compiled successfully. In file gui/view/Surface.h, it uses class forward declaration of IGraphicBufferProducer, but IGraphicBufferProducer.h is not included anywhere else, so the compiler does not know what IGraphicBufferProducer actually is, especially the inheritance relationship between IGraphicBufferProducer and RefBase, finally, it stops and prints out the following error: --- FAILED: out/soong/.intermediates/**/**/gen/aidl/my/package/IFoo.o In file included from out/soong/.intermediates/**/**/gen/aidl/my/package/IFoo.cpp:1: In file included from out/soong/.intermediates/**/**/gen/aidl/my/package/IFoo.h:3: In file included from frameworks/native/libs/binder/include/binder/IBinder.h:21: In file included from system/core/libutils/include/utils/RefBase.h:224: system/core/libutils/include/utils/StrongPointer.h:278:14: error: member access into incomplete type 'android::IGraphicBufferProducer' m_ptr->decStrong(this); ^ frameworks/native/libs/gui/include/gui/view/Surface.h:42:7: note: in instantiation of member function 'android::sp<android::IGraphicBufferProducer>::~sp' requested here class Surface : public Parcelable { ^ frameworks/native/libs/gui/include/gui/view/Surface.h:29:7: note: forward declaration of 'android::IGraphicBufferProducer' class IGraphicBufferProducer; ^ 1 error generated. --- Change-Id: Ifa53bac79d9775ee4fa54e7c1abc913822f93f38
Diffstat (limited to 'libs/binder/file.cpp')
0 files changed, 0 insertions, 0 deletions