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