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 
17 package com.android.car.settingslib.enterprise;
18 
19 import android.annotation.Nullable;
20 
21 import java.util.Date;
22 
23 /**
24  * TODO(b/208511815): copied from phone (but stripped what's not used), should be moved to
25  * SettingsLib
26  */
27 public interface EnterprisePrivacyFeatureProvider {
28 
29     /**
30      * Returns the time at which the Device Owner last retrieved security logs, or {@code null} if
31      * logs were never retrieved by the Device Owner on this device.
32      */
33     @Nullable
getLastSecurityLogRetrievalTime()34     Date getLastSecurityLogRetrievalTime();
35 
36     /**
37      * Returns the time at which the Device Owner last requested a bug report, or {@code null} if no
38      * bug report was ever requested by the Device Owner on this device.
39      */
40     @Nullable
getLastBugReportRequestTime()41     Date getLastBugReportRequestTime();
42 
43     /**
44      * Returns the time at which the Device Owner last retrieved network logs, or {@code null} if
45      * logs were never retrieved by the Device Owner on this device.
46      */
47     @Nullable
getLastNetworkLogRetrievalTime()48     Date getLastNetworkLogRetrievalTime();
49 
50     /**
51      * Returns the label of the current user's input method if that input method was set by a Device
52      * Owner or Profile Owner in that user. Otherwise, returns {@code null}.
53      */
54     @Nullable
getImeLabelIfOwnerSet()55     String getImeLabelIfOwnerSet();
56 
57     /**
58      * Returns the number of failed login attempts that the Device Owner or Profile Owner allows
59      * before the current user is wiped, or zero if no such limit is set.
60      */
getMaximumFailedPasswordsBeforeWipeInCurrentUser()61     int getMaximumFailedPasswordsBeforeWipeInCurrentUser();
62 }
63