summaryrefslogtreecommitdiff
path: root/packages/SettingsLib/tests/robotests/src/com/android/settingslib/enterprise/FakeDeviceAdminStringProvider.java
blob: 99e13c3254724ede0ef9865604194bb1e9d6b843 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*
 * Copyright (C) 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.settingslib.enterprise;

import android.annotation.Nullable;

class FakeDeviceAdminStringProvider implements DeviceAdminStringProvider {

    static final String DEFAULT_DISABLED_BY_POLICY_TITLE = "default_disabled_by_policy_title";
    static final String DISALLOW_ADJUST_VOLUME_TITLE = "disallow_adjust_volume_title";
    static final String DISALLOW_OUTGOING_CALLS_TITLE = "disallow_outgoing_calls_title";
    static final String DISALLOW_SMS_TITLE = "disallow_sms_title";
    static final String DISABLE_CAMERA_TITLE = "disable_camera_title";
    static final String DISABLE_SCREEN_CAPTURE_TITLE = "disable_screen_capture_title";
    static final String SUSPENDED_PACKAGES_TITLE = "suspended_packages_title";
    static final String DEFAULT_DISABLED_BY_POLICY_CONTENT = "default_disabled_by_policy_content";
    static final String DEFAULT_DISABLED_BY_POLICY_TITLE_FINANCED_DEVICE =
            "default_disabled_by_policy_title_financed_device";
    static final String DEFAULT_BIOMETRIC_TITLE = "biometric_title";
    static final String DEFAULT_BIOMETRIC_CONTENTS = "biometric_contents";
    static final DeviceAdminStringProvider DEFAULT_DEVICE_ADMIN_STRING_PROVIDER =
            new FakeDeviceAdminStringProvider(/* url = */ null);

    private final String mUrl;

    FakeDeviceAdminStringProvider(@Nullable String url) {
        mUrl = url;
    }

    @Override
    public String getDefaultDisabledByPolicyTitle() {
        return DEFAULT_DISABLED_BY_POLICY_TITLE;
    }

    @Override
    public String getDisallowAdjustVolumeTitle() {
        return DISALLOW_ADJUST_VOLUME_TITLE;
    }

    @Override
    public String getDisallowOutgoingCallsTitle() {
        return DISALLOW_OUTGOING_CALLS_TITLE;
    }

    @Override
    public String getDisallowSmsTitle() {
        return DISALLOW_SMS_TITLE;
    }

    @Override
    public String getDisableCameraTitle() {
        return DISABLE_CAMERA_TITLE;
    }

    @Override
    public String getDisableScreenCaptureTitle() {
        return DISABLE_SCREEN_CAPTURE_TITLE;
    }

    @Override
    public String getSuspendPackagesTitle() {
        return SUSPENDED_PACKAGES_TITLE;
    }

    @Override
    public String getDefaultDisabledByPolicyContent() {
        return DEFAULT_DISABLED_BY_POLICY_CONTENT;
    }

    @Override
    public String getLearnMoreHelpPageUrl() {
        return mUrl;
    }

    @Override
    public String getDisabledByPolicyTitleForFinancedDevice() {
        return DEFAULT_DISABLED_BY_POLICY_TITLE_FINANCED_DEVICE;
    }

    @Override
    public String getDisabledBiometricsParentConsentTitle() {
        return DEFAULT_BIOMETRIC_TITLE;
    }

    @Override
    public String getDisabledBiometricsParentConsentContent() {
        return DEFAULT_BIOMETRIC_CONTENTS;
    }

}