• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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 package com.android.car.settings.enterprise;
17 
18 import android.content.Context;
19 
20 import com.android.car.settings.R;
21 import com.android.settingslib.enterprise.DeviceAdminStringProvider;
22 
23 /**
24  * Car's implementation of {@link DeviceAdminStringProvider}.
25  */
26 final class DeviceAdminStringProviderImpl implements DeviceAdminStringProvider {
27 
28     private final Context mContext;
29 
DeviceAdminStringProviderImpl(Context context)30     DeviceAdminStringProviderImpl(Context context) {
31         mContext = context;
32     }
33 
34     @Override
getDefaultDisabledByPolicyTitle()35     public String getDefaultDisabledByPolicyTitle() {
36         return mContext.getString(R.string.disabled_by_policy_title);
37     }
38 
39     @Override
getDisallowAdjustVolumeTitle()40     public String getDisallowAdjustVolumeTitle() {
41         return mContext.getString(R.string.disabled_by_policy_title_adjust_volume);
42     }
43 
44     @Override
getDisallowOutgoingCallsTitle()45     public String getDisallowOutgoingCallsTitle() {
46         return mContext.getString(R.string.disabled_by_policy_title_outgoing_calls);
47     }
48 
49     @Override
getDisallowSmsTitle()50     public String getDisallowSmsTitle() {
51         return mContext.getString(R.string.disabled_by_policy_title_sms);
52     }
53 
54     @Override
getDisableCameraTitle()55     public String getDisableCameraTitle() {
56         return mContext.getString(R.string.disabled_by_policy_title_camera);
57     }
58 
59     @Override
getDisableScreenCaptureTitle()60     public String getDisableScreenCaptureTitle() {
61         return mContext.getString(R.string.disabled_by_policy_title_screen_capture);
62     }
63 
64     @Override
getSuspendPackagesTitle()65     public String getSuspendPackagesTitle() {
66         return mContext.getString(R.string.disabled_by_policy_title_suspend_packages);
67     }
68 
69     @Override
getDefaultDisabledByPolicyContent()70     public String getDefaultDisabledByPolicyContent() {
71         return mContext.getString(R.string.default_admin_support_msg);
72     }
73 
74     @Override
getLearnMoreHelpPageUrl()75     public String getLearnMoreHelpPageUrl() {
76         return mContext.getString(R.string.help_url_action_disabled_by_it_admin);
77     }
78 
79     @Override
getDisabledByPolicyTitleForFinancedDevice()80     public String getDisabledByPolicyTitleForFinancedDevice() {
81         return mContext.getString(R.string.disabled_by_policy_title_financed_device);
82     }
83 
84     @Override
getDisabledBiometricsParentConsentTitle()85     public String getDisabledBiometricsParentConsentTitle() {
86         return mContext.getString(R.string.disabled_by_policy_title_biometric_parental_consent);
87     }
88 
89     @Override
getDisabledBiometricsParentConsentContent()90     public String getDisabledBiometricsParentConsentContent() {
91         return mContext.getString(R.string.disabled_by_policy_content_biometric_parental_consent);
92     }
93 
94 }
95