Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a77a6363 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Make autogenerated classes "boring" on dashboard

Bug: 402797626
Test: Manual test by importing stats files on plx
Flag: EXEMPT host test tool only change

Change-Id: Ifa008928b9704f307e38e95fe994f2996a2f8299
parent 744ad4f0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ class ClassWidePolicyPropagatingFilter(
                }

                return p.withReason(policy.reason)
                    .wrapReason("class-wide in $className")
                    .wrapReason("class-wide in $className", policy.statsLabelOverride)
            }
            // If the class's policy is remove, then remove it.
            if (policy.policy == FilterPolicy.Remove) {
+2 −2
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ enum class StatsLabel(val statValue: Int, val label: String) {
data class FilterPolicyWithReason (
    val policy: FilterPolicy,
    val reason: String = "",
    private val statsLabelOverride: StatsLabel? = null
    val statsLabelOverride: StatsLabel? = null
) {
    /**
     * Return a new [FilterPolicy] with an updated reason, while keeping the original reason
@@ -51,7 +51,7 @@ data class FilterPolicyWithReason (
        return FilterPolicyWithReason(
            policy,
            "$reason [inner-reason: ${this.reason}]",
            statsLabelOverride = statsLabelOverride,
            statsLabelOverride = statsLabelOverride ?: this.statsLabelOverride,
        )
    }

+8 −4
Original line number Diff line number Diff line
@@ -528,7 +528,8 @@ class TextFileFilterPolicyParser {
                        )
                    }
                    val p = policy.withReason(
                        "$FILTER_REASON (special-class AIDL)"
                        "$FILTER_REASON (special-class AIDL)",
                        StatsLabel.SupportedButBoring,
                    )
                    processor.onSpecialClassPolicy(classType, p)
                    aidlPolicy = p
@@ -541,7 +542,8 @@ class TextFileFilterPolicyParser {
                        )
                    }
                    val p = policy.withReason(
                        "$FILTER_REASON (special-class feature flags)"
                        "$FILTER_REASON (special-class feature flags)",
                        StatsLabel.SupportedButBoring,
                    )
                    processor.onSpecialClassPolicy(classType, p)
                    featureFlagsPolicy = p
@@ -554,7 +556,8 @@ class TextFileFilterPolicyParser {
                        )
                    }
                    val p = policy.withReason(
                        "$FILTER_REASON (special-class sysprops)"
                        "$FILTER_REASON (special-class sysprops)",
                        StatsLabel.SupportedButBoring,
                    )
                    processor.onSpecialClassPolicy(classType, p)
                    syspropsPolicy = p
@@ -567,7 +570,8 @@ class TextFileFilterPolicyParser {
                        )
                    }
                    val p = policy.withReason(
                        "$FILTER_REASON (special-class R file)"
                        "$FILTER_REASON (special-class R file)",
                        StatsLabel.SupportedButBoring,
                    )
                    processor.onSpecialClassPolicy(classType, p)
                    rFilePolicy = p