diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index 2ba54d2..b1ed38f 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -94,7 +94,6 @@
 import com.android.internal.util.ArrayUtils;
 import com.android.internal.widget.LockPatternUtils;
 import com.android.settings.password.ChooseLockSettingsHelper;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 
 import java.net.InetAddress;
 import java.util.Iterator;
@@ -874,7 +873,7 @@
      * @param packageName package to check about
      */
     public static boolean isProfileOrDeviceOwner(UserManager userManager,
-            DevicePolicyManagerWrapper devicePolicyManager, String packageName) {
+            DevicePolicyManager devicePolicyManager, String packageName) {
         List<UserInfo> userInfos = userManager.getUsers();
         if (devicePolicyManager.isDeviceOwnerAppOnAnyUser(packageName)) {
             return true;
diff --git a/src/com/android/settings/accounts/RemoveAccountPreferenceController.java b/src/com/android/settings/accounts/RemoveAccountPreferenceController.java
index 98ab504..24d3ea1 100644
--- a/src/com/android/settings/accounts/RemoveAccountPreferenceController.java
+++ b/src/com/android/settings/accounts/RemoveAccountPreferenceController.java
@@ -25,7 +25,6 @@
 import android.app.AlertDialog;
 import android.app.Dialog;
 import android.app.Fragment;
-import android.app.admin.DevicePolicyManager;
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
@@ -37,13 +36,11 @@
 import android.view.View.OnClickListener;
 import android.widget.Button;
 
-import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.applications.LayoutPreference;
 import com.android.settings.core.PreferenceControllerMixin;
 import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.RestrictedLockUtils;
 import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
 import com.android.settingslib.core.AbstractPreferenceController;
@@ -58,26 +55,17 @@
     private Account mAccount;
     private Fragment mParentFragment;
     private UserHandle mUserHandle;
-    private DevicePolicyManagerWrapper mDpm;
 
     public RemoveAccountPreferenceController(Context context, Fragment parent) {
-        this(context, parent, new DevicePolicyManagerWrapper(
-                (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE)));
-    }
-
-    @VisibleForTesting
-    RemoveAccountPreferenceController(Context context, Fragment parent,
-            DevicePolicyManagerWrapper dpm) {
         super(context);
         mParentFragment = parent;
-        mDpm = dpm;
     }
 
     @Override
     public void displayPreference(PreferenceScreen screen) {
         super.displayPreference(screen);
         final LayoutPreference removeAccountPreference =
-            (LayoutPreference) screen.findPreference(KEY_REMOVE_ACCOUNT);
+                (LayoutPreference) screen.findPreference(KEY_REMOVE_ACCOUNT);
         Button removeAccountButton = (Button) removeAccountPreference.findViewById(R.id.button);
         removeAccountButton.setOnClickListener(this);
     }
@@ -96,7 +84,7 @@
     public void onClick(View v) {
         if (mUserHandle != null) {
             final EnforcedAdmin admin = RestrictedLockUtils.checkIfRestrictionEnforced(mContext,
-                UserManager.DISALLOW_MODIFY_ACCOUNTS, mUserHandle.getIdentifier());
+                    UserManager.DISALLOW_MODIFY_ACCOUNTS, mUserHandle.getIdentifier());
             if (admin != null) {
                 RestrictedLockUtils.sendShowAdminSupportDetailsIntent(mContext, admin);
                 return;
@@ -148,11 +136,11 @@
         public Dialog onCreateDialog(Bundle savedInstanceState) {
             final Context context = getActivity();
             return new AlertDialog.Builder(context)
-                .setTitle(R.string.really_remove_account_title)
-                .setMessage(R.string.really_remove_account_message)
-                .setNegativeButton(android.R.string.cancel, null)
-                .setPositiveButton(R.string.remove_account_label, this)
-                .create();
+                    .setTitle(R.string.really_remove_account_title)
+                    .setMessage(R.string.really_remove_account_message)
+                    .setNegativeButton(android.R.string.cancel, null)
+                    .setPositiveButton(R.string.remove_account_label, this)
+                    .create();
         }
 
         @Override
@@ -174,7 +162,7 @@
                             boolean failed = true;
                             try {
                                 if (future.getResult()
-                                    .getBoolean(AccountManager.KEY_BOOLEAN_RESULT)) {
+                                        .getBoolean(AccountManager.KEY_BOOLEAN_RESULT)) {
                                     failed = false;
                                 }
                             } catch (OperationCanceledException e) {
@@ -216,10 +204,10 @@
             final Context context = getActivity();
 
             return new AlertDialog.Builder(context)
-                .setTitle(R.string.really_remove_account_title)
-                .setMessage(R.string.remove_account_failed)
-                .setPositiveButton(android.R.string.ok, null)
-                .create();
+                    .setTitle(R.string.really_remove_account_title)
+                    .setMessage(R.string.remove_account_failed)
+                    .setPositiveButton(android.R.string.ok, null)
+                    .create();
         }
 
         @Override
diff --git a/src/com/android/settings/applications/AppInfoBase.java b/src/com/android/settings/applications/AppInfoBase.java
index fb63df2..f8ed315 100644
--- a/src/com/android/settings/applications/AppInfoBase.java
+++ b/src/com/android/settings/applications/AppInfoBase.java
@@ -47,7 +47,6 @@
 import com.android.settings.core.SubSettingLauncher;
 import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
 import com.android.settings.overlay.FeatureFactory;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.RestrictedLockUtils;
 import com.android.settingslib.applications.ApplicationsState;
 import com.android.settingslib.applications.ApplicationsState.AppEntry;
@@ -75,7 +74,7 @@
     protected String mPackageName;
 
     protected IUsbManager mUsbManager;
-    protected DevicePolicyManagerWrapper mDpm;
+    protected DevicePolicyManager mDpm;
     protected UserManager mUserManager;
     protected PackageManager mPm;
 
@@ -94,8 +93,7 @@
                 .getApplicationFeatureProvider(activity);
         mState = ApplicationsState.getInstance(activity.getApplication());
         mSession = mState.newSession(this, getLifecycle());
-        mDpm = new DevicePolicyManagerWrapper(
-                (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE));
+        mDpm = (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE);
         mUserManager = (UserManager) activity.getSystemService(Context.USER_SERVICE);
         mPm = activity.getPackageManager();
         IBinder b = ServiceManager.getService(Context.USB_SERVICE);
@@ -161,10 +159,10 @@
     }
 
     protected void setIntentAndFinish(boolean finish, boolean appChanged) {
-        if (localLOGV) Log.i(TAG, "appChanged="+appChanged);
+        if (localLOGV) Log.i(TAG, "appChanged=" + appChanged);
         Intent intent = new Intent();
         intent.putExtra(ManageApplications.APP_CHG, appChanged);
-        SettingsActivity sa = (SettingsActivity)getActivity();
+        SettingsActivity sa = (SettingsActivity) getActivity();
         sa.finishPreferencePanel(Activity.RESULT_OK, intent);
         mFinishing = true;
     }
@@ -176,6 +174,7 @@
     }
 
     protected abstract boolean refreshUi();
+
     protected abstract AlertDialog createDialog(int id, int errorCode);
 
     @Override
diff --git a/src/com/android/settings/applications/AppWithAdminGrantedPermissionsCounter.java b/src/com/android/settings/applications/AppWithAdminGrantedPermissionsCounter.java
index a1bf14e..77cecd2 100644
--- a/src/com/android/settings/applications/AppWithAdminGrantedPermissionsCounter.java
+++ b/src/com/android/settings/applications/AppWithAdminGrantedPermissionsCounter.java
@@ -22,7 +22,6 @@
 import android.os.RemoteException;
 import android.os.UserHandle;
 
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settings.wrapper.IPackageManagerWrapper;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
 
@@ -34,11 +33,11 @@
 
     private final String[] mPermissions;
     private final IPackageManagerWrapper mPackageManagerService;
-    private final DevicePolicyManagerWrapper mDevicePolicyManager;
+    private final DevicePolicyManager mDevicePolicyManager;
 
     public AppWithAdminGrantedPermissionsCounter(Context context, String[] permissions,
             PackageManagerWrapper packageManager, IPackageManagerWrapper packageManagerService,
-            DevicePolicyManagerWrapper devicePolicyManager) {
+            DevicePolicyManager devicePolicyManager) {
         super(context, packageManager);
         mPermissions = permissions;
         mPackageManagerService = packageManagerService;
@@ -52,7 +51,7 @@
     }
 
     public static boolean includeInCount(String[] permissions,
-            DevicePolicyManagerWrapper devicePolicyManager, PackageManagerWrapper packageManager,
+            DevicePolicyManager devicePolicyManager, PackageManagerWrapper packageManager,
             IPackageManagerWrapper packageManagerService, ApplicationInfo info) {
         if (info.targetSdkVersion >= Build.VERSION_CODES.M) {
             // The app uses run-time permissions. Check whether one or more of the permissions were
@@ -70,7 +69,7 @@
         // permissions and was installed by enterprise policy, implicitly granting permissions.
         if (packageManager.getInstallReason(info.packageName,
                 new UserHandle(UserHandle.getUserId(info.uid)))
-                        != PackageManager.INSTALL_REASON_POLICY) {
+                != PackageManager.INSTALL_REASON_POLICY) {
             return false;
         }
         try {
diff --git a/src/com/android/settings/applications/AppWithAdminGrantedPermissionsLister.java b/src/com/android/settings/applications/AppWithAdminGrantedPermissionsLister.java
index dd5a807..655758a 100644
--- a/src/com/android/settings/applications/AppWithAdminGrantedPermissionsLister.java
+++ b/src/com/android/settings/applications/AppWithAdminGrantedPermissionsLister.java
@@ -16,9 +16,10 @@
 
 package com.android.settings.applications;
 
+import android.app.admin.DevicePolicyManager;
 import android.content.pm.ApplicationInfo;
 import android.os.UserManager;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
+
 import com.android.settings.wrapper.IPackageManagerWrapper;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
 
@@ -29,11 +30,11 @@
 public abstract class AppWithAdminGrantedPermissionsLister extends AppLister {
     private final String[] mPermissions;
     private final IPackageManagerWrapper mPackageManagerService;
-    private final DevicePolicyManagerWrapper mDevicePolicyManager;
+    private final DevicePolicyManager mDevicePolicyManager;
 
     public AppWithAdminGrantedPermissionsLister(String[] permissions,
             PackageManagerWrapper packageManager, IPackageManagerWrapper packageManagerService,
-            DevicePolicyManagerWrapper devicePolicyManager, UserManager userManager) {
+            DevicePolicyManager devicePolicyManager, UserManager userManager) {
         super(packageManager, userManager);
         mPermissions = permissions;
         mPackageManagerService = packageManagerService;
diff --git a/src/com/android/settings/applications/ApplicationFeatureProviderImpl.java b/src/com/android/settings/applications/ApplicationFeatureProviderImpl.java
index e1f434e..cd54f79 100644
--- a/src/com/android/settings/applications/ApplicationFeatureProviderImpl.java
+++ b/src/com/android/settings/applications/ApplicationFeatureProviderImpl.java
@@ -16,6 +16,7 @@
 
 package com.android.settings.applications;
 
+import android.app.admin.DevicePolicyManager;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.ComponentInfo;
@@ -26,7 +27,6 @@
 import android.os.UserManager;
 import android.util.ArraySet;
 
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settings.wrapper.IPackageManagerWrapper;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
 
@@ -39,11 +39,11 @@
     private final Context mContext;
     private final PackageManagerWrapper mPm;
     private final IPackageManagerWrapper mPms;
-    private final DevicePolicyManagerWrapper mDpm;
+    private final DevicePolicyManager mDpm;
     private final UserManager mUm;
 
     public ApplicationFeatureProviderImpl(Context context, PackageManagerWrapper pm,
-            IPackageManagerWrapper pms, DevicePolicyManagerWrapper dpm) {
+            IPackageManagerWrapper pms, DevicePolicyManager dpm) {
         mContext = context.getApplicationContext();
         mPm = pm;
         mPms = pms;
@@ -150,7 +150,7 @@
         CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter(Context context,
                 String[] permissions, PackageManagerWrapper packageManager,
                 IPackageManagerWrapper packageManagerService,
-                DevicePolicyManagerWrapper devicePolicyManager, NumberOfAppsCallback callback) {
+                DevicePolicyManager devicePolicyManager, NumberOfAppsCallback callback) {
             super(context, permissions, packageManager, packageManagerService, devicePolicyManager);
             mCallback = callback;
         }
@@ -182,7 +182,7 @@
 
         CurrentUserAppWithAdminGrantedPermissionsLister(String[] permissions,
                 PackageManagerWrapper packageManager, IPackageManagerWrapper packageManagerService,
-                DevicePolicyManagerWrapper devicePolicyManager, UserManager userManager,
+                DevicePolicyManager devicePolicyManager, UserManager userManager,
                 ListOfAppsCallback callback) {
             super(permissions, packageManager, packageManagerService, devicePolicyManager,
                     userManager);
diff --git a/src/com/android/settings/applications/appinfo/AppActionButtonPreferenceController.java b/src/com/android/settings/applications/appinfo/AppActionButtonPreferenceController.java
index 6e978dc..da90909 100644
--- a/src/com/android/settings/applications/appinfo/AppActionButtonPreferenceController.java
+++ b/src/com/android/settings/applications/appinfo/AppActionButtonPreferenceController.java
@@ -44,7 +44,6 @@
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.overlay.FeatureFactory;
 import com.android.settings.widget.ActionButtonPreference;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.RestrictedLockUtils;
 import com.android.settingslib.applications.AppUtils;
 import com.android.settingslib.applications.ApplicationsState.AppEntry;
@@ -67,7 +66,7 @@
     private final ApplicationFeatureProvider mApplicationFeatureProvider;
 
     private int mUserId;
-    private DevicePolicyManagerWrapper mDpm;
+    private DevicePolicyManager mDpm;
     private UserManager mUserManager;
     private PackageManager mPm;
 
@@ -94,7 +93,7 @@
     @Override
     public int getAvailabilityStatus() {
         return AppUtils.isInstant(mParent.getPackageInfo().applicationInfo)
-            ? DISABLED_FOR_USER : AVAILABLE;
+                ? DISABLED_FOR_USER : AVAILABLE;
     }
 
     @Override
@@ -112,8 +111,7 @@
             mPm = mContext.getPackageManager();
         }
         if (mDpm == null) {
-            mDpm = new DevicePolicyManagerWrapper(
-                    (DevicePolicyManager) mContext.getSystemService(Context.DEVICE_POLICY_SERVICE));
+            mDpm = (DevicePolicyManager) mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
         }
         if (mUserManager == null) {
             mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
@@ -125,7 +123,7 @@
         final List<ResolveInfo> homeActivities = new ArrayList<ResolveInfo>();
         mPm.getHomeActivities(homeActivities);
         mHomePackages.clear();
-        for (int i = 0; i< homeActivities.size(); i++) {
+        for (int i = 0; i < homeActivities.size(); i++) {
             final ResolveInfo ri = homeActivities.get(i);
             final String activityPkg = ri.activityInfo.packageName;
             mHomePackages.add(activityPkg);
@@ -187,7 +185,7 @@
                 enabled = false;
             } else {
                 ArrayList<ResolveInfo> homeActivities = new ArrayList<ResolveInfo>();
-                ComponentName currentDefaultHome  = mPm.getHomeActivities(homeActivities);
+                ComponentName currentDefaultHome = mPm.getHomeActivities(homeActivities);
                 if (currentDefaultHome == null) {
                     // No preferred default, so permit uninstall only when
                     // there is more than one candidate
@@ -284,7 +282,7 @@
             Log.w(TAG, "User can't force stop device admin");
             updateForceStopButton(false);
         } else if (mPm.isPackageStateProtected(packageInfo.packageName,
-            UserHandle.getUserId(appEntry.info.uid))) {
+                UserHandle.getUserId(appEntry.info.uid))) {
             Log.w(TAG, "User can't force stop protected packages");
             updateForceStopButton(false);
         } else if (AppUtils.isInstant(packageInfo.applicationInfo)) {
@@ -298,7 +296,7 @@
         } else {
             final Intent intent = new Intent(Intent.ACTION_QUERY_PACKAGE_RESTART,
                     Uri.fromParts("package", appEntry.info.packageName, null));
-            intent.putExtra(Intent.EXTRA_PACKAGES, new String[] { appEntry.info.packageName });
+            intent.putExtra(Intent.EXTRA_PACKAGES, new String[] {appEntry.info.packageName});
             intent.putExtra(Intent.EXTRA_UID, appEntry.info.uid);
             intent.putExtra(Intent.EXTRA_USER_HANDLE, UserHandle.getUserId(appEntry.info.uid));
             Log.d(TAG, "Sending broadcast to query restart status for "
diff --git a/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java b/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
index eddbd96..4a0db4e 100755
--- a/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
+++ b/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
@@ -55,7 +55,6 @@
 import com.android.settings.core.SubSettingLauncher;
 import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
 import com.android.settings.dashboard.DashboardFragment;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.RestrictedLockUtils;
 import com.android.settingslib.applications.AppUtils;
 import com.android.settingslib.applications.ApplicationsState;
@@ -122,7 +121,7 @@
     private int mUserId;
     private String mPackageName;
 
-    private DevicePolicyManagerWrapper mDpm;
+    private DevicePolicyManager mDpm;
     private UserManager mUserManager;
     private PackageManager mPm;
 
@@ -198,8 +197,7 @@
         super.onCreate(icicle);
         mFinishing = false;
         final Activity activity = getActivity();
-        mDpm = new DevicePolicyManagerWrapper(
-                (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE));
+        mDpm = (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE);
         mUserManager = (UserManager) activity.getSystemService(Context.USER_SERVICE);
         mPm = activity.getPackageManager();
 
diff --git a/src/com/android/settings/display/TimeoutPreferenceController.java b/src/com/android/settings/display/TimeoutPreferenceController.java
index 84f9641..07146f9 100644
--- a/src/com/android/settings/display/TimeoutPreferenceController.java
+++ b/src/com/android/settings/display/TimeoutPreferenceController.java
@@ -15,6 +15,7 @@
 
 import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
 
+import android.app.admin.DevicePolicyManager;
 import android.content.Context;
 import android.os.UserHandle;
 import android.os.UserManager;
@@ -25,7 +26,6 @@
 import com.android.settings.R;
 import com.android.settings.TimeoutListPreference;
 import com.android.settings.core.PreferenceControllerMixin;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.RestrictedLockUtils;
 import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
 import com.android.settingslib.core.AbstractPreferenceController;
@@ -61,7 +61,8 @@
         final long currentTimeout = Settings.System.getLong(mContext.getContentResolver(),
                 SCREEN_OFF_TIMEOUT, FALLBACK_SCREEN_TIMEOUT_VALUE);
         timeoutListPreference.setValue(String.valueOf(currentTimeout));
-        final DevicePolicyManagerWrapper dpm = DevicePolicyManagerWrapper.from(mContext);
+        final DevicePolicyManager dpm =
+                (DevicePolicyManager) mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
         if (dpm != null) {
             final RestrictedLockUtils.EnforcedAdmin admin =
                     RestrictedLockUtils.checkIfMaximumTimeToLockIsSet(mContext);
diff --git a/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImpl.java b/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImpl.java
index 8876d25..17d7f0d 100644
--- a/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImpl.java
+++ b/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImpl.java
@@ -16,6 +16,7 @@
 
 package com.android.settings.enterprise;
 
+import android.app.admin.DevicePolicyManager;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
@@ -32,7 +33,6 @@
 import com.android.settings.R;
 import com.android.settings.vpn2.VpnUtils;
 import com.android.settings.wrapper.ConnectivityManagerWrapper;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
 
 import java.util.Date;
@@ -41,7 +41,7 @@
 public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFeatureProvider {
 
     private final Context mContext;
-    private final DevicePolicyManagerWrapper mDpm;
+    private final DevicePolicyManager mDpm;
     private final PackageManagerWrapper mPm;
     private final UserManager mUm;
     private final ConnectivityManagerWrapper mCm;
@@ -49,7 +49,7 @@
 
     private static final int MY_USER_ID = UserHandle.myUserId();
 
-    public EnterprisePrivacyFeatureProviderImpl(Context context, DevicePolicyManagerWrapper dpm,
+    public EnterprisePrivacyFeatureProviderImpl(Context context, DevicePolicyManager dpm,
             PackageManagerWrapper pm, UserManager um, ConnectivityManagerWrapper cm,
             Resources resources) {
         mContext = context.getApplicationContext();
diff --git a/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetail.java b/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetail.java
index 1ecb2a8..0c82faa 100644
--- a/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetail.java
+++ b/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetail.java
@@ -54,7 +54,6 @@
 import com.android.settings.fuelgauge.batterytip.BatteryTipPreferenceController;
 import com.android.settings.fuelgauge.batterytip.tips.BatteryTip;
 import com.android.settings.widget.EntityHeaderController;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.applications.AppUtils;
 import com.android.settingslib.applications.ApplicationsState;
 import com.android.settingslib.core.AbstractPreferenceController;
@@ -116,7 +115,7 @@
     private AppButtonsPreferenceController mAppButtonsPreferenceController;
     private BackgroundActivityPreferenceController mBackgroundActivityPreferenceController;
 
-    private DevicePolicyManagerWrapper mDpm;
+    private DevicePolicyManager mDpm;
     private UserManager mUserManager;
     private PackageManager mPackageManager;
     private List<Anomaly> mAnomalies;
@@ -167,7 +166,8 @@
                 .launch();
     }
 
-    private static @UserIdInt int getUserIdToLaunchAdvancePowerUsageDetail(BatterySipper bs) {
+    private static @UserIdInt
+    int getUserIdToLaunchAdvancePowerUsageDetail(BatterySipper bs) {
         if (bs.drainType == BatterySipper.DrainType.USER) {
             return ActivityManager.getCurrentUser();
         }
@@ -206,8 +206,7 @@
         super.onAttach(activity);
 
         mState = ApplicationsState.getInstance(getActivity().getApplication());
-        mDpm = new DevicePolicyManagerWrapper(
-                (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE));
+        mDpm = (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE);
         mUserManager = (UserManager) activity.getSystemService(Context.USER_SERVICE);
         mPackageManager = activity.getPackageManager();
         mBatteryUtils = BatteryUtils.getInstance(getContext());
diff --git a/src/com/android/settings/fuelgauge/AppButtonsPreferenceController.java b/src/com/android/settings/fuelgauge/AppButtonsPreferenceController.java
index 854b855..8c4b4d8 100644
--- a/src/com/android/settings/fuelgauge/AppButtonsPreferenceController.java
+++ b/src/com/android/settings/fuelgauge/AppButtonsPreferenceController.java
@@ -19,6 +19,7 @@
 import android.app.Activity;
 import android.app.ActivityManager;
 import android.app.Fragment;
+import android.app.admin.DevicePolicyManager;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
@@ -50,7 +51,6 @@
 import com.android.settings.core.PreferenceControllerMixin;
 import com.android.settings.overlay.FeatureFactory;
 import com.android.settings.widget.ActionButtonPreference;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.RestrictedLockUtils;
 import com.android.settingslib.applications.AppUtils;
 import com.android.settingslib.applications.ApplicationsState;
@@ -102,7 +102,7 @@
     private final int mRequestRemoveDeviceAdmin;
 
     private ApplicationsState.Session mSession;
-    private DevicePolicyManagerWrapper mDpm;
+    private DevicePolicyManager mDpm;
     private UserManager mUserManager;
     private PackageManager mPm;
     private SettingsActivity mActivity;
@@ -118,7 +118,7 @@
 
     public AppButtonsPreferenceController(SettingsActivity activity, Fragment fragment,
             Lifecycle lifecycle, String packageName, ApplicationsState state,
-            DevicePolicyManagerWrapper dpm, UserManager userManager,
+            DevicePolicyManager dpm, UserManager userManager,
             PackageManager packageManager, int requestUninstall, int requestRemoveDeviceAdmin) {
         super(activity);
 
@@ -477,7 +477,7 @@
         } else {
             Intent intent = new Intent(Intent.ACTION_QUERY_PACKAGE_RESTART,
                     Uri.fromParts("package", mAppEntry.info.packageName, null));
-            intent.putExtra(Intent.EXTRA_PACKAGES, new String[]{mAppEntry.info.packageName});
+            intent.putExtra(Intent.EXTRA_PACKAGES, new String[] {mAppEntry.info.packageName});
             intent.putExtra(Intent.EXTRA_UID, mAppEntry.info.uid);
             intent.putExtra(Intent.EXTRA_USER_HANDLE, UserHandle.getUserId(mAppEntry.info.uid));
             Log.d(TAG, "Sending broadcast to query restart status for "
diff --git a/src/com/android/settings/fuelgauge/BackgroundActivityPreferenceController.java b/src/com/android/settings/fuelgauge/BackgroundActivityPreferenceController.java
index c117b9a..3675a83 100644
--- a/src/com/android/settings/fuelgauge/BackgroundActivityPreferenceController.java
+++ b/src/com/android/settings/fuelgauge/BackgroundActivityPreferenceController.java
@@ -30,7 +30,6 @@
 import com.android.settings.fuelgauge.batterytip.tips.BatteryTip;
 import com.android.settings.fuelgauge.batterytip.tips.RestrictAppTip;
 import com.android.settings.fuelgauge.batterytip.tips.UnrestrictAppTip;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.core.AbstractPreferenceController;
 import com.android.settingslib.fuelgauge.PowerWhitelistBackend;
 
@@ -48,7 +47,7 @@
     private final UserManager mUserManager;
     private final int mUid;
     @VisibleForTesting
-    DevicePolicyManagerWrapper mDpm;
+    DevicePolicyManager mDpm;
     @VisibleForTesting
     BatteryUtils mBatteryUtils;
     private InstrumentedPreferenceFragment mFragment;
@@ -66,8 +65,7 @@
         super(context);
         mPowerWhitelistBackend = backend;
         mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
-        mDpm = new DevicePolicyManagerWrapper(
-                (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE));
+        mDpm = (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);
         mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
         mUid = uid;
         mFragment = fragment;
diff --git a/src/com/android/settings/overlay/FeatureFactoryImpl.java b/src/com/android/settings/overlay/FeatureFactoryImpl.java
index c521eb8..f0bbe2e 100644
--- a/src/com/android/settings/overlay/FeatureFactoryImpl.java
+++ b/src/com/android/settings/overlay/FeatureFactoryImpl.java
@@ -52,7 +52,6 @@
 import com.android.settings.users.UserFeatureProvider;
 import com.android.settings.users.UserFeatureProviderImpl;
 import com.android.settings.wrapper.ConnectivityManagerWrapper;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settings.wrapper.IPackageManagerWrapper;
 import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
@@ -114,8 +113,8 @@
             mApplicationFeatureProvider = new ApplicationFeatureProviderImpl(context,
                     new PackageManagerWrapper(context.getPackageManager()),
                     new IPackageManagerWrapper(AppGlobals.getPackageManager()),
-                    new DevicePolicyManagerWrapper((DevicePolicyManager) context
-                            .getSystemService(Context.DEVICE_POLICY_SERVICE)));
+                    (DevicePolicyManager) context
+                            .getSystemService(Context.DEVICE_POLICY_SERVICE));
         }
         return mApplicationFeatureProvider;
     }
@@ -132,8 +131,7 @@
     public EnterprisePrivacyFeatureProvider getEnterprisePrivacyFeatureProvider(Context context) {
         if (mEnterprisePrivacyFeatureProvider == null) {
             mEnterprisePrivacyFeatureProvider = new EnterprisePrivacyFeatureProviderImpl(context,
-                    new DevicePolicyManagerWrapper((DevicePolicyManager) context
-                            .getSystemService(Context.DEVICE_POLICY_SERVICE)),
+                    (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE),
                     new PackageManagerWrapper(context.getPackageManager()),
                     UserManager.get(context),
                     new ConnectivityManagerWrapper((ConnectivityManager) context
diff --git a/src/com/android/settings/security/screenlock/LockAfterTimeoutPreferenceController.java b/src/com/android/settings/security/screenlock/LockAfterTimeoutPreferenceController.java
index 08e244e..71a33f7 100644
--- a/src/com/android/settings/security/screenlock/LockAfterTimeoutPreferenceController.java
+++ b/src/com/android/settings/security/screenlock/LockAfterTimeoutPreferenceController.java
@@ -32,7 +32,6 @@
 import com.android.settings.core.PreferenceControllerMixin;
 import com.android.settings.overlay.FeatureFactory;
 import com.android.settings.security.trustagent.TrustAgentManager;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.RestrictedLockUtils;
 import com.android.settingslib.core.AbstractPreferenceController;
 
@@ -44,14 +43,14 @@
     private final int mUserId;
     private final LockPatternUtils mLockPatternUtils;
     private final TrustAgentManager mTrustAgentManager;
-    private final DevicePolicyManagerWrapper mDPM;
+    private final DevicePolicyManager mDPM;
 
     public LockAfterTimeoutPreferenceController(Context context, int userId,
             LockPatternUtils lockPatternUtils) {
         super(context);
         mUserId = userId;
         mLockPatternUtils = lockPatternUtils;
-        mDPM = DevicePolicyManagerWrapper.from(context);
+        mDPM = (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);
         mTrustAgentManager = FeatureFactory.getFactory(context)
                 .getSecurityFeatureProvider().getTrustAgentManager();
     }
diff --git a/src/com/android/settings/wifi/WifiUtils.java b/src/com/android/settings/wifi/WifiUtils.java
index 5ef66c0..0477280 100644
--- a/src/com/android/settings/wifi/WifiUtils.java
+++ b/src/com/android/settings/wifi/WifiUtils.java
@@ -16,6 +16,7 @@
 
 package com.android.settings.wifi;
 
+import android.app.admin.DevicePolicyManager;
 import android.content.ComponentName;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -25,7 +26,6 @@
 import android.provider.Settings;
 import android.text.TextUtils;
 
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
 
 public class WifiUtils {
@@ -69,7 +69,8 @@
             return false;
         }
 
-        final DevicePolicyManagerWrapper dpm = DevicePolicyManagerWrapper.from(context);
+        final DevicePolicyManager dpm =
+                (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);
         final PackageManagerWrapper pm = new PackageManagerWrapper(context.getPackageManager());
 
         // Check if device has DPM capability. If it has and dpm is still null, then we
diff --git a/src/com/android/settings/wrapper/DevicePolicyManagerWrapper.java b/src/com/android/settings/wrapper/DevicePolicyManagerWrapper.java
deleted file mode 100644
index ccf6c53..0000000
--- a/src/com/android/settings/wrapper/DevicePolicyManagerWrapper.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright (C) 2016 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.settings.wrapper;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.UserIdInt;
-import android.app.admin.DevicePolicyManager;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.os.UserHandle;
-
-import java.util.List;
-
-/**
- * This class replicates a subset of the android.app.admin.DevicePolicyManager (DPM). The
- * class exists so that we can use a thin wrapper around the DPM in production code and a mock
- * in tests. We cannot directly mock or shadow the DPM, because some of the methods we rely on are
- * newer than the API version supported by Robolectric.
- */
-public class DevicePolicyManagerWrapper {
-    private final DevicePolicyManager mDpm;
-
-    public DevicePolicyManagerWrapper(DevicePolicyManager dpm) {
-        mDpm = dpm;
-    }
-
-    public static @Nullable DevicePolicyManagerWrapper from(Context context) {
-        DevicePolicyManager dpm =
-                (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);
-        return dpm == null ? null : new DevicePolicyManagerWrapper(dpm);
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.getActiveAdminsAsUser()}.
-     *
-     * @see DevicePolicyManager#getActiveAdminsAsUser
-     */
-    public @Nullable List<ComponentName> getActiveAdminsAsUser(int userId) {
-        return mDpm.getActiveAdminsAsUser(userId);
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.getMaximumFailedPasswordsForWipe()}.
-     *
-     * @see DevicePolicyManager#getMaximumFailedPasswordsForWipe
-     */
-    public int getMaximumFailedPasswordsForWipe(@Nullable ComponentName admin, int userHandle) {
-        return mDpm.getMaximumFailedPasswordsForWipe(admin, userHandle);
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.getDeviceOwnerComponentOnCallingUser()}.
-     *
-     * @see DevicePolicyManager#getDeviceOwnerComponentOnCallingUser
-     */
-    public ComponentName getDeviceOwnerComponentOnCallingUser() {
-        return mDpm.getDeviceOwnerComponentOnCallingUser();
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.getDeviceOwnerComponentOnAnyUser()}.
-     *
-     * @see DevicePolicyManager#getDeviceOwnerComponentOnAnyUser
-     */
-    public ComponentName getDeviceOwnerComponentOnAnyUser() {
-        return mDpm.getDeviceOwnerComponentOnAnyUser();
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.getProfileOwnerAsUser()}.
-     *
-     * @see DevicePolicyManager#getProfileOwnerAsUser
-     */
-    public @Nullable ComponentName getProfileOwnerAsUser(final int userId) {
-        return mDpm.getProfileOwnerAsUser(userId);
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.getDeviceOwnerNameOnAnyUser()}.
-     *
-     * @see DevicePolicyManager#getDeviceOwnerNameOnAnyUser
-     */
-    public CharSequence getDeviceOwnerOrganizationName() {
-        return mDpm.getDeviceOwnerOrganizationName();
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.getPermissionGrantState()}.
-     *
-     * @see DevicePolicyManager#getPermissionGrantState
-     */
-    public int getPermissionGrantState(@Nullable ComponentName admin, String packageName,
-            String permission) {
-        return mDpm.getPermissionGrantState(admin, packageName, permission);
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.isSecurityLoggingEnabled()}.
-     *
-     * @see DevicePolicyManager#isSecurityLoggingEnabled
-     */
-    public boolean isSecurityLoggingEnabled(@Nullable ComponentName admin) {
-        return mDpm.isSecurityLoggingEnabled(admin);
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.isNetworkLoggingEnabled()}.
-     *
-     * @see DevicePolicyManager#isNetworkLoggingEnabled
-     */
-    public boolean isNetworkLoggingEnabled(@Nullable ComponentName admin) {
-        return mDpm.isNetworkLoggingEnabled(admin);
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.getLastSecurityLogRetrievalTime()}.
-     *
-     * @see DevicePolicyManager#getLastSecurityLogRetrievalTime
-     */
-    public long getLastSecurityLogRetrievalTime() {
-        return mDpm.getLastSecurityLogRetrievalTime();
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.getLastBugReportRequestTime()}.
-     *
-     * @see DevicePolicyManager#getLastBugReportRequestTime
-     */
-    public long getLastBugReportRequestTime() {
-        return mDpm.getLastBugReportRequestTime();
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.getLastNetworkLogRetrievalTime()}.
-     *
-     * @see DevicePolicyManager#getLastNetworkLogRetrievalTime
-     */
-    public long getLastNetworkLogRetrievalTime() {
-        return mDpm.getLastNetworkLogRetrievalTime();
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.isCurrentInputMethodSetByOwner()}.
-     *
-     * @see DevicePolicyManager#isCurrentInputMethodSetByOwner
-     */
-    public boolean isCurrentInputMethodSetByOwner() {
-        return mDpm.isCurrentInputMethodSetByOwner();
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.getOwnerInstalledCaCerts()}.
-     *
-     * @see DevicePolicyManager#getOwnerInstalledCaCerts
-     */
-    public List<String> getOwnerInstalledCaCerts(@NonNull UserHandle user) {
-        return mDpm.getOwnerInstalledCaCerts(user);
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.isDeviceOwnerAppOnAnyUser()}.
-     *
-     * @see DevicePolicyManager#isDeviceOwnerAppOnAnyUser
-     */
-    public boolean isDeviceOwnerAppOnAnyUser(String packageName) {
-        return mDpm.isDeviceOwnerAppOnAnyUser(packageName);
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.packageHasActiveAdmins()}.
-     *
-     * @see DevicePolicyManager#packageHasActiveAdmins
-     */
-    public boolean packageHasActiveAdmins(String packageName) {
-        return mDpm.packageHasActiveAdmins(packageName);
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.isUninstallInQueue()}.
-     *
-     * @see DevicePolicyManager#isUninstallInQueue
-     */
-    public boolean isUninstallInQueue(String packageName) {
-        return mDpm.isUninstallInQueue(packageName);
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager.createAdminSupportIntent()}.
-     *
-     * @see DevicePolicyManager#createAdminSupportIntent(String)
-     */
-    public Intent createAdminSupportIntent(@NonNull String restriction) {
-        return mDpm.createAdminSupportIntent(restriction);
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager#getDeviceOwnerUserId()}.
-     *
-     * @see DevicePolicyManager#getDeviceOwnerUserId()
-     */
-    public int getDeviceOwnerUserId() {
-        return mDpm.getDeviceOwnerUserId();
-    }
-
-    /**
-     * Calls {@code DevicePolicyManager#getMaximumTimeToLock()}.
-     *
-     * @see DevicePolicyManager#getMaximumTimeToLock(ComponentName, int)
-     */
-    public long getMaximumTimeToLock(@Nullable ComponentName admin, @UserIdInt int userHandle) {
-        return mDpm.getMaximumTimeToLock(admin, userHandle);
-    }
-}
diff --git a/tests/robotests/src/com/android/settings/UtilsTest.java b/tests/robotests/src/com/android/settings/UtilsTest.java
index fcd40aa..92aedcf 100644
--- a/tests/robotests/src/com/android/settings/UtilsTest.java
+++ b/tests/robotests/src/com/android/settings/UtilsTest.java
@@ -17,7 +17,6 @@
 package com.android.settings;
 
 import static com.google.common.truth.Truth.assertThat;
-
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Matchers.anyString;
@@ -28,6 +27,7 @@
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import android.app.admin.DevicePolicyManager;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
@@ -48,7 +48,6 @@
 import android.widget.TextView;
 
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -74,7 +73,7 @@
     @Mock
     private ConnectivityManager connectivityManager;
     @Mock
-    private DevicePolicyManagerWrapper mDevicePolicyManager;
+    private DevicePolicyManager mDevicePolicyManager;
     @Mock
     private UserManager mUserManager;
     @Mock
diff --git a/tests/robotests/src/com/android/settings/accounts/RemoveAccountPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accounts/RemoveAccountPreferenceControllerTest.java
index 3df7c9d..f1635ca 100644
--- a/tests/robotests/src/com/android/settings/accounts/RemoveAccountPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/accounts/RemoveAccountPreferenceControllerTest.java
@@ -50,10 +50,6 @@
 import com.android.settings.testutils.shadow.ShadowContentResolver;
 import com.android.settings.testutils.shadow.ShadowDevicePolicyManager;
 import com.android.settings.testutils.shadow.ShadowUserManager;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
-
-import java.util.ArrayList;
-import java.util.List;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -64,12 +60,14 @@
 import org.robolectric.annotation.Config;
 import org.robolectric.shadows.ShadowApplication;
 
+import java.util.ArrayList;
+import java.util.List;
+
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(
-    shadows = {
+@Config(shadows = {
         ShadowUserManager.class,
         ShadowDevicePolicyManager.class
-    })
+})
 public class RemoveAccountPreferenceControllerTest {
 
     private static final String KEY_REMOVE_ACCOUNT = "remove_account";
@@ -78,8 +76,6 @@
     @Mock(answer = RETURNS_DEEP_STUBS)
     private AccountManager mAccountManager;
     @Mock
-    private DevicePolicyManagerWrapper mDevicePolicyManager;
-    @Mock
     private PreferenceFragment mFragment;
     @Mock
     private PreferenceManager mPreferenceManager;
@@ -105,10 +101,10 @@
         when(mFragment.getFragmentManager()).thenReturn(mFragmentManager);
         when(mFragmentManager.beginTransaction()).thenReturn(mFragmentTransaction);
         when(mAccountManager.getAuthenticatorTypesAsUser(anyInt()))
-            .thenReturn(new AuthenticatorDescription[0]);
+                .thenReturn(new AuthenticatorDescription[0]);
         when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(new Account[0]);
         mController = new RemoveAccountPreferenceController(RuntimeEnvironment.application,
-            mFragment, mDevicePolicyManager);
+                mFragment);
     }
 
     @Test
@@ -128,8 +124,8 @@
         mController.onClick(null);
 
         verify(mFragmentTransaction).add(
-            any(RemoveAccountPreferenceController.ConfirmRemoveAccountDialog.class),
-            eq(TAG_REMOVE_ACCOUNT_DIALOG));
+                any(RemoveAccountPreferenceController.ConfirmRemoveAccountDialog.class),
+                eq(TAG_REMOVE_ACCOUNT_DIALOG));
     }
 
     @Test
@@ -141,20 +137,20 @@
 
         List<UserManager.EnforcingUser> enforcingUsers = new ArrayList<>();
         enforcingUsers.add(new UserManager.EnforcingUser(userId,
-            UserManager.RESTRICTION_SOURCE_DEVICE_OWNER));
+                UserManager.RESTRICTION_SOURCE_DEVICE_OWNER));
         ComponentName componentName = new ComponentName("test", "test");
         // Ensure that RestrictedLockUtils.checkIfRestrictionEnforced doesn't return null.
         ShadowUserManager.getShadow().setUserRestrictionSources(
-            UserManager.DISALLOW_MODIFY_ACCOUNTS,
-            UserHandle.of(userId),
-            enforcingUsers);
+                UserManager.DISALLOW_MODIFY_ACCOUNTS,
+                UserHandle.of(userId),
+                enforcingUsers);
         ShadowDevicePolicyManager.getShadow().setDeviceOwnerComponentOnAnyUser(componentName);
 
         mController.onClick(null);
 
         verify(mFragmentTransaction, never()).add(
-            any(RemoveAccountPreferenceController.ConfirmRemoveAccountDialog.class),
-            eq(TAG_REMOVE_ACCOUNT_DIALOG));
+                any(RemoveAccountPreferenceController.ConfirmRemoveAccountDialog.class),
+                eq(TAG_REMOVE_ACCOUNT_DIALOG));
     }
 
     @Test
@@ -168,11 +164,11 @@
         Account account = new Account("Account11", "com.acct1");
         UserHandle userHandle = new UserHandle(10);
         RemoveAccountPreferenceController.ConfirmRemoveAccountDialog dialog =
-            RemoveAccountPreferenceController.ConfirmRemoveAccountDialog.show(
-                    mFragment, account, userHandle);
+                RemoveAccountPreferenceController.ConfirmRemoveAccountDialog.show(
+                        mFragment, account, userHandle);
         dialog.onCreate(new Bundle());
         dialog.onClick(null, 0);
         verify(mAccountManager).removeAccountAsUser(eq(account), nullable(Activity.class),
-            nullable(AccountManagerCallback.class), nullable(Handler.class), eq(userHandle));
+                nullable(AccountManagerCallback.class), nullable(Handler.class), eq(userHandle));
     }
 }
diff --git a/tests/robotests/src/com/android/settings/applications/AppWithAdminGrantedPermissionsCounterTest.java b/tests/robotests/src/com/android/settings/applications/AppWithAdminGrantedPermissionsCounterTest.java
index a784329..a0bae85 100644
--- a/tests/robotests/src/com/android/settings/applications/AppWithAdminGrantedPermissionsCounterTest.java
+++ b/tests/robotests/src/com/android/settings/applications/AppWithAdminGrantedPermissionsCounterTest.java
@@ -37,7 +37,6 @@
 import android.os.UserManager;
 
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settings.wrapper.IPackageManagerWrapper;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
 
@@ -84,7 +83,7 @@
     @Mock
     private IPackageManagerWrapper mPackageManagerService;
     @Mock
-    private DevicePolicyManagerWrapper mDevicePolicyManager;
+    private DevicePolicyManager mDevicePolicyManager;
 
     private int mAppCount = -1;
     private ApplicationInfo mApp1;
@@ -214,13 +213,13 @@
         // * app5 uses install-time permissions. It was installed by the admin but did not request
         //        any of the permissions. It should not be counted.
         when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS
-                | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS
-                | PackageManager.MATCH_ANY_USER,
+                        | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS
+                        | PackageManager.MATCH_ANY_USER,
                 MAIN_USER_ID)).thenReturn(Arrays.asList(mApp1, mApp2, mApp3, mApp4, mApp5));
         // The second user has one app installed. This app uses run-time permissions. It has been
         // granted both permissions by the admin. It should be counted.
         when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS
-                | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS,
+                        | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS,
                 MANAGED_PROFILE_ID)).thenReturn(Arrays.asList(mApp6));
 
         // app3 and app5 were installed by enterprise policy.
@@ -250,7 +249,7 @@
     }
 
     private class AppWithAdminGrantedPermissionsCounterTestable
-        extends AppWithAdminGrantedPermissionsCounter {
+            extends AppWithAdminGrantedPermissionsCounter {
         private AppWithAdminGrantedPermissionsCounterTestable(String[] permissions) {
             super(mContext, permissions, mPackageManager, mPackageManagerService,
                     mDevicePolicyManager);
diff --git a/tests/robotests/src/com/android/settings/applications/AppWithAdminGrantedPermissionsListerTest.java b/tests/robotests/src/com/android/settings/applications/AppWithAdminGrantedPermissionsListerTest.java
index ffa262b..940fd4b 100644
--- a/tests/robotests/src/com/android/settings/applications/AppWithAdminGrantedPermissionsListerTest.java
+++ b/tests/robotests/src/com/android/settings/applications/AppWithAdminGrantedPermissionsListerTest.java
@@ -34,7 +34,6 @@
 import android.os.UserManager;
 
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settings.wrapper.IPackageManagerWrapper;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
 
@@ -81,7 +80,7 @@
     @Mock
     private IPackageManagerWrapper mPackageManagerService;
     @Mock
-    private DevicePolicyManagerWrapper mDevicePolicyManager;
+    private DevicePolicyManager mDevicePolicyManager;
 
     private List<UserAppInfo> mAppList = Collections.emptyList();
 
@@ -109,14 +108,14 @@
         // * app5 uses install-time permissions. It was installed by the admin but did not request
         //        any of the permissions. It should not be listed.
         when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS
-                | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS
-                | PackageManager.MATCH_ANY_USER,
+                        | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS
+                        | PackageManager.MATCH_ANY_USER,
                 MAIN_USER_ID)).thenReturn(Arrays.asList(
-                        buildInfo(APP_1_UID, APP_1, 0 /* flags */, Build.VERSION_CODES.M),
-                        buildInfo(APP_2_UID, APP_2, 0 /* flags */, Build.VERSION_CODES.M),
-                        buildInfo(APP_3_UID, APP_3, 0 /* flags */, Build.VERSION_CODES.LOLLIPOP),
-                        buildInfo(APP_4_UID, APP_4, 0 /* flags */, Build.VERSION_CODES.LOLLIPOP),
-                        buildInfo(APP_5_UID, APP_5, 0 /* flags */, Build.VERSION_CODES.LOLLIPOP)));
+                buildInfo(APP_1_UID, APP_1, 0 /* flags */, Build.VERSION_CODES.M),
+                buildInfo(APP_2_UID, APP_2, 0 /* flags */, Build.VERSION_CODES.M),
+                buildInfo(APP_3_UID, APP_3, 0 /* flags */, Build.VERSION_CODES.LOLLIPOP),
+                buildInfo(APP_4_UID, APP_4, 0 /* flags */, Build.VERSION_CODES.LOLLIPOP),
+                buildInfo(APP_5_UID, APP_5, 0 /* flags */, Build.VERSION_CODES.LOLLIPOP)));
 
         // Grant run-time permissions as appropriate.
         when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_1))
@@ -164,9 +163,9 @@
         // The second user has one app installed. This app uses run-time permissions. It has been
         // granted both permissions by the admin. It should be listed.
         when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS
-                | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS,
+                        | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS,
                 MANAGED_PROFILE_ID)).thenReturn(Arrays.asList(
-                        buildInfo(APP_6_UID, APP_6, 0 /* flags */, Build.VERSION_CODES.M)));
+                buildInfo(APP_6_UID, APP_6, 0 /* flags */, Build.VERSION_CODES.M)));
 
         // Grant run-time permissions as appropriate.
         when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_6), anyObject()))
