Stop emitting javadoc for @removed attributes.

We need the attributes to remain public because people might still be
linking against them, but we don't want them showing up in the
documentation any more. Them showing up in the documentation also had
the side effect that it would accidentally mark the parent class of
attributes as @removed, which was not intended.

Bug: 28663748

Change-Id: I2f6eb09455fddf1086e6b24bc3bea5292e8e32b7
diff --git a/tools/aapt2/util/StringPiece_test.cpp b/tools/aapt2/util/StringPiece_test.cpp
index d49b67f..853a9a4 100644
--- a/tools/aapt2/util/StringPiece_test.cpp
+++ b/tools/aapt2/util/StringPiece_test.cpp
@@ -59,4 +59,36 @@
     EXPECT_TRUE(StringPiece(car) > banana);
 }
 
+TEST(StringPieceTest, ContainsOtherStringPiece) {
+    StringPiece text("I am a leaf on the wind.");
+    StringPiece startNeedle("I am");
+    StringPiece endNeedle("wind.");
+    StringPiece middleNeedle("leaf");
+    StringPiece emptyNeedle("");
+    StringPiece missingNeedle("soar");
+    StringPiece longNeedle("This string is longer than the text.");
+
+    EXPECT_TRUE(text.contains(startNeedle));
+    EXPECT_TRUE(text.contains(endNeedle));
+    EXPECT_TRUE(text.contains(middleNeedle));
+    EXPECT_TRUE(text.contains(emptyNeedle));
+    EXPECT_FALSE(text.contains(missingNeedle));
+    EXPECT_FALSE(text.contains(longNeedle));
+
+    StringPiece16 text16(u"I am a leaf on the wind.");
+    StringPiece16 startNeedle16(u"I am");
+    StringPiece16 endNeedle16(u"wind.");
+    StringPiece16 middleNeedle16(u"leaf");
+    StringPiece16 emptyNeedle16(u"");
+    StringPiece16 missingNeedle16(u"soar");
+    StringPiece16 longNeedle16(u"This string is longer than the text.");
+
+    EXPECT_TRUE(text16.contains(startNeedle16));
+    EXPECT_TRUE(text16.contains(endNeedle16));
+    EXPECT_TRUE(text16.contains(middleNeedle16));
+    EXPECT_TRUE(text16.contains(emptyNeedle16));
+    EXPECT_FALSE(text16.contains(missingNeedle16));
+    EXPECT_FALSE(text16.contains(longNeedle16));
+}
+
 } // namespace aapt