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

Commit 88248b6b authored by Pavel Grafov's avatar Pavel Grafov Committed by Android (Google) Code Review
Browse files

Merge "Remove useless generic argument and unchecked cast" into main

parents 3eb074e5 c3bedfb1
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -708,17 +708,15 @@ final class PolicyDefinition<V> {
    }

    @Nullable
    static <V> PolicyKey readPolicyKeyFromXml(TypedXmlPullParser parser)
    static PolicyKey readPolicyKeyFromXml(TypedXmlPullParser parser)
            throws XmlPullParserException, IOException {
        // TODO: can we avoid casting?
        PolicyKey policyKey = PolicyKey.readGenericPolicyKeyFromXml(parser);
        if (policyKey == null) {
            Slogf.wtf(TAG, "Error parsing PolicyKey, GenericPolicyKey is null");
            return null;
        }
        PolicyDefinition<PolicyValue<V>> genericPolicyDefinition =
                (PolicyDefinition<PolicyValue<V>>) POLICY_DEFINITIONS.get(
                        policyKey.getIdentifier());
        PolicyDefinition<?> genericPolicyDefinition =
                POLICY_DEFINITIONS.get(policyKey.getIdentifier());
        if (genericPolicyDefinition == null) {
            Slogf.wtf(TAG, "Error parsing PolicyKey, Unknown generic policy key: " + policyKey);
            return null;