dump_api: emits @deprecated in comments
Since @deprecated is an important part of versioned interfaces, we need
to emit them in API dumps so that clients of older versions are warned
when they use deprecated entities.
Bug: 177277347
Test: aidl_unittests
Merged-In: I65c97b85cb4e340d5f3feb3a23dabc078348ce8c
Change-Id: I65c97b85cb4e340d5f3feb3a23dabc078348ce8c
(cherry picked from commit ef1039bd8cd2407c470cce1c30ae6941313300c8)
diff --git a/aidl_unittest.cpp b/aidl_unittest.cpp
index da4f035..c74b78d 100644
--- a/aidl_unittest.cpp
+++ b/aidl_unittest.cpp
@@ -1426,7 +1426,11 @@
" IFoo foo3(IFoo foo);\n"
" Data getData();\n"
" // @hide\n"
+ " /** blahblah\n"
+ " @deprecated\n"
+ " reason why... */\n"
" const int A = 1;\n"
+ " // @deprecated do not use\n"
" const String STR = \"Hello\";\n"
"}\n");
io_delegate_.SetFileContents("foo/bar/Data.aidl",
@@ -1460,7 +1464,9 @@
foo.bar.IFoo foo3(foo.bar.IFoo foo);
foo.bar.Data getData();
/* @hide */
+ /* @deprecated reason why... */
const int A = 1;
+ /* @deprecated do not use */
const String STR = "Hello";
}
)"));