/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/ |
D | UtilsTest.java | 79 private Utils mUtils; field in UtilsTest 93 mUtils = new Utils(); in setUp() 110 Set<String> res = mUtils.getCurrentSystemApps(mockIPackageManager, TEST_USER_ID); in testGetCurrentSystemApps() 119 mUtils.setComponentEnabledSetting(mockIPackageManager, TEST_COMPONENT_NAME, in testSetComponentEnabledSetting() 135 assertTrue(mUtils.packageRequiresUpdate(TEST_PACKAGE_NAME_1, 0, mockContext)); in testPackageRequiresUpdate_notPresent() 147 assertFalse(mUtils.packageRequiresUpdate(TEST_PACKAGE_NAME_1, 0, mockContext)); in testPackageRequiresUpdate() 148 assertFalse(mUtils.packageRequiresUpdate(TEST_PACKAGE_NAME_1, 1, mockContext)); in testPackageRequiresUpdate() 149 assertTrue(mUtils.packageRequiresUpdate(TEST_PACKAGE_NAME_1, 2, mockContext)); in testPackageRequiresUpdate() 157 assertTrue(mUtils.isConnectedToNetwork(mockContext)); in testIsConnectedToNetwork() 163 assertTrue(mUtils.isConnectedToNetwork(mockContext)); in testIsConnectedToNetwork() [all …]
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/preprovisioning/ |
D | PreProvisioningControllerTest.java | 96 private Utils mUtils; field in PreProvisioningControllerTest 131 when(mUtils.isSplitSystemUser()).thenReturn(false); in setUp() 132 when(mUtils.isEncryptionRequired()).thenReturn(false); in setUp() 133 when(mUtils.currentLauncherSupportsManagedProfiles(mContext)).thenReturn(true); in setUp() 134 when(mUtils.alreadyHasManagedProfile(mContext)).thenReturn(-1); in setUp() 143 mUtils, mSettingsFacade, mEncryptionController); in setUp() 200 when(mUtils.isEncryptionRequired()).thenReturn(true); in testManagedProfile_withEncryption() 231 when(mUtils.alreadyHasManagedProfile(mContext)).thenReturn(TEST_USER_ID); in testManagedProfile_withExistingProfile() 249 when(mUtils.currentLauncherSupportsManagedProfiles(mContext)).thenReturn(false); in testManagedProfile_badLauncher() 290 when(mUtils.isEncryptionRequired()).thenReturn(true); in testManagedProfile_skipEncryption() [all …]
|
D | EncryptionControllerTest.java | 56 @Mock private Utils mUtils; field in EncryptionControllerTest 71 when(mUtils.isPhysicalDeviceEncrypted()).thenReturn(true); in setUp() 85 verify(mUtils).enableComponent(TEST_HOME_RECEIVER, TEST_USER_ID); in testDeviceOwner() 109 verify(mUtils).enableComponent(TEST_HOME_RECEIVER, TEST_USER_ID); in testProfileOwnerDuringSuw() 122 when(mUtils.isPhysicalDeviceEncrypted()).thenReturn(false); in testDeviceNotEncrypted() 144 verify(mUtils).disableComponent(TEST_HOME_RECEIVER, TEST_USER_ID); in testCancelProvisioningReminder() 174 return new EncryptionController(mContext, mUtils, mSettingsFacade, TEST_HOME_RECEIVER, in createEncryptionController()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/ |
D | VerifyPackageTaskTest.java | 67 @Mock private Utils mUtils; field in VerifyPackageTaskTest 88 when(mUtils.findDeviceAdminInPackageInfo(TEST_PACKAGE_NAME, null, mPackageInfo)) in setUp() 108 when(mUtils.findDeviceAdminInPackageInfo(TEST_PACKAGE_NAME, null, mPackageInfo)) in testMissingDeviceAdminComponent() 122 when(mUtils.computeHashOfFile(TEST_LOCAL_FILENAME, Utils.SHA256_TYPE)) in testPackageChecksumSha256_success() 136 when(mUtils.computeHashOfFile(TEST_LOCAL_FILENAME, Utils.SHA1_TYPE)) in testPackageChecksumSha1_success() 150 when(mUtils.computeHashOfFile(TEST_LOCAL_FILENAME, Utils.SHA1_TYPE)) in testPackageChecksumSha1_failure() 164 when(mUtils.computeHashOfByteArray(TEST_SIGNATURES[0].toByteArray())) in testSignatureHash_success() 178 when(mUtils.computeHashOfByteArray(TEST_SIGNATURES[0].toByteArray())) in testSignatureHash_failure() 205 when(mUtils.computeHashOfByteArray(any(byte[].class))).thenReturn(null); in testSignatureHash_digestFailure() 228 mTask = new VerifyPackageTask(mUtils, mDownloadPackageTask, mContext, params, mCallback); in runWithDownloadInfo()
|
D | DownloadPackageTaskTest.java | 62 @Mock private Utils mUtils; field in DownloadPackageTaskTest 90 when(mUtils.packageRequiresUpdate(TEST_PACKAGE_NAME, PACKAGE_VERSION, mContext)) in setUp() 94 mUtils, in setUp() 103 when(mUtils.packageRequiresUpdate(TEST_PACKAGE_NAME, PACKAGE_VERSION, mContext)) in testAlreadyInstalled() 117 doReturn(false).when(mUtils).isConnectedToNetwork(mContext); in testNotConnected() 187 doReturn(true).when(mUtils).isConnectedToNetwork(any(Context.class)); in mockSuccessfulDownload()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/preprovisioning/ |
D | PreProvisioningController.java | 80 private final Utils mUtils; field in PreProvisioningController 119 mUtils = checkNotNull(utils, "Utils must not be null"); in PreProvisioningController() 223 int existingManagedProfileUserId = mUtils.alreadyHasManagedProfile(mContext); in initiateProvisioning() 239 if (!mUtils.isConnectedToNetwork(mContext) && mParams.wifiInfo == null in initiateProvisioning() 275 mUtils); in initiateProvisioning() 304 return new TermsProvider(mContext, StoreUtils::readString, mUtils) in getDisclaimerHeadings() 348 if (!mUtils.currentLauncherSupportsManagedProfiles(mContext)) { in continueProvisioningAfterUserConsent() 486 return !mParams.skipEncryption && mUtils.isEncryptionRequired(); in isEncryptionRequired() 511 return mUtils.isPackageTestOnly(mContext.getPackageManager(), in isPackageTestOnly() 540 if (mUtils.isSplitSystemUser() in isMeatUserCreationRequired() [all …]
|
D | EncryptionController.java | 58 private final Utils mUtils; field in EncryptionController 98 mUtils = checkNotNull(utils, "Utils must not be null"); in EncryptionController() 121 mUtils.enableComponent(mHomeReceiver, mUserId); in setEncryptionReminder() 134 mUtils.disableComponent(mHomeReceiver, mUserId); in cancelEncryptionReminder() 167 if (!mUtils.isPhysicalDeviceEncrypted()) { in resumeProvisioning() 174 if (mUtils.isProfileOwnerAction(action)) { in resumeProvisioning() 180 } else if (mUtils.isDeviceOwnerAction(action)) { in resumeProvisioning()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | ContactLocaleUtils.java | 498 private final ContactLocaleUtilsBase mUtils; field in ContactLocaleUtils 507 mUtils = new JapaneseContactUtils(mLocales); in ContactLocaleUtils() 509 mUtils = new SimplifiedChineseContactUtils(mLocales); in ContactLocaleUtils() 511 mUtils = new ContactLocaleUtilsBase(mLocales); in ContactLocaleUtils() 548 return mUtils.getSortKey(name); in getSortKey() 552 return mUtils.getBucketIndex(name); in getBucketIndex() 556 return mUtils.getNumberBucketIndex(); in getNumberBucketIndex() 560 return mUtils.getBucketCount(); in getBucketCount() 564 return mUtils.getBucketLabel(bucketIndex); in getBucketLabel() 572 return mUtils.getLabels(); in getLabels() [all …]
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/analytics/ |
D | NetworkTypeLoggerTest.java | 50 @Mock private Utils mUtils; field in NetworkTypeLoggerTest 61 mNetworkTypeLogger = new NetworkTypeLogger(mContext, mUtils, mMetricsLoggerWrapper); in setUp() 67 when(mUtils.getActiveNetworkInfo(mContext)).thenReturn(null); in test_NullNetworkInfo() 78 when(mUtils.getActiveNetworkInfo(mContext)).thenReturn(WIFI_NETWORK_INFO); in test_NetworkNotConnected() 80 when(mUtils.isConnectedToNetwork(mContext)).thenReturn(false); in test_NetworkNotConnected() 91 when(mUtils.getActiveNetworkInfo(mContext)).thenReturn(WIFI_NETWORK_INFO); in test_NetworkTypeWifi() 92 when(mUtils.isConnectedToNetwork(mContext)).thenReturn(true); in test_NetworkTypeWifi()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/wifi/ |
D | NetworkMonitorTest.java | 45 @Mock private Utils mUtils; field in NetworkMonitorTest 53 mNetworkMonitor = new NetworkMonitor(mContext, mUtils); in setUp() 67 when(mUtils.isConnectedToWifi(mContext)).thenReturn(false); in testStartListening() 75 when(mUtils.isConnectedToWifi(mContext)).thenReturn(true); in testStartListening() 96 when(mUtils.isConnectedToWifi(mContext)).thenReturn(false); in testStopListening() 104 when(mUtils.isConnectedToWifi(mContext)).thenReturn(true); in testStopListening()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/finalization/ |
D | DpcReceivedSuccessReceiverTest.java | 55 @Mock private Utils mUtils; field in DpcReceivedSuccessReceiverTest 68 MANAGED_PROFILE_USER_HANDLE, TEST_MDM_PACKAGE_NAME, mUtils); in testNoAccountMigration() 93 mUtils); in testAccountMigration() 99 verify(mUtils).removeAccount(mContext, TEST_ACCOUNT); in testAccountMigration() 107 mUtils); in testAccountCopy() 113 verify(mUtils, never()).removeAccount(mContext, TEST_ACCOUNT); in testAccountCopy()
|
D | FinalizationControllerTest.java | 63 @Mock private Utils mUtils; field in FinalizationControllerTest 74 when(mUtils.findDeviceAdmin(null, TEST_MDM_ADMIN, mContext)) in setUp() 76 when(mUtils.canResolveIntentAsUser(any(Context.class), any(Intent.class), anyInt())) in setUp() 80 mController = new FinalizationController(mContext, mUtils, mSettingsFacade, mHelper); in setUp() 140 when(mUtils.getManagedProfile(mContext)) in testManagedProfileAfterSuw() 164 when(mUtils.getManagedProfile(mContext)) in testManagedProfileDuringSuw()
|
D | UserProvisioningStateHelperTest.java | 53 @Mock private Utils mUtils; field in UserProvisioningStateHelperTest 67 mUtils, in setUp() 78 when(mUtils.getManagedProfile(mContext)).thenReturn(UserHandle.of(MANAGED_PROFILE_USER_ID)); in testInitiallyDone_ProfileAfterSuw() 94 when(mUtils.getManagedProfile(mContext)).thenReturn(UserHandle.of(MANAGED_PROFILE_USER_ID)); in testInitiallyDone_ProfileDuringSuw() 142 when(mUtils.getManagedProfile(mContext)).thenReturn(UserHandle.of(MANAGED_PROFILE_USER_ID)); in testFinalized_ManagedProfile()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/ |
D | VerifyPackageTask.java | 54 private final Utils mUtils; field in VerifyPackageTask 76 mUtils = checkNotNull(utils); in VerifyPackageTask() 101 if (mUtils.findDeviceAdminInPackageInfo(packageName, in run() 135 byte[] hash = mUtils.computeHashOfByteArray(signature.toByteArray()); in computeHashesOfAllSignatures() 181 packageSha256Hash = mUtils.computeHashOfFile(downloadLocation, Utils.SHA256_TYPE); in doesPackageHashMatch() 188 packageSha1Hash = mUtils.computeHashOfFile(downloadLocation, Utils.SHA1_TYPE); in doesPackageHashMatch()
|
D | SetDevicePolicyTask.java | 40 private final Utils mUtils; field in SetDevicePolicyTask 56 mUtils = checkNotNull(utils); in SetDevicePolicyTask() 71 ComponentName adminComponent = mUtils.findDeviceAdmin( in run() 78 if (mUtils.isProfileOwnerAction(mProvisioningParams.provisioningAction)) { in run()
|
D | DownloadPackageTask.java | 57 private final Utils mUtils; field in DownloadPackageTask 77 mUtils = checkNotNull(utils); in DownloadPackageTask() 92 if (!mUtils.packageRequiresUpdate(mPackageName, mPackageDownloadInfo.minVersion, in run() 99 if (!mUtils.isConnectedToNetwork(mContext)) { in run()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/finalization/ |
D | FinalizationController.java | 53 private final Utils mUtils; field in FinalizationController 71 mUtils = checkNotNull(utils); in FinalizationController() 151 UserHandle managedUserHandle = mUtils.getManagedProfile(mContext); in notifyDpcManagedProfile() 171 if (mUtils.canResolveIntentAsUser(mContext, dpcLaunchIntent, userId)) { in maybeLaunchDpc() 180 intent.setComponent(mUtils.findDeviceAdmin( in createProvisioningCompleteIntent()
|
D | UserProvisioningStateHelper.java | 48 private final Utils mUtils; field in UserProvisioningStateHelper 64 mUtils = checkNotNull(utils); in UserProvisioningStateHelper() 93 managedProfileUserId = mUtils.getManagedProfile(mContext).getIdentifier(); in markUserProvisioningStateInitiallyDone() 138 final int managedProfileUserId = mUtils.getManagedProfile(mContext).getIdentifier(); in markUserProvisioningStateFinalized()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/parser/ |
D | MessageParser.java | 38 private final Utils mUtils; field in MessageParser 48 mUtils = checkNotNull(utils); in MessageParser() 60 return new PropertiesProvisioningDataParser(mContext, mUtils); in getParser() 62 return new ExtrasProvisioningDataParser(mContext, mUtils); in getParser()
|
D | ExtrasProvisioningDataParser.java | 101 private final Utils mUtils; field in ExtrasProvisioningDataParser 113 mUtils = checkNotNull(utils); in ExtrasProvisioningDataParser() 169 String provisioningAction = mUtils.mapIntentToDpmAction(intent); in parseMinimalistSupportedProvisioningDataInternal() 186 deviceAdminComponentName = mUtils.findDeviceAdmin( in parseMinimalistSupportedProvisioningDataInternal() 211 && mUtils.isPackageDeviceOwner(dpm, inferStaticDeviceAdminPackageName( in parseMinimalistSupportedProvisioningDataInternal()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/analytics/ |
D | NetworkTypeLogger.java | 37 private final Utils mUtils; field in NetworkTypeLogger 49 mUtils = checkNotNull(utils); in NetworkTypeLogger() 57 final NetworkInfo networkInfo = mUtils.getActiveNetworkInfo(mContext); in log() 58 if (mUtils.isConnectedToNetwork(mContext)) { in log()
|
/packages/apps/Settings/src/com/android/settings/ |
D | SaveChosenLockWorkerBase.java | 38 protected LockPatternUtils mUtils; field in SaveChosenLockWorkerBase 65 mUtils = utils; in prepare() 71 mWasSecureBefore = mUtils.isSecure(mUserId); in prepare() 77 mUtils.setCredentialRequiredToDecrypt(credentialRequired); in prepare()
|
/packages/apps/Contacts/tests/src/com/android/contacts/interactions/ |
D | ContactDeletionInteractionTest.java | 62 private IntegrationTestUtils mUtils; field in ContactDeletionInteractionTest 72 mUtils = new IntegrationTestUtils(getInstrumentation()); in setUp() 73 mUtils.acquireScreenWakeLock(getInstrumentation().getTargetContext()); in setUp() 105 mUtils.releaseScreenWakeLock(); in tearDown()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/parser/ |
D | ExtrasProvisioningDataParserTest.java | 153 private Utils mUtils; field in ExtrasProvisioningDataParserTest 165 mUtils = spy(new Utils()); in setUp() 166 mExtrasProvisioningDataParser = new ExtrasProvisioningDataParser(mContext, mUtils, in setUp() 261 .when(mUtils) in testParse_managedProfileIntent() 311 .when(mUtils) in testParse_managedProfileIntent_CompProvisioning() 352 .when(mUtils) in testParse_managedProfileIntent_DeviceOwnerWithByodProvisioning()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/wifi/ |
D | NetworkMonitor.java | 55 private final Utils mUtils ; field in NetworkMonitor 73 mUtils = checkNotNull(utils); in NetworkMonitor() 103 if (mUtils.isConnectedToWifi(context) && mCallback != null) {
|