diff --git a/tests/robotests/src/com/android/settings/applications/ApplicationFeatureProviderImplTest.java b/tests/robotests/src/com/android/settings/applications/ApplicationFeatureProviderImplTest.java
index 57b0058..8afb798 100644
--- a/tests/robotests/src/com/android/settings/applications/ApplicationFeatureProviderImplTest.java
+++ b/tests/robotests/src/com/android/settings/applications/ApplicationFeatureProviderImplTest.java
@@ -33,7 +33,6 @@
 
 import com.android.settings.testutils.ApplicationTestUtils;
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settings.wrapper.IPackageManagerWrapper;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
 
@@ -75,7 +74,7 @@
     @Mock
     private IPackageManagerWrapper mPackageManagerService;
     @Mock
-    private DevicePolicyManagerWrapper mDevicePolicyManager;
+    private DevicePolicyManager mDevicePolicyManager;
 
     private ApplicationFeatureProvider mProvider;
 
@@ -258,16 +257,16 @@
                 new UserInfo(MANAGED_PROFILE_ID, "managed profile", 0)));
 
         when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS
-                | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS
-                | PackageManager.MATCH_ANY_USER,
+                        | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS
+                        | PackageManager.MATCH_ANY_USER,
                 MAIN_USER_ID)).thenReturn(Arrays.asList(
-                        ApplicationTestUtils.buildInfo(APP_1_UID, APP_1, 0 /* flags */,
-                                Build.VERSION_CODES.M)));
+                ApplicationTestUtils.buildInfo(APP_1_UID, APP_1, 0 /* flags */,
+                        Build.VERSION_CODES.M)));
         when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS
