• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2018 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.google.android.setupcompat.partnerconfig;
18 
19 // TODO: optimize the enum
20 /** Resources that can be customized by partner overlay APK. */
21 public enum PartnerConfig {
22 
23   // Status bar background color or illustration.
24   CONFIG_STATUS_BAR_BACKGROUND(PartnerConfigKey.KEY_STATUS_BAR_BACKGROUND, ResourceType.DRAWABLE),
25 
26   // The same as "WindowLightStatusBar". If set true, the status bar icons will be drawn such
27   // that it is compatible with a light status bar background
28   CONFIG_LIGHT_STATUS_BAR(PartnerConfigKey.KEY_LIGHT_STATUS_BAR, ResourceType.BOOL),
29 
30   // Navigation bar background color
31   CONFIG_NAVIGATION_BAR_BG_COLOR(PartnerConfigKey.KEY_NAVIGATION_BAR_BG_COLOR, ResourceType.COLOR),
32 
33   // Navigation bar divider color
34   CONFIG_NAVIGATION_BAR_DIVIDER_COLOR(
35       PartnerConfigKey.KEY_NAVIGATION_BAR_DIVIDER_COLOR, ResourceType.COLOR),
36 
37   // Background color of the footer bar.
38   CONFIG_FOOTER_BAR_BG_COLOR(PartnerConfigKey.KEY_FOOTER_BAR_BG_COLOR, ResourceType.COLOR),
39 
40   // The min height of the footer buttons
41   CONFIG_FOOTER_BAR_MIN_HEIGHT(PartnerConfigKey.KEY_FOOTER_BAR_MIN_HEIGHT, ResourceType.DIMENSION),
42 
43   // The padding start of the footer bar
44   CONFIG_FOOTER_BAR_PADDING_START(
45       PartnerConfigKey.KEY_FOOTER_BAR_PADDING_START, ResourceType.DIMENSION),
46 
47   // The padding end of the footer bar
48   CONFIG_FOOTER_BAR_PADDING_END(
49       PartnerConfigKey.KEY_FOOTER_BAR_PADDING_END, ResourceType.DIMENSION),
50 
51   // The same as "windowLightNavigationBar". If set true, the navigation bar icons will be drawn
52   // such that it is compatible with a light navigation bar background.
53   CONFIG_LIGHT_NAVIGATION_BAR(PartnerConfigKey.KEY_LIGHT_NAVIGATION_BAR, ResourceType.BOOL),
54 
55   // The font face used in footer buttons. This must be a string reference to a font that is
56   // available in the system. Font references (@font or @xml) are not allowed.
57   CONFIG_FOOTER_BUTTON_FONT_FAMILY(
58       PartnerConfigKey.KEY_FOOTER_BUTTON_FONT_FAMILY, ResourceType.STRING),
59 
60   // The icon for "add another" action. Can be "@null" for no icon.
61   CONFIG_FOOTER_BUTTON_ICON_ADD_ANOTHER(
62       PartnerConfigKey.KEY_FOOTER_BUTTON_ICON_ADD_ANOTHER, ResourceType.DRAWABLE),
63 
64   // The icon for "cancel" action. Can be "@null" for no icon.
65   CONFIG_FOOTER_BUTTON_ICON_CANCEL(
66       PartnerConfigKey.KEY_FOOTER_BUTTON_ICON_CANCEL, ResourceType.DRAWABLE),
67 
68   // The icon for "clear" action. Can be "@null" for no icon.
69   CONFIG_FOOTER_BUTTON_ICON_CLEAR(
70       PartnerConfigKey.KEY_FOOTER_BUTTON_ICON_CLEAR, ResourceType.DRAWABLE),
71 
72   // The icon for "done" action. Can be "@null" for no icon.
73   CONFIG_FOOTER_BUTTON_ICON_DONE(
74       PartnerConfigKey.KEY_FOOTER_BUTTON_ICON_DONE, ResourceType.DRAWABLE),
75 
76   // The icon for "next" action. Can be "@null" for no icon.
77   CONFIG_FOOTER_BUTTON_ICON_NEXT(
78       PartnerConfigKey.KEY_FOOTER_BUTTON_ICON_NEXT, ResourceType.DRAWABLE),
79 
80   // The icon for "opt-in" action. Can be "@null" for no icon.
81   CONFIG_FOOTER_BUTTON_ICON_OPT_IN(
82       PartnerConfigKey.KEY_FOOTER_BUTTON_ICON_OPT_IN, ResourceType.DRAWABLE),
83 
84   // The icon for "skip" action. Can be "@null" for no icon.
85   CONFIG_FOOTER_BUTTON_ICON_SKIP(
86       PartnerConfigKey.KEY_FOOTER_BUTTON_ICON_SKIP, ResourceType.DRAWABLE),
87 
88   // The icon for "stop" action. Can be "@null" for no icon.
89   CONFIG_FOOTER_BUTTON_ICON_STOP(
90       PartnerConfigKey.KEY_FOOTER_BUTTON_ICON_STOP, ResourceType.DRAWABLE),
91 
92   // Top padding of the footer buttons
93   CONFIG_FOOTER_BUTTON_PADDING_TOP(
94       PartnerConfigKey.KEY_FOOTER_BUTTON_PADDING_TOP, ResourceType.DIMENSION),
95 
96   // Bottom padding of the footer buttons
97   CONFIG_FOOTER_BUTTON_PADDING_BOTTOM(
98       PartnerConfigKey.KEY_FOOTER_BUTTON_PADDING_BOTTOM, ResourceType.DIMENSION),
99 
100   // Corner radius of the footer buttons
101   CONFIG_FOOTER_BUTTON_RADIUS(PartnerConfigKey.KEY_FOOTER_BUTTON_RADIUS, ResourceType.DIMENSION),
102 
103   // Ripple color alpha the footer buttons
104   CONFIG_FOOTER_BUTTON_RIPPLE_COLOR_ALPHA(
105       PartnerConfigKey.KEY_FOOTER_BUTTON_RIPPLE_ALPHA, ResourceType.FRACTION),
106 
107   // Text size of the footer buttons
108   CONFIG_FOOTER_BUTTON_TEXT_SIZE(
109       PartnerConfigKey.KEY_FOOTER_BUTTON_TEXT_SIZE, ResourceType.DIMENSION),
110 
111   // The text style of footer buttons {0 = NORMAL}, {1 = BOLD}, {2 = ITALIC}, {3 = BOLD_ITALIC}
112   CONFIG_FOOTER_BUTTON_TEXT_STYLE(
113       PartnerConfigKey.KEY_FOOTER_BUTTON_TEXT_STYLE, ResourceType.INTEGER),
114 
115   // The min height of the footer buttons
116   CONFIG_FOOTER_BUTTON_MIN_HEIGHT(
117       PartnerConfigKey.KEY_FOOTER_BUTTON_MIN_HEIGHT, ResourceType.DIMENSION),
118 
119   // Make the footer buttons all aligned the end
120   CONFIG_FOOTER_BUTTON_ALIGNED_END(
121       PartnerConfigKey.KEY_FOOTER_BUTTON_ALIGNED_END, ResourceType.BOOL),
122 
123   // Disabled background alpha of the footer buttons
124   CONFIG_FOOTER_BUTTON_DISABLED_ALPHA(
125       PartnerConfigKey.KEY_FOOTER_BUTTON_DISABLED_ALPHA, ResourceType.FRACTION),
126 
127   // Disabled background color of the footer buttons
128   CONFIG_FOOTER_BUTTON_DISABLED_BG_COLOR(
129       PartnerConfigKey.KEY_FOOTER_BUTTON_DISABLED_BG_COLOR, ResourceType.COLOR),
130 
131   // Disabled text color of the primary footer button
132   CONFIG_FOOTER_PRIMARY_BUTTON_DISABLED_TEXT_COLOR(
133       PartnerConfigKey.KEY_PRIMARY_BUTTON_DISABLED_TEXT_COLOR, ResourceType.COLOR),
134 
135   // Disabled text color of the secondary footer button
136   CONFIG_FOOTER_SECONDARY_BUTTON_DISABLED_TEXT_COLOR(
137       PartnerConfigKey.KEY_SECONDARY_BUTTON_DISABLED_TEXT_COLOR, ResourceType.COLOR),
138 
139   // Background color of the primary footer button
140   CONFIG_FOOTER_PRIMARY_BUTTON_BG_COLOR(
141       PartnerConfigKey.KEY_FOOTER_PRIMARY_BUTTON_BG_COLOR, ResourceType.COLOR),
142 
143   // Text color of the primary footer button
144   CONFIG_FOOTER_PRIMARY_BUTTON_TEXT_COLOR(
145       PartnerConfigKey.KEY_FOOTER_PRIMARY_BUTTON_TEXT_COLOR, ResourceType.COLOR),
146 
147   // Margin start of the primary footer button
148   CONFIG_FOOTER_PRIMARY_BUTTON_MARGIN_START(
149       PartnerConfigKey.KEY_FOOTER_PRIMARY_BUTTON_MARGIN_START, ResourceType.DIMENSION),
150 
151   // Background color of the secondary footer button
152   CONFIG_FOOTER_SECONDARY_BUTTON_BG_COLOR(
153       PartnerConfigKey.KEY_FOOTER_SECONDARY_BUTTON_BG_COLOR, ResourceType.COLOR),
154 
155   // Text color of the secondary footer button
156   CONFIG_FOOTER_SECONDARY_BUTTON_TEXT_COLOR(
157       PartnerConfigKey.KEY_FOOTER_SECONDARY_BUTTON_TEXT_COLOR, ResourceType.COLOR),
158 
159   // Margin start of the secondary footer button
160   CONFIG_FOOTER_SECONDARY_BUTTON_MARGIN_START(
161       PartnerConfigKey.KEY_FOOTER_SECONDARY_BUTTON_MARGIN_START, ResourceType.DIMENSION),
162 
163   // Background color of layout
164   CONFIG_LAYOUT_BACKGROUND_COLOR(PartnerConfigKey.KEY_LAYOUT_BACKGROUND_COLOR, ResourceType.COLOR),
165 
166   // Margin start of the layout
167   CONFIG_LAYOUT_MARGIN_START(PartnerConfigKey.KEY_LAYOUT_MARGIN_START, ResourceType.DIMENSION),
168 
169   // Margin end of the layout
170   CONFIG_LAYOUT_MARGIN_END(PartnerConfigKey.KEY_LAYOUT_MARGIN_END, ResourceType.DIMENSION),
171 
172   // Middle horizontal spacing of the landscape layout
173   CONFIG_LAND_MIDDLE_HORIZONTAL_SPACING(
174       PartnerConfigKey.KEY_LAND_MIDDLE_HORIZONTAL_SPACING, ResourceType.DIMENSION),
175 
176   // Text color of the header
177   CONFIG_HEADER_TEXT_COLOR(PartnerConfigKey.KEY_HEADER_TEXT_COLOR, ResourceType.COLOR),
178 
179   // Text size of the header
180   CONFIG_HEADER_TEXT_SIZE(PartnerConfigKey.KEY_HEADER_TEXT_SIZE, ResourceType.DIMENSION),
181 
182   // Font family of the header
183   CONFIG_HEADER_FONT_FAMILY(PartnerConfigKey.KEY_HEADER_FONT_FAMILY, ResourceType.STRING),
184 
185   // Margin top of the header text
186   CONFIG_HEADER_TEXT_MARGIN_TOP(
187       PartnerConfigKey.KEY_HEADER_TEXT_MARGIN_TOP, ResourceType.DIMENSION),
188 
189   // Margin bottom of the header text
190   CONFIG_HEADER_TEXT_MARGIN_BOTTOM(
191       PartnerConfigKey.KEY_HEADER_TEXT_MARGIN_BOTTOM, ResourceType.DIMENSION),
192 
193   // Gravity of the header, icon and description
194   CONFIG_LAYOUT_GRAVITY(PartnerConfigKey.KEY_LAYOUT_GRAVITY, ResourceType.STRING),
195 
196   // Margin top of the icon
197   CONFIG_ICON_MARGIN_TOP(PartnerConfigKey.KEY_ICON_MARGIN_TOP, ResourceType.DIMENSION),
198 
199   // Size of the icon
200   CONFIG_ICON_SIZE(PartnerConfigKey.KEY_ICON_SIZE, ResourceType.DIMENSION),
201 
202   // Background color of the header area
203   CONFIG_HEADER_AREA_BACKGROUND_COLOR(
204       PartnerConfigKey.KEY_HEADER_AREA_BACKGROUND_COLOR, ResourceType.COLOR),
205 
206   // Margin bottom of the header container
207   CONFIG_HEADER_CONTAINER_MARGIN_BOTTOM(
208       PartnerConfigKey.KEY_HEADER_CONTAINER_MARGIN_BOTTOM, ResourceType.DIMENSION),
209 
210   // Auto text size enabled status
211   CONFIG_HEADER_AUTO_SIZE_ENABLED(PartnerConfigKey.KEY_HEADER_AUTO_SIZE_ENABLED, ResourceType.BOOL),
212 
213   // Max text size of header when auto size enabled. Ignored if auto size is false.
214   CONFIG_HEADER_AUTO_SIZE_MAX_TEXT_SIZE(
215       PartnerConfigKey.KEY_HEADER_AUTO_SIZE_MAX_TEXT_SIZE, ResourceType.DIMENSION),
216 
217   // Min text size of header when auto size enabled. Ignored if auto size is false.
218   CONFIG_HEADER_AUTO_SIZE_MIN_TEXT_SIZE(
219       PartnerConfigKey.KEY_HEADER_AUTO_SIZE_MIN_TEXT_SIZE, ResourceType.DIMENSION),
220 
221   // The max lines of the max text size when auto size enabled. Ignored if auto size is false.
222   CONFIG_HEADER_AUTO_SIZE_MAX_LINE_OF_MAX_SIZE(
223       PartnerConfigKey.KEY_HEADER_AUTO_SIZE_MAX_LINE_OF_MAX_SIZE, ResourceType.INTEGER),
224 
225   // Extra line spacing of header when auto size enabled. Ignored if auto size is false.
226   CONFIG_HEADER_AUTO_SIZE_LINE_SPACING_EXTRA(
227       PartnerConfigKey.KEY_HEADER_AUTO_SIZE_LINE_SPACING_EXTRA, ResourceType.DIMENSION),
228 
229   // Text size of the description
230   CONFIG_DESCRIPTION_TEXT_SIZE(PartnerConfigKey.KEY_DESCRIPTION_TEXT_SIZE, ResourceType.DIMENSION),
231 
232   // Text color of the description
233   CONFIG_DESCRIPTION_TEXT_COLOR(PartnerConfigKey.KEY_DESCRIPTION_TEXT_COLOR, ResourceType.COLOR),
234 
235   // Link text color of the description
236   CONFIG_DESCRIPTION_LINK_TEXT_COLOR(
237       PartnerConfigKey.KEY_DESCRIPTION_LINK_TEXT_COLOR, ResourceType.COLOR),
238 
239   // Font family of the description
240   CONFIG_DESCRIPTION_FONT_FAMILY(PartnerConfigKey.KEY_DESCRIPTION_FONT_FAMILY, ResourceType.STRING),
241 
242   // Font family of the link text
243   CONFIG_DESCRIPTION_LINK_FONT_FAMILY(
244       PartnerConfigKey.KEY_DESCRIPTION_LINK_FONT_FAMILY, ResourceType.STRING),
245 
246   // Margin top of the description text
247   CONFIG_DESCRIPTION_TEXT_MARGIN_TOP(
248       PartnerConfigKey.KEY_DESCRIPTION_TEXT_MARGIN_TOP, ResourceType.DIMENSION),
249 
250   // Margin bottom of the description text
251   CONFIG_DESCRIPTION_TEXT_MARGIN_BOTTOM(
252       PartnerConfigKey.KEY_DESCRIPTION_TEXT_MARGIN_BOTTOM, ResourceType.DIMENSION),
253 
254   // Font size of the account name
255   CONFIG_ACCOUNT_NAME_TEXT_SIZE(
256       PartnerConfigKey.KEY_ACCOUNT_NAME_TEXT_SIZE, ResourceType.DIMENSION),
257 
258   // Font family of the account name
259   CONFIG_ACCOUNT_NAME_FONT_FAMILY(PartnerConfigKey.KEY_ACCOUNT_NAME_FONT_FAMILY, ResourceType.STRING),
260 
261   // Margin end of the account avatar
262   CONFIG_ACCOUNT_AVATAR_MARGIN_END(
263       PartnerConfigKey.KEY_ACCOUNT_AVATAR_MARGIN_END, ResourceType.DIMENSION),
264 
265   // Size of account avatar
266   CONFIG_ACCOUNT_AVATAR_SIZE(PartnerConfigKey.KEY_ACCOUNT_AVATAR_MAX_SIZE, ResourceType.DIMENSION),
267 
268   // Text size of the body content text
269   CONFIG_CONTENT_TEXT_SIZE(PartnerConfigKey.KEY_CONTENT_TEXT_SIZE, ResourceType.DIMENSION),
270 
271   // Text color of the body content text
272   CONFIG_CONTENT_TEXT_COLOR(PartnerConfigKey.KEY_CONTENT_TEXT_COLOR, ResourceType.COLOR),
273 
274   // Link text color of the body content text
275   CONFIG_CONTENT_LINK_TEXT_COLOR(PartnerConfigKey.KEY_CONTENT_LINK_TEXT_COLOR, ResourceType.COLOR),
276 
277   // Font family of the body content text
278   CONFIG_CONTENT_FONT_FAMILY(PartnerConfigKey.KEY_CONTENT_FONT_FAMILY, ResourceType.STRING),
279 
280   // Gravity of the body content text
281   CONFIG_CONTENT_LAYOUT_GRAVITY(PartnerConfigKey.KEY_CONTENT_LAYOUT_GRAVITY, ResourceType.STRING),
282 
283   // The padding top of the content
284   CONFIG_CONTENT_PADDING_TOP(PartnerConfigKey.KEY_CONTENT_PADDING_TOP, ResourceType.DIMENSION),
285 
286   // The text size of the content info.
287   CONFIG_CONTENT_INFO_TEXT_SIZE(
288       PartnerConfigKey.KEY_CONTENT_INFO_TEXT_SIZE, ResourceType.DIMENSION),
289 
290   // The font family of the content info.
291   CONFIG_CONTENT_INFO_FONT_FAMILY(
292       PartnerConfigKey.KEY_CONTENT_INFO_FONT_FAMILY, ResourceType.STRING),
293 
294   // The text line spacing extra of the content info.
295   CONFIG_CONTENT_INFO_LINE_SPACING_EXTRA(
296       PartnerConfigKey.KEY_CONTENT_INFO_LINE_SPACING_EXTRA, ResourceType.DIMENSION),
297 
298   // The icon size of the content info.
299   CONFIG_CONTENT_INFO_ICON_SIZE(
300       PartnerConfigKey.KEY_CONTENT_INFO_ICON_SIZE, ResourceType.DIMENSION),
301 
302   // The icon margin end of the content info.
303   CONFIG_CONTENT_INFO_ICON_MARGIN_END(
304       PartnerConfigKey.KEY_CONTENT_INFO_ICON_MARGIN_END, ResourceType.DIMENSION),
305 
306   // The padding top of the content info.
307   CONFIG_CONTENT_INFO_PADDING_TOP(
308       PartnerConfigKey.KEY_CONTENT_INFO_PADDING_TOP, ResourceType.DIMENSION),
309 
310   // The padding bottom of the content info.
311   CONFIG_CONTENT_INFO_PADDING_BOTTOM(
312       PartnerConfigKey.KEY_CONTENT_INFO_PADDING_BOTTOM, ResourceType.DIMENSION),
313 
314   // The title text size of list items.
315   CONFIG_ITEMS_TITLE_TEXT_SIZE(PartnerConfigKey.KEY_ITEMS_TITLE_TEXT_SIZE, ResourceType.DIMENSION),
316 
317   // The summary text size of list items.
318   CONFIG_ITEMS_SUMMARY_TEXT_SIZE(
319       PartnerConfigKey.KEY_ITEMS_SUMMARY_TEXT_SIZE, ResourceType.DIMENSION),
320 
321   // The summary margin top of list items.
322   CONFIG_ITEMS_SUMMARY_MARGIN_TOP(
323       PartnerConfigKey.KEY_ITEMS_SUMMARY_MARGIN_TOP, ResourceType.DIMENSION),
324 
325   // The title font family of list items.
326   CONFIG_ITEMS_TITLE_FONT_FAMILY(PartnerConfigKey.KEY_ITEMS_TITLE_FONT_FAMILY, ResourceType.STRING),
327 
328   // The summary font family of list items.
329   CONFIG_ITEMS_SUMMARY_FONT_FAMILY(
330       PartnerConfigKey.KEY_ITEMS_SUMMARY_FONT_FAMILY, ResourceType.STRING),
331 
332   // The padding top of list items.
333   CONFIG_ITEMS_PADDING_TOP(PartnerConfigKey.KEY_ITEMS_PADDING_TOP, ResourceType.DIMENSION),
334 
335   // The padding bottom of list items.
336   CONFIG_ITEMS_PADDING_BOTTOM(PartnerConfigKey.KEY_ITEMS_PADDING_BOTTOM, ResourceType.DIMENSION),
337 
338   // The minimum height of list items.
339   CONFIG_ITEMS_MIN_HEIGHT(PartnerConfigKey.KEY_ITEMS_MIN_HEIGHT, ResourceType.DIMENSION),
340 
341   // The divider of list items are showing on the pages.
342   CONFIG_ITEMS_DIVIDER_SHOWN(PartnerConfigKey.KEY_ITEMS_DIVIDER_SHOWN, ResourceType.BOOL),
343 
344   // The intrinsic width of the card view for foldable/tablet.
345   CONFIG_CARD_VIEW_INTRINSIC_WIDTH(
346       PartnerConfigKey.KEY_CARD_VIEW_INTRINSIC_WIDTH, ResourceType.DIMENSION),
347 
348   // The intrinsic height of the card view for foldable/tablet.
349   CONFIG_CARD_VIEW_INTRINSIC_HEIGHT(
350       PartnerConfigKey.KEY_CARD_VIEW_INTRINSIC_HEIGHT, ResourceType.DIMENSION),
351 
352   // The animation of loading screen used in those activities which is non of below type.
353   CONFIG_PROGRESS_ILLUSTRATION_DEFAULT(
354       PartnerConfigKey.KEY_PROGRESS_ILLUSTRATION_DEFAULT, ResourceType.ILLUSTRATION),
355 
356   // The animation of loading screen used in those activity which is processing account info or
357   // related functions.
358   // For example:com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT
359   CONFIG_PROGRESS_ILLUSTRATION_ACCOUNT(
360       PartnerConfigKey.KEY_PROGRESS_ILLUSTRATION_ACCOUNT, ResourceType.ILLUSTRATION),
361 
362   // The animation of loading screen used in those activity which is processing data connection.
363   // For example:com.android.setupwizard.CAPTIVE_PORTAL
364   CONFIG_PROGRESS_ILLUSTRATION_CONNECTION(
365       PartnerConfigKey.KEY_PROGRESS_ILLUSTRATION_CONNECTION, ResourceType.ILLUSTRATION),
366 
367   // The animation of loading screen used in those activities which is updating device.
368   // For example:com.google.android.setupwizard.COMPAT_EARLY_UPDATE
369   CONFIG_PROGRESS_ILLUSTRATION_UPDATE(
370       PartnerConfigKey.KEY_PROGRESS_ILLUSTRATION_UPDATE, ResourceType.ILLUSTRATION),
371 
372   // The animation of loading screen used in those activities which is finishing setup.
373   // For example:com.google.android.setupwizard.FINAL_HOLD
374   CONFIG_PROGRESS_ILLUSTRATION_FINAL_HOLD(
375       PartnerConfigKey.KEY_PROGRESS_ILLUSTRATION_FINAL_HOLD, ResourceType.ILLUSTRATION),
376 
377   // The animation of loading screen to define how long showing on the pages.
378   CONFIG_PROGRESS_ILLUSTRATION_DISPLAY_MINIMUM_MS(
379       PartnerConfigKey.KEY_PROGRESS_ILLUSTRATION_DISPLAY_MINIMUM_MS, ResourceType.INTEGER),
380 
381   // The animation for S+ devices used in those screens waiting for non of below type.
382   CONFIG_LOADING_LOTTIE_DEFAULT(
383       PartnerConfigKey.KEY_LOADING_LOTTIE_DEFAULT, ResourceType.ILLUSTRATION),
384 
385   // The animation for S+ devices used in those screens which is processing account info or related
386   // functions.
387   // For example:com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT
388   CONFIG_LOADING_LOTTIE_ACCOUNT(
389       PartnerConfigKey.KEY_LOADING_LOTTIE_ACCOUNT, ResourceType.ILLUSTRATION),
390 
391   // The animation for S+ devices used in those screens which is processing data connection.
392   // For example:com.android.setupwizard.CAPTIVE_PORTAL
393   CONFIG_LOADING_LOTTIE_CONNECTION(
394       PartnerConfigKey.KEY_LOADING_LOTTIE_CONNECTION, ResourceType.ILLUSTRATION),
395 
396   // The animation for S+ devices used in those screens which is updating devices.
397   // For example:com.google.android.setupwizard.COMPAT_EARLY_UPDATE
398   CONFIG_LOADING_LOTTIE_UPDATE(
399       PartnerConfigKey.KEY_LOADING_LOTTIE_UPDATE, ResourceType.ILLUSTRATION),
400 
401   // The animation for S+ devices used in those screens which is updating devices.
402   // For example:com.google.android.setupwizard.COMPAT_EARLY_UPDATE
403   CONFIG_LOADING_LOTTIE_FINAL_HOLD(
404       PartnerConfigKey.KEY_LOADING_LOTTIE_FINAL_HOLD, ResourceType.ILLUSTRATION),
405 
406   // The transition type to decide the transition between activities or fragments.
407   CONFIG_TRANSITION_TYPE(PartnerConfigKey.KEY_TRANSITION_TYPE, ResourceType.INTEGER),
408 
409   // The list of keypath and color map, applied to default animation when light theme.
410   CONFIG_LOTTIE_LIGHT_THEME_CUSTOMIZATION_DEFAULT(
411       PartnerConfigKey.KEY_LOADING_LIGHT_THEME_CUSTOMIZATION_DEFAULT, ResourceType.STRING_ARRAY),
412 
413   // The list of keypath and color map, applied to account animation when light theme.
414   CONFIG_LOTTIE_LIGHT_THEME_CUSTOMIZATION_ACCOUNT(
415       PartnerConfigKey.KEY_LOADING_LIGHT_THEME_CUSTOMIZATION_ACCOUNT, ResourceType.STRING_ARRAY),
416 
417   // The list of keypath and color map, applied to connection animation when light theme.
418   CONFIG_LOTTIE_LIGHT_THEME_CUSTOMIZATION_CONNECTION(
419       PartnerConfigKey.KEY_LOADING_LIGHT_THEME_CUSTOMIZATION_CONNECTION, ResourceType.STRING_ARRAY),
420 
421   // The list of keypath and color map, applied to update animation when light theme.
422   CONFIG_LOTTIE_LIGHT_THEME_CUSTOMIZATION_UPDATE(
423       PartnerConfigKey.KEY_LOADING_LIGHT_THEME_CUSTOMIZATION_UPDATE, ResourceType.STRING_ARRAY),
424 
425   // The list of keypath and color map, applied to update animation when light theme.
426   CONFIG_LOTTIE_LIGHT_THEME_CUSTOMIZATION_FINAL_HOLD(
427       PartnerConfigKey.KEY_LOADING_LIGHT_THEME_CUSTOMIZATION_FINAL_HOLD, ResourceType.STRING_ARRAY),
428 
429   // The list of keypath and color map, applied to default animation when dark theme.
430   CONFIG_LOTTIE_DARK_THEME_CUSTOMIZATION_DEFAULT(
431       PartnerConfigKey.KEY_LOADING_DARK_THEME_CUSTOMIZATION_DEFAULT, ResourceType.STRING_ARRAY),
432 
433   // The list of keypath and color map, applied to account animation when dark theme.
434   CONFIG_LOTTIE_DARK_THEME_CUSTOMIZATION_ACCOUNT(
435       PartnerConfigKey.KEY_LOADING_DARK_THEME_CUSTOMIZATION_ACCOUNT, ResourceType.STRING_ARRAY),
436 
437   // The list of keypath and color map, applied to connection animation when dark theme.
438   CONFIG_LOTTIE_DARK_THEME_CUSTOMIZATION_CONNECTION(
439       PartnerConfigKey.KEY_LOADING_DARK_THEME_CUSTOMIZATION_CONNECTION, ResourceType.STRING_ARRAY),
440 
441   // The list of keypath and color map, applied to update animation when dark theme.
442   CONFIG_LOTTIE_DARK_THEME_CUSTOMIZATION_UPDATE(
443       PartnerConfigKey.KEY_LOADING_DARK_THEME_CUSTOMIZATION_UPDATE, ResourceType.STRING_ARRAY),
444 
445   // The list of keypath and color map, applied to final hold animation when dark theme.
446   CONFIG_LOTTIE_DARK_THEME_CUSTOMIZATION_FINAL_HOLD(
447       PartnerConfigKey.KEY_LOADING_DARK_THEME_CUSTOMIZATION_FINAL_HOLD, ResourceType.STRING_ARRAY),
448 
449   // The padding top of the content frame of loading layout.
450   CONFIG_LOADING_LAYOUT_PADDING_TOP(
451       PartnerConfigKey.KEY_LOADING_LAYOUT_CONTENT_PADDING_TOP, ResourceType.DIMENSION),
452 
453   // The padding start of the content frame of loading layout.
454   CONFIG_LOADING_LAYOUT_PADDING_START(
455       PartnerConfigKey.KEY_LOADING_LAYOUT_CONTENT_PADDING_START, ResourceType.DIMENSION),
456 
457   // The padding end of the content frame of loading layout.
458   CONFIG_LOADING_LAYOUT_PADDING_END(
459       PartnerConfigKey.KEY_LOADING_LAYOUT_CONTENT_PADDING_END, ResourceType.DIMENSION),
460 
461   // The padding bottom of the content frame of loading layout.
462   CONFIG_LOADING_LAYOUT_PADDING_BOTTOM(
463       PartnerConfigKey.KEY_LOADING_LAYOUT_CONTENT_PADDING_BOTTOM, ResourceType.DIMENSION),
464 
465   // The height of the header of the loading layout.
466   CONFIG_LOADING_LAYOUT_HEADER_HEIGHT(
467       PartnerConfigKey.KEY_LOADING_LAYOUT_HEADER_HEIGHT, ResourceType.DIMENSION),
468 
469   // Use the fullscreen style lottie animation.
470   CONFIG_LOADING_LAYOUT_FULL_SCREEN_ILLUSTRATION_ENABLED(
471       PartnerConfigKey.KEY_LOADING_LAYOUT_FULL_SCREEN_ILLUSTRATION_ENABLED, ResourceType.BOOL),
472 
473   // Waiting for the animation finished before process to the next page/action.
474   CONFIG_LOADING_LAYOUT_WAIT_FOR_ANIMATION_FINISHED(
475       PartnerConfigKey.KEY_LOADING_LAYOUT_WAIT_FOR_ANIMATION_FINISHED, ResourceType.BOOL),
476 
477   // The margin top of progress bar.
478   CONFIG_PROGRESS_BAR_MARGIN_TOP(
479       PartnerConfigKey.KEY_PROGRESS_BAR_MARGIN_TOP, ResourceType.DIMENSION),
480 
481   // The margin bottom of progress bar.
482   CONFIG_PROGRESS_BAR_MARGIN_BOTTOM(
483       PartnerConfigKey.KEY_PROGRESS_BAR_MARGIN_BOTTOM, ResourceType.DIMENSION);
484 
485   /** Resource type of the partner resources type. */
486   public enum ResourceType {
487     INTEGER,
488     BOOL,
489     COLOR,
490     DRAWABLE,
491     STRING,
492     DIMENSION,
493     FRACTION,
494     ILLUSTRATION,
495     STRING_ARRAY
496   }
497 
498   private final String resourceName;
499   private final ResourceType resourceType;
500 
getResourceType()501   public ResourceType getResourceType() {
502     return resourceType;
503   }
504 
getResourceName()505   public String getResourceName() {
506     return resourceName;
507   }
508 
PartnerConfig(@artnerConfigKey String resourceName, ResourceType type)509   PartnerConfig(@PartnerConfigKey String resourceName, ResourceType type) {
510     this.resourceName = resourceName;
511     this.resourceType = type;
512   }
513 }
514