xref: /aosp_15_r20/external/setupcompat/setup_extension/info_modules.proto (revision 051bb6dcb1832cf7b75baa6388e29302554c2605)
1// Copyright (C) 2022 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Author: [email protected] (Yu Chao)
16
17syntax = "proto2";
18
19package portal_tips_proto;
20
21option java_package = "com.google.android.setupcompat";
22option java_outer_classname = "InfoModules";
23
24// A list of informational modules to be displayed under the deferred setup
25// items.
26// Next index: 5
27message InfoModuleList {
28  // Contains the title of the entire info module section. This is displayed
29  // before the subtitle and the list of info modules.
30  optional string section_title = 1;
31
32  // Contains the subtitle of the entire info module section. This is displayed
33  // before the list of info modules.
34  optional string section_subtitle = 2;
35
36  // A module represents a single informational item to be displayed in the list
37  // under the deferred setup page.
38  //
39  // Each module contains a unique id, three sections of text labels (title,
40  // description, footer), the Intent URI to launch when being clicked, the raw
41  // icon, and a boolean to determine whether or not the icon should be colored.
42  // Next index: 8
43  message InfoModule {
44
45    // The id to uniquely identify an InfoModule.
46    optional string id = 1;
47
48    // Contains the title of the module. This is displayed as the first section
49    // of the text content.
50    optional string title = 2;
51
52    // Contains the main paragraphs of the module. This is displayed as the
53    // second section of the text content.
54    optional string description = 3;
55
56    // Contains the footer text of the module. This is displayed as the third
57    // and final section of the text content.
58    optional string footer = 4;
59
60    // Contains the Intent string to be launched when the module is clicked.
61    //
62    // This string could be generated from an `Intent` object through the
63    // `toUri()` method.
64    optional string intent_uri = 5;
65
66    // Contains the icon of the module in raw bytes of bitmap format.
67    optional bytes raw_icon = 6;
68
69    // Determines whether the icon should be colored according to the theme.
70    // Generally speaking, this should be set to true for monoline icons (such
71    // as Material Icons) because their colors change according to the theme.
72    // For icons which their colors should be preserved (such as package icons),
73    // this should be set to false.
74    optional bool should_apply_theme_color_on_icon = 7;
75  }
76
77  // Contains a list of informational modules to be displayed.
78  repeated InfoModule info_module_list = 3;
79
80  // A trailing link is a button item appearing below the info module list.
81  // Next index: 3
82  message TrailingLink {
83    // Contains the text that should be displayed on the link button.
84    optional string text = 1;
85
86    // Contains the Intent string to be launched when the link button is
87    // clicked.
88    //
89    // This string could be generated from an `Intent` object through the
90    // `toUri()` method.
91    optional string intent_uri = 2;
92  }
93
94  // Contains a trailing link to be displayed below the info modules.
95  optional TrailingLink trailing_link = 4;
96}
97