1 /*
2  * Copyright (C) 2022 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.android.providers.media.photopicker.ui;
18 
19 import android.app.admin.DevicePolicyManager;
20 
21 /**
22  * Class containing the required identifiers to update device management resources.
23  *
24  * <p>See {@link DevicePolicyManager#getDrawable} and {@link DevicePolicyManager#getString}.
25  */
26 public class DevicePolicyResources {
27 
28     /**
29      * Class containing the identifiers used to update device management-related system strings.
30      */
31     public static final class Strings {
32         private static final String PREFIX = "MediaProvider.";
33 
34         /**
35          * The text shown to switch to the work profile in PhotoPicker.
36          */
37         public static final String SWITCH_TO_WORK_MESSAGE =
38                 PREFIX + "SWITCH_TO_WORK_MESSAGE";
39 
40         /**
41          * The text shown to switch to the personal profile in PhotoPicker.
42          */
43         public static final String SWITCH_TO_PERSONAL_MESSAGE =
44                 PREFIX + "SWITCH_TO_PERSONAL_MESSAGE";
45 
46         /**
47          * The title for error dialog in PhotoPicker when the admin blocks cross user
48          * interaction for the intent.
49          */
50         public static final String BLOCKED_BY_ADMIN_TITLE =
51                 PREFIX + "BLOCKED_BY_ADMIN_TITLE";
52 
53         /**
54          * The message for error dialog in PhotoPicker when the admin blocks cross user
55          * interaction from the personal profile.
56          */
57         public static final String BLOCKED_FROM_PERSONAL_MESSAGE =
58                 PREFIX + "BLOCKED_FROM_PERSONAL_MESSAGE";
59 
60         /**
61          * The message for error dialog in PhotoPicker when the admin blocks cross user
62          * interaction from the work profile.
63          */
64         public static final String BLOCKED_FROM_WORK_MESSAGE =
65                 PREFIX + "BLOCKED_FROM_WORK_MESSAGE";
66 
67         /**
68          * The title of the error dialog in PhotoPicker when the user tries to switch to work
69          * content, but work profile is off.
70          */
71         public static final String WORK_PROFILE_PAUSED_TITLE =
72                 PREFIX + "WORK_PROFILE_PAUSED_TITLE";
73 
74         /**
75          * The message of the error dialog in PhotoPicker when the user tries to switch to work
76          * content, but work profile is off.
77          */
78         public static final String WORK_PROFILE_PAUSED_MESSAGE =
79                 PREFIX + "WORK_PROFILE_PAUSED_MESSAGE";
80     }
81 
82     /**
83      * Class containing the identifiers used to update device management-related system drawable.
84      */
85     public static final class Drawables {
86         /**
87          * General purpose work profile icon (i.e. generic icon badging).
88          */
89         public static final String WORK_PROFILE_ICON = "WORK_PROFILE_ICON";
90 
91         /**
92          * Class containing the style identifiers used to update device management-related system
93          * drawable.
94          */
95         public static final class Style {
96             /**
97              * A style identifier indicating that the updatable drawable is an outline.
98              */
99             public static final String OUTLINE = "OUTLINE";
100         }
101     }
102 }
103