-                | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS,
+                        | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS,
                 MANAGED_PROFILE_ID)).thenReturn(Arrays.asList(
-                        ApplicationTestUtils.buildInfo(APP_2_UID, APP_2, 0 /* flags */,
-                                Build.VERSION_CODES.LOLLIPOP)));
+                ApplicationTestUtils.buildInfo(APP_2_UID, APP_2, 0 /* flags */,
+                        Build.VERSION_CODES.LOLLIPOP)));
     }
 
     private ResolveInfo createResolveInfo(String packageName) {
diff --git a/tests/robotests/src/com/android/settings/applications/appinfo/AppActionButtonPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/applications/appinfo/AppActionButtonPreferenceControllerTest.java
index e571521..b85464d 100644
--- a/tests/robotests/src/com/android/settings/applications/appinfo/AppActionButtonPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/applications/appinfo/AppActionButtonPreferenceControllerTest.java
@@ -17,7 +17,6 @@
 package com.android.settings.applications.appinfo;
 
 import static com.google.common.truth.Truth.assertThat;
-
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.argThat;
@@ -28,6 +27,7 @@
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import android.app.admin.DevicePolicyManager;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
@@ -47,7 +47,6 @@
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
 import com.android.settings.widget.ActionButtonPreference;
 import com.android.settings.widget.ActionButtonPreferenceTest;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.Utils;
 import com.android.settingslib.applications.AppUtils;
 import com.android.settingslib.applications.ApplicationsState;
@@ -74,7 +73,7 @@
     @Mock
     private UserManager mUserManager;
     @Mock
-    private DevicePolicyManagerWrapper mDevicePolicyManager;
+    private DevicePolicyManager mDevicePolicyManager;
     @Mock
     private AppInfoDashboardFragment mFragment;
     @Mock
@@ -108,7 +107,7 @@
     @Test
     public void getAvailabilityStatus_notInstantApp_shouldReturnAvailable() {
         ReflectionHelpers.setStaticField(AppUtils.class, "sInstantAppDataProvider",
-            (InstantAppDataProvider) (i -> false));
+                (InstantAppDataProvider) (i -> false));
 
         assertThat(mController.getAvailabilityStatus()).isEqualTo(mController.AVAILABLE);
     }
@@ -116,7 +115,7 @@
     @Test
     public void getAvailabilityStatus_isInstantApp_shouldReturnDisabled() {
         ReflectionHelpers.setStaticField(AppUtils.class, "sInstantAppDataProvider",
-            (InstantAppDataProvider) (i -> true));
+                (InstantAppDataProvider) (i -> true));
 
         assertThat(mController.getAvailabilityStatus()).isEqualTo(mController.DISABLED_FOR_USER);
     }
@@ -220,7 +219,7 @@
     @Test
     public void checkForceStop_isStateProtected_shouldDisableForceStop() {
         ReflectionHelpers.setStaticField(AppUtils.class, "sInstantAppDataProvider",
-            (InstantAppDataProvider) (i -> false));
+                (InstantAppDataProvider) (i -> false));
         final String packageName = "Package1";
         final PackageInfo packageInfo = new PackageInfo();
         packageInfo.packageName = packageName;
@@ -228,7 +227,7 @@
         appInfo.uid = 42;
         appInfo.sourceDir = "source";
         final ApplicationsState.AppEntry appEntry = new ApplicationsState.AppEntry(
-            mContext, appInfo, 0);
+                mContext, appInfo, 0);
         when(mPackageManager.isPackageStateProtected(packageName, 0)).thenReturn(true);
 
         mController.checkForceStop(appEntry, packageInfo);
