Skip to content
Snippets Groups Projects
Commit c2556685 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Support new generated CustomFeatureFlags

* Broaden jarjar Flags rules for NFC.  Note that this brings the NFC rules in line with other packages
* Opt classes named CustomFeatureFlags into Ravenwood

Flag: none
Bug: 336768870
Test: presubmit
Change-Id: Ib1e76ebd04915554f464ec9a3d101b07925e18be
parent 489002ec
No related branches found
No related tags found
No related merge requests found
......@@ -26,9 +26,8 @@ rule com.android.nfc.NfcDispatcherProto* com.android.nfc.x.@0
rule android.os.PersistableBundleProto* com.android.nfc.x.@0
# Used by framework-nfc for reading trunk stable flags
rule android.nfc.FakeFeatureFlagsImpl* com.android.nfc.x.@0
rule android.nfc.FeatureFlags* com.android.nfc.x.@0
rule android.nfc.Flags* com.android.nfc.x.@0
rule android.nfc.*Flags* com.android.nfc.x.@0
rule android.nfc.Flags com.android.nfc.x.@0
rule android.permission.flags.** com.android.nfc.x.@0
# Used by framework-nfc for misc utilities
......
......@@ -47,6 +47,8 @@ private fun ClassNodes.isAidlClass(className: String): Boolean {
}
/**
* Effectively apply @RavenwoodKeepWholeClass to all classes with these names
*
* @return if a given class "seems like" an feature flags class.
*/
private fun ClassNodes.isFeatureFlagsClass(className: String): Boolean {
......@@ -55,5 +57,6 @@ private fun ClassNodes.isFeatureFlagsClass(className: String): Boolean {
return className.endsWith("/Flags")
|| className.endsWith("/FeatureFlags")
|| className.endsWith("/FeatureFlagsImpl")
|| className.endsWith("/CustomFeatureFlags")
|| className.endsWith("/FakeFeatureFlagsImpl");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment