Remove extra argument WorkPolicyUtil constructor
Only constructor is required for WorkPolicyInfo constructor. The other dependencies can be derives Test: make ROBOTEST_FILTER=EnterprisePrivacyFeatureProviderImplTest RunSettingsRoboTests -j40 Change-Id: I7f35e5ed344d452190b333aad7fa823a010d17b3
This commit is contained in:
@@ -69,7 +69,7 @@ public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFe
|
|||||||
mCm = cm;
|
mCm = cm;
|
||||||
mVm = vm;
|
mVm = vm;
|
||||||
mResources = resources;
|
mResources = resources;
|
||||||
mWorkPolicyUtils = new WorkPolicyUtils(mContext, mPm, mUm, mDpm);
|
mWorkPolicyUtils = new WorkPolicyUtils(mContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -105,6 +105,10 @@ public class EnterprisePrivacyFeatureProviderImplTest {
|
|||||||
when(mContext.getApplicationContext()).thenReturn(mContext);
|
when(mContext.getApplicationContext()).thenReturn(mContext);
|
||||||
resetAndInitializePackageManager();
|
resetAndInitializePackageManager();
|
||||||
when(mUserManager.getProfiles(mUserId)).thenReturn(mProfiles);
|
when(mUserManager.getProfiles(mUserId)).thenReturn(mProfiles);
|
||||||
|
when(mContext.getSystemService(Context.DEVICE_POLICY_SERVICE))
|
||||||
|
.thenReturn(mDevicePolicyManager);
|
||||||
|
when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
|
||||||
|
when(mContext.getPackageManager()).thenReturn(mPackageManager);
|
||||||
mProfiles.add(new UserInfo(mUserId, "", "", 0 /* flags */));
|
mProfiles.add(new UserInfo(mUserId, "", "", 0 /* flags */));
|
||||||
mResources = RuntimeEnvironment.application.getResources();
|
mResources = RuntimeEnvironment.application.getResources();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user