@@ -278,7 +277,7 @@
 
         mController.checkForceStop(appEntry, packageInfo);
 
-        verify(mContext).sendOrderedBroadcastAsUser(argThat(intent-> intent != null
+        verify(mContext).sendOrderedBroadcastAsUser(argThat(intent -> intent != null
                         && intent.getAction().equals(Intent.ACTION_QUERY_PACKAGE_RESTART)),
                 any(UserHandle.class), nullable(String.class), any(BroadcastReceiver.class),
                 nullable(Handler.class), anyInt(), nullable(String.class), nullable(Bundle.class));
diff --git a/tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java b/tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java
index 761b746..3128f30 100644
--- a/tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java
@@ -17,7 +17,8 @@
 package com.android.settings.applications.appinfo;
 
 import static com.android.settings.applications.appinfo.AppInfoDashboardFragment.ARG_PACKAGE_NAME;
-import static com.android.settings.applications.appinfo.AppInfoDashboardFragment.UNINSTALL_ALL_USERS_MENU;
+import static com.android.settings.applications.appinfo.AppInfoDashboardFragment
+        .UNINSTALL_ALL_USERS_MENU;
 import static com.android.settings.applications.appinfo.AppInfoDashboardFragment.UNINSTALL_UPDATES;
 import static com.google.common.truth.Truth.assertThat;
 import static org.mockito.ArgumentMatchers.any;
@@ -31,6 +32,7 @@
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import android.app.admin.DevicePolicyManager;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.ApplicationInfo;
@@ -45,7 +47,6 @@
 import com.android.settings.SettingsActivity;
 import com.android.settings.SettingsPreferenceFragment;
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.applications.AppUtils;
 import com.android.settingslib.applications.ApplicationsState.AppEntry;
 import com.android.settingslib.applications.instantapps.InstantAppDataProvider;
@@ -75,7 +76,7 @@
     @Mock
     private SettingsActivity mActivity;
     @Mock
-    private DevicePolicyManagerWrapper mDevicePolicyManager;
+    private DevicePolicyManager mDevicePolicyManager;
     @Mock
     private PackageManager mPackageManager;
 
@@ -249,7 +250,7 @@
 
     @Test
     public void getNumberOfUserWithPackageInstalled_twoUsersInstalled_shouldReturnTwo()
-            throws PackageManager.NameNotFoundException{
+            throws PackageManager.NameNotFoundException {
         final String packageName = "Package1";
         final int userID1 = 1;
         final int userID2 = 2;
@@ -273,7 +274,7 @@
 
     @Test
     public void getNumberOfUserWithPackageInstalled_oneUserInstalled_shouldReturnOne()
-            throws PackageManager.NameNotFoundException{
+            throws PackageManager.NameNotFoundException {
         final String packageName = "Package1";
         final int userID1 = 1;
         final int userID2 = 2;
@@ -311,7 +312,7 @@
     @Test
     public void startAppInfoFragment_noCrashOnNullArgs() {
         final SettingsPreferenceFragment caller = mock(SettingsPreferenceFragment.class);
-        final SettingsActivity sa = mock (SettingsActivity.class);
+        final SettingsActivity sa = mock(SettingsActivity.class);
         when(caller.getActivity()).thenReturn(sa);
         when(caller.getContext()).thenReturn(sa);
         final AppEntry appEntry = mock(AppEntry.class);
@@ -324,7 +325,7 @@
     @Test
     public void startAppInfoFragment_includesNewAndOldArgs() {
         final SettingsPreferenceFragment caller = mock(SettingsPreferenceFragment.class);
-        final SettingsActivity sa = mock (SettingsActivity.class);
+        final SettingsActivity sa = mock(SettingsActivity.class);
         when(caller.getContext()).thenReturn(sa);
         final AppEntry appEntry = mock(AppEntry.class);
         appEntry.info = mock(ApplicationInfo.class);
@@ -339,10 +340,10 @@
 
         verify(caller).startActivityForResult(intent.capture(), any(Integer.class));
         assertThat(intent.getValue().getBundleExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT_ARGUMENTS)
-            .containsKey("test"))
-            .isTrue();
+                .containsKey("test"))
+                .isTrue();
         assertThat(intent.getValue().getBundleExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT_ARGUMENTS)
-            .containsKey(ARG_PACKAGE_NAME))
-            .isTrue();
+                .containsKey(ARG_PACKAGE_NAME))
+                .isTrue();
     }
 }
diff --git a/tests/robotests/src/com/android/settings/display/TimeoutPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/TimeoutPreferenceControllerTest.java
index 0362b5b..8627d5f 100644
--- a/tests/robotests/src/com/android/settings/display/TimeoutPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/display/TimeoutPreferenceControllerTest.java
@@ -33,7 +33,7 @@
 
 import com.android.settings.TimeoutListPreference;
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
-import com.android.settings.testutils.shadow.ShadowDevicePolicyManagerWrapper;
+import com.android.settings.testutils.shadow.ShadowDevicePolicyManager;
 import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
 
 import org.junit.Before;
@@ -50,7 +50,7 @@
 import java.util.List;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(shadows = ShadowDevicePolicyManagerWrapper.class)
+@Config(shadows = ShadowDevicePolicyManager.class)
 public class TimeoutPreferenceControllerTest {
 
     private static final int TIMEOUT = 30;
@@ -93,7 +93,7 @@
         final int profileUserId = UserHandle.myUserId();
         final long timeout = 10000;
         when(mUserManager.getProfiles(profileUserId)).thenReturn(Collections.emptyList());
-        ShadowDevicePolicyManagerWrapper.setMaximumTimeToLock(profileUserId, timeout);
+        ShadowDevicePolicyManager.getShadow().setMaximumTimeToLock(profileUserId, timeout);
 
         mController.updateState(mPreference);
         verify(mPreference).removeUnusableTimeouts(timeout, null);
@@ -104,7 +104,7 @@
         final int profileUserId = UserHandle.myUserId();
         final long timeout = 100;
         when(mUserManager.getProfiles(profileUserId)).thenReturn(Collections.emptyList());
-        ShadowDevicePolicyManagerWrapper.setMaximumTimeToLock(profileUserId, timeout);
+        ShadowDevicePolicyManager.getShadow().setMaximumTimeToLock(profileUserId, timeout);
 
         int userId = UserHandle.myUserId();
         List<UserManager.EnforcingUser> enforcingUsers = new ArrayList<>();
@@ -124,8 +124,8 @@
         ArgumentCaptor<EnforcedAdmin> adminCaptor = ArgumentCaptor.forClass(EnforcedAdmin.class);
 
         verify(mPreference, times(2))
-            .removeUnusableTimeouts(longCaptor.capture(), adminCaptor.capture());
-        assertEquals(0, (long)longCaptor.getValue());
+                .removeUnusableTimeouts(longCaptor.capture(), adminCaptor.capture());
+        assertEquals(0, (long) longCaptor.getValue());
         assertTrue(adminCaptor.getValue() != null);
     }
 }
diff --git a/tests/robotests/src/com/android/settings/enterprise/ActionDisabledByAdminDialogHelperTest.java b/tests/robotests/src/com/android/settings/enterprise/ActionDisabledByAdminDialogHelperTest.java
index 981ce13..32926b4 100644
--- a/tests/robotests/src/com/android/settings/enterprise/ActionDisabledByAdminDialogHelperTest.java
+++ b/tests/robotests/src/com/android/settings/enterprise/ActionDisabledByAdminDialogHelperTest.java
@@ -94,7 +94,7 @@
         mHelper.showAdminPolicies(admin, mActivity);
         final Intent intent = mActivityShadow.getNextStartedActivity();
         assertEquals(intent.getComponent(), new ComponentName(mActivity,
-                        Settings.DeviceAdminSettingsActivity.class.getName()));
+                Settings.DeviceAdminSettingsActivity.class.getName()));
     }
 
     @Test
