• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2014 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.systemui.statusbar.policy;
17 
18 import android.app.admin.DeviceAdminInfo;
19 import android.content.ComponentName;
20 import android.graphics.drawable.Drawable;
21 
22 import com.android.systemui.Dumpable;
23 import com.android.systemui.statusbar.policy.SecurityController.SecurityControllerCallback;
24 
25 public interface SecurityController extends CallbackController<SecurityControllerCallback>,
26         Dumpable {
27     /** Whether the device has device owner, even if not on this user. */
isDeviceManaged()28     boolean isDeviceManaged();
hasProfileOwner()29     boolean hasProfileOwner();
hasWorkProfile()30     boolean hasWorkProfile();
31     /** Whether the work profile is turned on. */
isWorkProfileOn()32     boolean isWorkProfileOn();
33     /** Whether this device is organization-owned with a work profile **/
isProfileOwnerOfOrganizationOwnedDevice()34     boolean isProfileOwnerOfOrganizationOwnedDevice();
getDeviceOwnerName()35     String getDeviceOwnerName();
getProfileOwnerName()36     String getProfileOwnerName();
getDeviceOwnerOrganizationName()37     CharSequence getDeviceOwnerOrganizationName();
getWorkProfileOrganizationName()38     CharSequence getWorkProfileOrganizationName();
39     /** Device owner component even if not on this user. **/
getDeviceOwnerComponentOnAnyUser()40     ComponentName getDeviceOwnerComponentOnAnyUser();
41     /** Device owner type for a device owner. **/
getDeviceOwnerType(ComponentName admin)42     int getDeviceOwnerType(ComponentName admin);
isNetworkLoggingEnabled()43     boolean isNetworkLoggingEnabled();
isVpnEnabled()44     boolean isVpnEnabled();
isVpnRestricted()45     boolean isVpnRestricted();
46     /** Whether the VPN app should use branded VPN iconography.  */
isVpnBranded()47     boolean isVpnBranded();
getPrimaryVpnName()48     String getPrimaryVpnName();
getWorkProfileVpnName()49     String getWorkProfileVpnName();
hasCACertInCurrentUser()50     boolean hasCACertInCurrentUser();
hasCACertInWorkProfile()51     boolean hasCACertInWorkProfile();
onUserSwitched(int newUserId)52     void onUserSwitched(int newUserId);
53     /** Whether or not parental controls is enabled */
isParentalControlsEnabled()54     boolean isParentalControlsEnabled();
55     /** DeviceAdminInfo for active admin */
getDeviceAdminInfo()56     DeviceAdminInfo getDeviceAdminInfo();
57     /** Icon for admin */
getIcon(DeviceAdminInfo info)58     Drawable getIcon(DeviceAdminInfo info);
59     /** Label for admin */
getLabel(DeviceAdminInfo info)60     CharSequence getLabel(DeviceAdminInfo info);
61 
62     public interface SecurityControllerCallback {
onStateChanged()63         void onStateChanged();
64     }
65 
66 }
67