aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2024-06-13 10:49:56 -0700
committerXin Li <delphij@google.com>2024-06-13 10:49:56 -0700
commita7b9c507c6183b034f6d882be298fb32203a8eff (patch)
treee92359631e21088a1eef2e7096925ef5b9a06006
parent918657f68807f40dc7de42e5c056875b5ec140be (diff)
parenta0f0af770592c9c9e20d0e7eb9668503ec562239 (diff)
downloadicing-master.tar.gz
Merge Android 14 QPR3 to AOSP mainHEADmastermain
Bug: 346855327 Merged-In: I88a3bc272ce11b644bc18ba23bbb52add2a3de1b Change-Id: Ia0a61929a34aca4d04c966ae25243e43c2bb3307
-rw-r--r--proto/Android.bp5
-rw-r--r--proto/visibility.proto69
2 files changed, 73 insertions, 1 deletions
diff --git a/proto/Android.bp b/proto/Android.bp
index 5849129..25aedea 100644
--- a/proto/Android.bp
+++ b/proto/Android.bp
@@ -28,7 +28,10 @@ java_library {
include_dirs: ["external/protobuf/src"],
canonical_path_from_root: false,
},
- srcs: ["icing/proto/*.proto"],
+ srcs: [
+ "icing/proto/*.proto",
+ "*.proto",
+ ],
sdk_version: "core_current",
apex_available: [
"//apex_available:platform",
diff --git a/proto/visibility.proto b/proto/visibility.proto
new file mode 100644
index 0000000..b54e3db
--- /dev/null
+++ b/proto/visibility.proto
@@ -0,0 +1,69 @@
+// Copyright 2024 Google LLC
+//
+// 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.
+
+syntax = "proto2";
+
+package appsearch.lib;
+
+option java_package = "com.google.android.appsearch.proto";
+option java_multiple_files = true;
+option objc_class_prefix = "APSC";
+
+// Defines proto contains visibility overlay settings.
+// Next tag: 3
+message AndroidVOverlayProto {
+ // OPTIONAL: the standard visibility settings. Caller could have access if they match ANY of the
+ // requirements in this VisibilityConfig.
+ optional VisibilityConfigProto visibility_config = 1;
+
+ // OPTIONAL: The set of VisibilityConfig that have access. Caller could have access only if they
+ // match ALL of the requirements in a VisibilityConfig.
+ repeated VisibilityConfigProto visible_to_configs = 2;
+}
+
+// Defines proto contains all required requirements of a nested VisibilityConfig.
+// The requirements in a VisibleToConfigProto is "AND" relationship. A caller must match ALL
+// requirements to access the schema. For example, a caller must hold required permissions AND it is
+// a specified package.
+// Next tag: 5
+message VisibilityConfigProto {
+ // OPTIONAL: whether this schema could be visible to the platform.
+ optional bool not_platform_surfaceable = 1;
+
+ // OPTIONAL: the package identifiers of the while list packages that have access to this schema.
+ repeated PackageIdentifierProto visible_to_packages = 2;
+
+ // OPTIONAL: the required permission combinations that the caller need to hold.
+ repeated VisibleToPermissionProto visible_to_permissions = 3;
+
+ // OPTIONAL: the package identifier of the target package for public visibility.
+ optional PackageIdentifierProto publicly_visible_target_package = 4;
+}
+
+// Defines a proto to represent a PackageIdentifier
+// Next tag: 3
+message PackageIdentifierProto {
+ // REQUIRED: the package name of the given PackageIdentifier
+ optional string package_name = 1;
+
+ // REQUIRED: the sha 256 cert of the given PackageIdentifier
+ optional bytes package_sha256cert = 2;
+}
+
+// Defines a proto to represent a set of required Android permission combination.
+// Next tag: 2
+message VisibleToPermissionProto {
+ // REQUIRED: the required permissions that the caller need to hold to get access.
+ repeated uint32 permissions = 1;
+} \ No newline at end of file