Add flag support to styles elements

Test: Automated
Bug: 329436914
Flag: EXEMPT Aconfig not supported on host tools
Change-Id: I3041ebbaf98a90527809b541df8885edfc70d035
diff --git a/tools/aapt2/integration-tests/FlaggedResourcesTest/Android.bp b/tools/aapt2/integration-tests/FlaggedResourcesTest/Android.bp
index 7160b35..1b0f997 100644
--- a/tools/aapt2/integration-tests/FlaggedResourcesTest/Android.bp
+++ b/tools/aapt2/integration-tests/FlaggedResourcesTest/Android.bp
@@ -30,6 +30,7 @@
         "res/values/bools2.xml",
         "res/values/ints.xml",
         "res/values/strings.xml",
+        "res/values/styles.xml",
         "res/layout/layout1.xml",
         "res/layout/layout3.xml",
         "res/flag(test.package.falseFlag)/values/bools.xml",
@@ -50,6 +51,7 @@
         "values_bools2.arsc.flat",
         "values_ints.arsc.flat",
         "values_strings.arsc.flat",
+        "values_styles.arsc.flat",
         "layout_layout1.xml.flat",
         "layout_layout2.(test.package.falseFlag).xml.flat",
         "layout_layout3.xml.flat",
diff --git a/tools/aapt2/integration-tests/FlaggedResourcesTest/res/values/styles.xml b/tools/aapt2/integration-tests/FlaggedResourcesTest/res/values/styles.xml
new file mode 100644
index 0000000..604129c
--- /dev/null
+++ b/tools/aapt2/integration-tests/FlaggedResourcesTest/res/values/styles.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <style name="style1">
+        <item name="android:windowIsTranslucent">true</item>
+    </style>
+    <style name="style1" android:featureFlag="test.package.falseFlag">
+        <item name="android:windowIsTranslucent">false</item>
+    </style>
+
+    <style name="style2">
+        <item name="android:windowIsTranslucent">false</item>
+    </style>
+    <style name="style2" android:featureFlag="test.package.trueFlag">
+        <item name="android:windowIsTranslucent">true</item>
+    </style>
+
+    <style name="style3">
+        <item name="android:windowIsTranslucent" android:featureFlag="!test.package.trueFlag">false</item>
+        <item name="android:windowIsTranslucent" android:featureFlag="test.package.trueFlag">true</item>
+    </style>
+</resources>
\ No newline at end of file