diff options
| -rw-r--r-- | core/proto/android/server/notificationhistory.proto | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/core/proto/android/server/notificationhistory.proto b/core/proto/android/server/notificationhistory.proto new file mode 100644 index 000000000000..148bd7e4b663 --- /dev/null +++ b/core/proto/android/server/notificationhistory.proto @@ -0,0 +1,89 @@ +/* + * 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. + */ + +syntax = "proto2"; +package com.android.server.notification; + +import "frameworks/base/core/proto/android/server/enums.proto"; + +option java_multiple_files = true; + +// On disk data store for historical notifications +message NotificationHistoryProto { + message StringPool { + optional int32 size = 1; + repeated string strings = 2; + } + + message Notification { + // The package that posted the notification + optional string package = 1; + // package_index contains the index + 1 of the package name in the string pool + optional int32 package_index = 2; + + // The name of the NotificationChannel this notification was posted to + optional string channel_name = 3; + // channel_name_index contains the index + 1 of the channel name in the string pool + optional int32 channel_name_index = 4; + + // The id of the NotificationChannel this notification was posted to + optional string channel_id = 5; + // channel_id_index contains the index + 1 of the channel id in the string pool + optional int32 channel_id_index = 6; + + // The uid of the package that posted the notification + optional int32 uid = 7; + // The user id of the package that posted the notification + optional int32 user_id = 8; + // The time at which the notification was posted + optional int64 posted_time_ms = 9; + // The title of the notification + optional string title = 10; + // The text of the notification + optional string text = 11; + // The small icon of the notification + optional Icon icon = 12; + + // Matches the constants of android.graphics.drawable.Icon + enum ImageTypeEnum { + TYPE_UNKNOWN = 0; + TYPE_BITMAP = 1; + TYPE_RESOURCE = 2; + TYPE_DATA = 3; + TYPE_URI = 4; + TYPE_ADAPTIVE_BITMAP = 5; + } + + message Icon { + optional ImageTypeEnum image_type = 1; + optional string image_bitmap_filename = 2; + optional int32 image_resource_id = 3; + optional bytes image_data = 4; + optional string image_uri = 5; + } + } + + // The time the last entry was written + optional int64 end_time_ms = 1; + // Pool of strings to save space + optional StringPool stringpool = 2; + // Versioning fields + optional int32 major_version = 3; + optional int32 minor_version = 4; + + // List of historical notifications + repeated Notification notification = 5; +} |