@@ -139,9 +139,7 @@
 
     @Test
     public void testSetAdminSupportDetails() {
-        final DevicePolicyManager dpm = RuntimeEnvironment.application.getSystemService(
-                DevicePolicyManager.class);
-        final ShadowDevicePolicyManager dpmShadow = Shadow.extract(dpm);
+        final ShadowDevicePolicyManager dpmShadow = ShadowDevicePolicyManager.getShadow();
         final UserManager userManager = RuntimeEnvironment.application.getSystemService(
                 UserManager.class);
         final ShadowUserManager userManagerShadow = Shadow.extract(userManager);
@@ -165,9 +163,7 @@
 
     @Test
     public void testSetAdminSupportDetailsNotAdmin() {
-        final DevicePolicyManager dpm = RuntimeEnvironment.application.getSystemService(
-                DevicePolicyManager.class);
-        final ShadowDevicePolicyManager dpmShadow = Shadow.extract(dpm);
+        final ShadowDevicePolicyManager dpmShadow = ShadowDevicePolicyManager.getShadow();
         final UserManager userManager = RuntimeEnvironment.application.getSystemService(
                 UserManager.class);
         final ShadowUserManager userManagerShadow = Shadow.extract(userManager);
diff --git a/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImplTest.java b/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImplTest.java
index ddbd3d4..b71a35e 100644
--- a/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImplTest.java
+++ b/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImplTest.java
@@ -21,6 +21,7 @@
 import static org.mockito.Mockito.reset;
 import static org.mockito.Mockito.when;
 
+import android.app.admin.DevicePolicyManager;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
@@ -36,7 +37,6 @@
 import com.android.settings.R;
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
 import com.android.settings.wrapper.ConnectivityManagerWrapper;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
 
 import org.junit.Before;
@@ -68,7 +68,7 @@
     private List<UserInfo> mProfiles = new ArrayList<>();
 
     private @Mock Context mContext;
-    private @Mock DevicePolicyManagerWrapper mDevicePolicyManager;
+    private @Mock DevicePolicyManager mDevicePolicyManager;
     private @Mock PackageManagerWrapper mPackageManagerWrapper;
     private @Mock PackageManager mPackageManager;
     private @Mock UserManager mUserManager;
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/AppButtonsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/fuelgauge/AppButtonsPreferenceControllerTest.java
index eebccd8..551cb3e 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/AppButtonsPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/AppButtonsPreferenceControllerTest.java
@@ -34,6 +34,7 @@
 import android.app.ActivityManager;
 import android.app.Application;
 import android.app.Fragment;
+import android.app.admin.DevicePolicyManager;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.ApplicationInfo;
@@ -46,7 +47,6 @@
 import com.android.settings.testutils.FakeFeatureFactory;
 import com.android.settings.widget.ActionButtonPreference;
 import com.android.settings.widget.ActionButtonPreferenceTest;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.applications.AppUtils;
 import com.android.settingslib.applications.ApplicationsState;
 import com.android.settingslib.applications.instantapps.InstantAppDataProvider;
@@ -87,7 +87,7 @@
     @Mock
     private PackageManager mPackageManger;
     @Mock
-    private DevicePolicyManagerWrapper mDpm;
+    private DevicePolicyManager mDpm;
     @Mock
     private ActivityManager mAm;
     @Mock
@@ -367,7 +367,7 @@
      * {@link ButtonActionDialogFragment.AppButtonsDialogListener}
      */
     public static class TestFragment extends Fragment
-        implements ButtonActionDialogFragment.AppButtonsDialogListener {
+            implements ButtonActionDialogFragment.AppButtonsDialogListener {
 
         @Override
         public void handleDialogClick(int type) {
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/BackgroundActivityPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/fuelgauge/BackgroundActivityPreferenceControllerTest.java
index 9cd4b8e..5e045c1 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/BackgroundActivityPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/BackgroundActivityPreferenceControllerTest.java
@@ -38,7 +38,6 @@
 import com.android.settings.testutils.FakeFeatureFactory;
 import com.android.settings.testutils.shadow.SettingsShadowResources;
 import com.android.settings.testutils.shadow.ShadowFragment;
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
 import com.android.settingslib.fuelgauge.PowerWhitelistBackend;
 
 import org.junit.Before;
@@ -74,7 +73,7 @@
     @Mock
     private DevicePolicyManager mDevicePolicyManager;
     @Mock
-    private DevicePolicyManagerWrapper mDevicePolicyManagerWrapper;
+    private DevicePolicyManager mDevicePolicyManagerWrapper;
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
     private AdvancedPowerUsageDetail mFragment;
     @Mock
diff --git a/tests/robotests/src/com/android/settings/security/screenlock/LockAfterTimeoutPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/security/screenlock/LockAfterTimeoutPreferenceControllerTest.java
index 5538b4c..2a4b335 100644
--- a/tests/robotests/src/com/android/settings/security/screenlock/LockAfterTimeoutPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/security/screenlock/LockAfterTimeoutPreferenceControllerTest.java
@@ -34,7 +34,7 @@
 import com.android.settings.security.trustagent.TrustAgentManager;
 import com.android.settings.testutils.FakeFeatureFactory;
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
-import com.android.settings.testutils.shadow.ShadowDevicePolicyManagerWrapper;
+import com.android.settings.testutils.shadow.ShadowDevicePolicyManager;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -47,7 +47,7 @@
 import java.util.Collections;
 
 @RunWith(SettingsRobolectricTestRunner.class)
-@Config(shadows = ShadowDevicePolicyManagerWrapper.class)
+@Config(shadows = ShadowDevicePolicyManager.class)
 public class LockAfterTimeoutPreferenceControllerTest {
 
     private static final int TEST_USER_ID = 0;
@@ -120,11 +120,11 @@
         when(um.getProfiles(userId)).thenReturn(Collections.emptyList());
 
         // Fake list of timeout values.
-        when(mPreference.getEntries()).thenReturn(new CharSequence[] {"10"} );
-        when(mPreference.getEntryValues()).thenReturn(new CharSequence[] {"10000"} );
+        when(mPreference.getEntries()).thenReturn(new CharSequence[] {"10"});
+        when(mPreference.getEntryValues()).thenReturn(new CharSequence[] {"10000"});
 
         Settings.System.putInt(mContext.getContentResolver(), SCREEN_OFF_TIMEOUT, displayTimeout);
-        ShadowDevicePolicyManagerWrapper.setMaximumTimeToLock(userId, adminTimeout);
+        ShadowDevicePolicyManager.getShadow().setMaximumTimeToLock(userId, adminTimeout);
 
         mController.updateState(mPreference);
 
diff --git a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowDevicePolicyManager.java b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowDevicePolicyManager.java
index 7e2c3cc..16ef699 100644
--- a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowDevicePolicyManager.java
+++ b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowDevicePolicyManager.java
@@ -2,33 +2,35 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.annotation.UserIdInt;
 import android.app.admin.DevicePolicyManager;
 import android.content.ComponentName;
 
 import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Implementation;
 import org.robolectric.annotation.Implements;
+import org.robolectric.shadow.api.Shadow;
 
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Objects;
-import org.robolectric.shadow.api.Shadow;
 
-/**
- * This shadow if using {@link ShadowDevicePolicyManagerWrapper} is not possible.
- */
 @Implements(DevicePolicyManager.class)
 public class ShadowDevicePolicyManager extends org.robolectric.shadows.ShadowDevicePolicyManager {
+
+    private final Map<Integer, Long> mProfileTimeouts = new HashMap<>();
     private Map<Integer, CharSequence> mSupportMessagesMap = new HashMap<>();
     private boolean mIsAdminActiveAsUser = false;
     ComponentName mDeviceOwnerComponentName;
+    private int mDeviceOwnerUserId = -1;
 
     public void setShortSupportMessageForUser(ComponentName admin, int userHandle, String message) {
         mSupportMessagesMap.put(Objects.hash(admin, userHandle), message);
     }
 
     @Implementation
-    public @Nullable CharSequence getShortSupportMessageForUser(@NonNull ComponentName admin,
+    public @Nullable
+    CharSequence getShortSupportMessageForUser(@NonNull ComponentName admin,
             int userHandle) {
         return mSupportMessagesMap.get(Objects.hash(admin, userHandle));
     }
@@ -38,20 +40,39 @@
         return mIsAdminActiveAsUser;
     }
 
-    public void setIsAdminActiveAsUser(boolean active) {
-        mIsAdminActiveAsUser = active;
+    @Implementation
+    public int getDeviceOwnerUserId() {
+        return mDeviceOwnerUserId;
     }
 
-    public static ShadowDevicePolicyManager getShadow() {
-        return (ShadowDevicePolicyManager) Shadow.extract(
-            RuntimeEnvironment.application.getSystemService(DevicePolicyManager.class));
+    @Implementation
+    public long getMaximumTimeToLock(ComponentName admin, @UserIdInt int userHandle) {
+        return mProfileTimeouts.getOrDefault(userHandle, 0L);
     }
 
+    @Implementation
     public ComponentName getDeviceOwnerComponentOnAnyUser() {
         return mDeviceOwnerComponentName;
     }
 
+    public void setIsAdminActiveAsUser(boolean active) {
+        mIsAdminActiveAsUser = active;
+    }
+
+    public void setDeviceOwnerUserId(int id) {
+        mDeviceOwnerUserId = id;
+    }
+
+    public void setMaximumTimeToLock(@UserIdInt int userHandle, Long timeout) {
+        mProfileTimeouts.put(userHandle, timeout);
+    }
+
     public void setDeviceOwnerComponentOnAnyUser(ComponentName admin) {
         mDeviceOwnerComponentName = admin;
     }
+
+    public static ShadowDevicePolicyManager getShadow() {
+        return (ShadowDevicePolicyManager) Shadow.extract(
+                RuntimeEnvironment.application.getSystemService(DevicePolicyManager.class));
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowDevicePolicyManagerWrapper.java b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowDevicePolicyManagerWrapper.java
deleted file mode 100644
index 5502b37..0000000
--- a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowDevicePolicyManagerWrapper.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2017 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.settings.testutils.shadow;
-
-import android.annotation.UserIdInt;
-import android.content.ComponentName;
-
-import com.android.settings.wrapper.DevicePolicyManagerWrapper;
-
-import org.robolectric.annotation.Implementation;
-import org.robolectric.annotation.Implements;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Shadow for {@link DevicePolicyManagerWrapper} to allow stubbing hidden methods.
- */
-@Implements(DevicePolicyManagerWrapper.class)
-public class ShadowDevicePolicyManagerWrapper {
-    private static ComponentName deviceOComponentName = null;
-    private static int deviceOwnerUserId = -1;
-    private static final Map<Integer, Long> profileTimeouts = new HashMap<>();
-
-    @Implementation
-    public ComponentName getDeviceOwnerComponentOnAnyUser() {
-        return deviceOComponentName;
-    }
-
-    @Implementation
-    public int getDeviceOwnerUserId() {
-        return deviceOwnerUserId;
-    }
-
-    @Implementation
-    public long getMaximumTimeToLock(ComponentName admin, @UserIdInt int userHandle) {
-        return profileTimeouts.getOrDefault(userHandle, 0L);
-    }
-
-    public static void setDeviceOComponentName(ComponentName deviceOComponentName) {
-        ShadowDevicePolicyManagerWrapper.deviceOComponentName = deviceOComponentName;
-    }
-
-    public static void setDeviceOwnerUserId(int deviceOwnerUserId) {
-        ShadowDevicePolicyManagerWrapper.deviceOwnerUserId = deviceOwnerUserId;
-    }
-
-    public static void setMaximumTimeToLock(@UserIdInt int userHandle, Long timeout) {
-        profileTimeouts.put(userHandle, timeout);
-    }
-}
diff --git a/tests/robotests/src/com/android/settings/wifi/details/WifiDetailPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/wifi/details/WifiDetailPreferenceControllerTest.java
index a0238b4..9c20d18 100644
--- a/tests/robotests/src/com/android/settings/wifi/details/WifiDetailPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/details/WifiDetailPreferenceControllerTest.java
@@ -63,7 +63,7 @@
 import com.android.settings.applications.LayoutPreference;
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
 import com.android.settings.testutils.shadow.ShadowBidiFormatter;
-import com.android.settings.testutils.shadow.ShadowDevicePolicyManagerWrapper;
+import com.android.settings.testutils.shadow.ShadowDevicePolicyManager;
 import com.android.settings.testutils.shadow.ShadowEntityHeaderController;
 import com.android.settings.testutils.shadow.ShadowPackageManagerWrapper;
 import com.android.settings.widget.ActionButtonPreference;
@@ -96,10 +96,10 @@
 
 @RunWith(SettingsRobolectricTestRunner.class)
 @Config(shadows = {
-    ShadowDevicePolicyManagerWrapper.class,
-    ShadowEntityHeaderController.class,
-    ShadowPackageManagerWrapper.class,
-    ShadowBidiFormatter.class
+        ShadowDevicePolicyManager.class,
+        ShadowEntityHeaderController.class,
+        ShadowPackageManagerWrapper.class,
+        ShadowBidiFormatter.class
 })
 public class WifiDetailPreferenceControllerTest {
 
@@ -372,7 +372,7 @@
         mController.onPause();
 
         verify(mockConnectivityManager, times(1))
-            .unregisterNetworkCallback(mCallbackCaptor.getValue());
+                .unregisterNetworkCallback(mCallbackCaptor.getValue());
     }
 
     @Test
@@ -469,16 +469,16 @@
 
     @Test
     public void dnsServersPref_shouldHaveDetailTextSet() throws UnknownHostException {
-        mLinkProperties.addDnsServer(InetAddress.getByAddress(new byte[]{8,8,4,4}));
-        mLinkProperties.addDnsServer(InetAddress.getByAddress(new byte[]{8,8,8,8}));
+        mLinkProperties.addDnsServer(InetAddress.getByAddress(new byte[] {8, 8, 4, 4}));
+        mLinkProperties.addDnsServer(InetAddress.getByAddress(new byte[] {8, 8, 8, 8}));
         mLinkProperties.addDnsServer(Constants.IPV6_DNS);
 
         displayAndResume();
 
         verify(mockDnsPref).setDetailText(
                 "8.8.4.4\n" +
-                "8.8.8.8\n" +
-                Constants.IPV6_DNS.getHostAddress());
+                        "8.8.8.8\n" +
+                        Constants.IPV6_DNS.getHostAddress());
     }
 
     @Test
@@ -591,8 +591,8 @@
         updateLinkProperties(lp);
         inOrder.verify(mockDnsPref).setDetailText(
                 Constants.IPV6_DNS.getHostAddress() + "\n" +
-                Constants.IPV4_DNS1.getHostAddress() + "\n" +
-                Constants.IPV4_DNS2.getHostAddress());
+                        Constants.IPV4_DNS1.getHostAddress() + "\n" +
+                        Constants.IPV4_DNS2.getHostAddress());
         inOrder.verify(mockDnsPref).setVisible(true);
     }
 
@@ -693,8 +693,8 @@
         mockWifiConfig.creatorUid = doUid;
         ComponentName doComponent = new ComponentName(doPackage, "some.Class");
         ShadowPackageManagerWrapper.setPackageUidAsUser(doPackage, doUserId, doUid);
-        ShadowDevicePolicyManagerWrapper.setDeviceOComponentName(doComponent);
-        ShadowDevicePolicyManagerWrapper.setDeviceOwnerUserId(doUserId);
+        ShadowDevicePolicyManager.getShadow().setDeviceOwnerComponentOnAnyUser(doComponent);
+        ShadowDevicePolicyManager.getShadow().setDeviceOwnerUserId(doUserId);
 
         Settings.Global.putInt(mContext.getContentResolver(),
                 Settings.Global.WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN, 1);
@@ -779,7 +779,7 @@
 
         displayAndResume();
 
-        List <Preference> addrs = mIpv6AddressCaptor.getAllValues();
+        List<Preference> addrs = mIpv6AddressCaptor.getAllValues();
 
         String expectedAddresses = String.join("\n",
                 asString(Constants.IPV6_LINKLOCAL),
@@ -840,6 +840,7 @@
         verify(mockAccessPoint, times(2)).getLevel();
         verify(mockIconInjector, times(1)).getIcon(anyInt());
     }
+
     @Test
     public void testRefreshRssiViews_shouldUpdateOnLevelChange() {
         displayAndResume();
