diff options
author | Remi NGUYEN VAN <reminv@google.com> | 2021-03-11 15:41:52 +0900 |
---|---|---|
committer | Remi NGUYEN VAN <reminv@google.com> | 2021-03-18 20:04:52 +0900 |
commit | 2b97cb1d012c481957ddc1efd2bbde5c3f45ee5c (patch) | |
tree | 7616f0a43658b5406b5b8ef3b0ead14349326ec5 | |
parent | 0fcb8d6db42f6c20f6b69d47e02c54e2706f88f9 (diff) |
Add SystemMessages protos to Connectivity
This follows the model used for the same protos by the Wifi module in
service-wifi.
SystemMessageProto is used by NetworkNotificationManager to define IDs
for notifications that are also counted in system notification metrics.
Bug: 171860710
Test: m
Change-Id: Iec674913fad9ad59c04249714a08b5a0d8ab0f84
-rw-r--r-- | packages/Connectivity/service/Android.bp | 16 | ||||
-rw-r--r-- | packages/Connectivity/service/jarjar-rules.txt | 3 | ||||
-rw-r--r-- | packages/Connectivity/service/proto/connectivityproto.proto | 20 |
3 files changed, 39 insertions, 0 deletions
diff --git a/packages/Connectivity/service/Android.bp b/packages/Connectivity/service/Android.bp index f630ceac3662..1330e719e774 100644 --- a/packages/Connectivity/service/Android.bp +++ b/packages/Connectivity/service/Android.bp @@ -68,6 +68,7 @@ java_library { "net-utils-framework-common", "netd-client", "PlatformProperties", + "service-connectivity-protos", ], apex_available: [ "//apex_available:platform", @@ -76,6 +77,21 @@ java_library { } java_library { + name: "service-connectivity-protos", + proto: { + type: "nano", + }, + srcs: [ + ":system-messages-proto-src", + ], + libs: ["libprotobuf-java-nano"], + apex_available: [ + "//apex_available:platform", + "com.android.tethering", + ], +} + +java_library { name: "service-connectivity", installable: true, static_libs: [ diff --git a/packages/Connectivity/service/jarjar-rules.txt b/packages/Connectivity/service/jarjar-rules.txt index a7b419b020b5..5caa11b11ae4 100644 --- a/packages/Connectivity/service/jarjar-rules.txt +++ b/packages/Connectivity/service/jarjar-rules.txt @@ -12,3 +12,6 @@ rule android.util.LocalLog* com.android.connectivity.util.LocalLog@1 # the one in com.android.internal.util rule android.util.IndentingPrintWriter* android.connectivity.util.IndentingPrintWriter@1 rule com.android.internal.util.** com.android.connectivity.util.@1 + +rule com.android.internal.messages.** com.android.connectivity.messages.@1 +rule com.google.protobuf.** com.android.connectivity.protobuf.@1 diff --git a/packages/Connectivity/service/proto/connectivityproto.proto b/packages/Connectivity/service/proto/connectivityproto.proto new file mode 100644 index 000000000000..a992d7c26368 --- /dev/null +++ b/packages/Connectivity/service/proto/connectivityproto.proto @@ -0,0 +1,20 @@ +/* + * 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 = "proto2"; + +// Connectivity protos can be created in this directory. Note this file must be included before +// building system-messages-proto, otherwise it will not build by itself. |