diff --git a/services/core/java/com/android/server/integrity/engine/RuleLoader.java b/services/core/java/com/android/server/integrity/engine/RuleLoader.java new file mode 100644 index 0000000000000..567d7e95dd93e --- /dev/null +++ b/services/core/java/com/android/server/integrity/engine/RuleLoader.java @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.integrity.engine; + +import java.util.ArrayList; +import java.util.List; + +/** + * A helper class for loading rules to the rule evaluation engine. + * + *

Expose fine-grained APIs for loading rules to be passed to the rule evaluation engine. + * + *

It supports: + *

+ * + *

It does NOT support: + *

+ */ +final class RuleLoader { + + List loadRulesByPackageName(String packageName) { + // TODO: Add logic based on rule storage. + return new ArrayList<>(); + } + + List loadRulesByAppCertificate(String appCertificate) { + // TODO: Add logic based on rule storage. + return new ArrayList<>(); + } + + List loadRulesByInstallerName(String installerName) { + // TODO: Add logic based on rule storage. + return new ArrayList<>(); + } + + List loadRulesByInstallerCertificate(String installerCertificate) { + // TODO: Add logic based on rule storage. + return new ArrayList<>(); + } +}