Populate Enterprise Privacy Settings page - batch 1
This CL adds the first batch of items to the Privacy Settings page. These are all the items that fall into the "What types of information can your organization see?" category and do not require deeper Framework changes. Further batches are to come in separate CLs. Test: make RunSettingsRoboTests Bug: 32692748 Change-Id: I460093bc45ed0e5baab2a5cdf9833e654d436cc9
This commit is contained in:
@@ -17,21 +17,23 @@
|
||||
package com.android.settings.enterprise;
|
||||
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.settings.applications.PackageManagerWrapper;
|
||||
|
||||
public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFeatureProvider {
|
||||
|
||||
private final Context mContext;
|
||||
private final DevicePolicyManagerWrapper mDpm;
|
||||
private final PackageManagerWrapper mPm;
|
||||
|
||||
public EnterprisePrivacyFeatureProviderImpl(Context context, DevicePolicyManagerWrapper dpm) {
|
||||
mContext = context.getApplicationContext();
|
||||
public EnterprisePrivacyFeatureProviderImpl(DevicePolicyManagerWrapper dpm,
|
||||
PackageManagerWrapper pm) {
|
||||
mDpm = dpm;
|
||||
mPm = pm;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasDeviceOwner() {
|
||||
if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN)) {
|
||||
if (!mPm.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN)) {
|
||||
return false;
|
||||
}
|
||||
return mDpm.getDeviceOwnerComponentOnAnyUser() != null;
|
||||
|
Reference in New Issue
Block a user