Merge "Add permission sync message protos."
This commit is contained in:
@@ -9,7 +9,10 @@ package {
|
||||
|
||||
filegroup {
|
||||
name: "services.companion-sources",
|
||||
srcs: ["java/**/*.java"],
|
||||
srcs: [
|
||||
"java/**/*.java",
|
||||
"java/**/*.proto",
|
||||
],
|
||||
path: "java",
|
||||
visibility: ["//frameworks/base/services"],
|
||||
}
|
||||
@@ -17,6 +20,9 @@ filegroup {
|
||||
java_library_static {
|
||||
name: "services.companion",
|
||||
defaults: ["platform_service_defaults"],
|
||||
proto: {
|
||||
type: "stream",
|
||||
},
|
||||
srcs: [":services.companion-sources"],
|
||||
libs: ["services.core"],
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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.
|
||||
*/
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
option java_multiple_files = true;
|
||||
|
||||
/* Represents granted permissions of a list of apps */
|
||||
message CompanionAppsPermissions {
|
||||
// granted permissions of apps
|
||||
repeated AppPermissions appPermissions = 1;
|
||||
|
||||
/* Represents the granted permissions of an app */
|
||||
message AppPermissions {
|
||||
// package name of the app
|
||||
string packageName = 1;
|
||||
|
||||
// signing certificates used to sign the APK contents of this app
|
||||
bytes certificates = 2;
|
||||
|
||||
// granted permissions
|
||||
repeated string permission = 3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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.
|
||||
*/
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
option java_multiple_files = true;
|
||||
|
||||
/* Represents a message between companion devices */
|
||||
message CompanionMessage {
|
||||
// id of the message
|
||||
int32 messageId = 1;
|
||||
|
||||
// type of the message
|
||||
CompanionMessageType type = 2;
|
||||
|
||||
// data contained in the message
|
||||
bytes data = 3;
|
||||
|
||||
// types of CompanionMessage
|
||||
enum CompanionMessageType {
|
||||
// default value for proto3
|
||||
UNKNOWN = 0;
|
||||
|
||||
// handshake message to establish secure channel
|
||||
SECURE_CHANNEL_HANDSHAKE = 1;
|
||||
|
||||
// permission sync
|
||||
PERMISSION_SYNC = 2;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user