/packages/services/Car/tests/carservice_unit_test/src/com/android/car/pm/ |
D | CarPackageManagerServiceUnitTest.java | 91 private Context mUserContext; field in CarPackageManagerServiceUnitTest 120 doReturn(mUserContext).when(mSpiedContext).createContextAsUser(mUserHandle, /* flags= */ 0); in setUp() 213 .when(() -> CarPackageManagerService.getTargetCarVersion(mUserContext, pkgName)); in testGetTargetCarVersion_ok() 227 .when(() -> CarPackageManagerService.getTargetCarVersion(mUserContext, pkgName)); in testGetTargetCarVersion_byUser() 244 .when(() -> CarPackageManagerService.getTargetCarVersion(mUserContext, pkgName)); in testGetTargetCarVersion_self_ok() 260 .when(() -> CarPackageManagerService.getTargetCarVersion(mUserContext, pkgName)); in testGetTargetCarVersion_self_wrongUid() 275 () -> CarPackageManagerService.getTargetCarVersion(mUserContext, null)); in testGetTargetCarVersion_static_null() 283 () -> CarPackageManagerService.getTargetCarVersion(mUserContext, "d.oh")); in testGetTargetCarVersion_static_noPermission() 290 String causeMsg = mockGetApplicationInfoThrowsNotFound(mUserContext, "meaning.of.life"); in testGetTargetCarVersion_static_noApp() 293 () -> CarPackageManagerService.getTargetCarVersion(mUserContext, in testGetTargetCarVersion_static_noApp() [all …]
|
/packages/modules/AppSearch/service/java/com/android/server/appsearch/visibilitystore/ |
D | VisibilityCheckerImpl.java | 57 private final Context mUserContext; field in VisibilityCheckerImpl 67 mUserContext = Objects.requireNonNull(userContext); in VisibilityCheckerImpl() 206 mUserContext, in isSchemaPubliclyVisibleFromPackage() 218 if (mUserContext in isSchemaPubliclyVisibleFromPackage() 257 PackageUtil.getPackageUid(mUserContext, visibleToPackage.getPackageName()); in isSchemaVisibleToPackages() 265 mUserContext, in isSchemaVisibleToPackages() 400 return mUserContext in doesCallerHaveSystemAccess()
|
D | PolicyCheckerImpl.java | 30 private final Context mUserContext; field in PolicyCheckerImpl 34 mUserContext = userContext; in PolicyCheckerImpl() 53 mUserContext.getUser(), callingPackageName); in doesCallerHaveManagedProfileContactsAccess()
|
/packages/services/Car/service/src/com/android/car/bluetooth/ |
D | BluetoothDeviceConnectionPolicy.java | 69 private Context mUserContext; field in BluetoothDeviceConnectionPolicy 301 mUserContext = mContext.createContextAsUser(currentUser, /* flags= */ 0); in init() 302 mUserContext.registerReceiver(mBluetoothBroadcastReceiver, profileFilter); in init() 324 if (mBluetoothBroadcastReceiver != null && mUserContext != null) { in release() 325 mUserContext.unregisterReceiver(mBluetoothBroadcastReceiver); in release() 326 mUserContext = null; in release()
|
D | BluetoothDeviceManager.java | 103 private Context mUserContext; field in BluetoothDeviceManager 308 mUserContext = mContext.createContextAsUser(currentUser, /* flags= */ 0); in start() 312 mUserContext.registerReceiver(mBluetoothBroadcastReceiver, filter); in start() 324 if (mUserContext != null) { in stop() 327 mUserContext.unregisterReceiver(mBluetoothBroadcastReceiver); in stop() 331 mUserContext = null; in stop() 349 String devicesStr = Settings.Secure.getString(mUserContext.getContentResolver(), in load() 404 Settings.Secure.putString(mUserContext.getContentResolver(), SETTINGS_KEY, devicesStr); in commit()
|
D | BluetoothConnectionRetryManager.java | 66 private Context mUserContext; field in BluetoothConnectionRetryManager 386 mUserContext = mContext.createContextAsUser(currentUser, /* flags= */ 0); in init() 388 mUserContext.registerReceiver(mBluetoothBroadcastReceiver, filter); in init() 399 if (mUserContext != null) { in release() 401 mUserContext.unregisterReceiver(mBluetoothBroadcastReceiver); in release() 405 mUserContext = null; in release()
|
D | BluetoothProfileInhibitManager.java | 63 private final Context mUserContext; field in BluetoothProfileInhibitManager 237 mUserContext = context.createContextAsUser(UserHandle.of(userId), /* flags= */ 0); in BluetoothProfileInhibitManager() 250 mUserContext.getContentResolver(), KEY_BLUETOOTH_PROFILES_INHIBITED); in load() 295 Settings.Secure.putString(mUserContext.getContentResolver(), in commitLocked()
|
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/migration/ |
D | DataMigrationManager.java | 62 private final Context mUserContext; field in DataMigrationManager 80 mUserContext = userContext; in DataMigrationManager() 151 mAppInfoHelper.populateAppInfoId(record, mUserContext, false); in parseRecord() 166 final UserHandle userHandle = mUserContext.getUser(); in migratePermissions() 204 mUserContext, in migrateAppInfo()
|
/packages/apps/Settings/src/com/android/settings/ |
D | RingtonePreference.java | 64 protected Context mUserContext; field in RingtonePreference 85 mUserContext = Utils.createPackageContextAsUser(getContext(), mUserId); in setUserId() 262 String mimeType = mUserContext.getContentResolver().getType(ringtoneUri); in isValidRingtoneUri() 279 final UserManager userManager = mUserContext.getSystemService(UserManager.class); in isValidRingtoneUri()
|
D | DefaultRingtonePreference.java | 65 RingtoneManager.setActualDefaultRingtoneUri(mUserContext, getRingtoneType(), ringtoneUri); in setActualDefaultRingtoneUri() 70 return RingtoneManager.getActualDefaultRingtoneUri(mUserContext, getRingtoneType()); in onRestoreRingtone()
|
/packages/services/Car/service/src/com/android/car/pm/ |
D | VendorServiceController.java | 489 private final Context mUserContext; field in VendorServiceController.VendorServiceConnection 498 mUserContext = context.createContextAsUser(mUser, /* flags= */ 0); in VendorServiceConnection() 539 boolean canBind = mUserContext.bindService(intent, BIND_AUTO_CREATE, in startOrBindService() 547 mStarted = mUserContext.startForegroundService(intent) != null; in startOrBindService() 550 mStarted = mUserContext.startService(intent) != null; in startOrBindService() 559 mUserContext.stopService(mVendorServiceInfo.getIntent()); in stopOrUnbindService() 569 mUserContext.unbindService(this); in unbindService()
|
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/migration/ |
D | MigratorPackageChangesReceiverTest.java | 67 @Mock private Context mUserContext; field in MigratorPackageChangesReceiverTest 80 when(mContext.createContextAsUser(any(), anyInt())).thenReturn(mUserContext); in setUp() 81 when(mUserContext.getSystemService(eq(UserManager.class))).thenReturn(mUserManager); in setUp()
|
D | MigrationBroadcastSendingTest.java | 60 @Mock private Context mUserContext; field in MigrationBroadcastSendingTest 78 when(mContext.createContextAsUser(eq(mUser), eq(0))).thenReturn(mUserContext); in setUp() 79 when(mUserContext.getPackageManager()).thenReturn(mUserContextPackageManager); in setUp() 81 when(mUserContext.getSystemService(UserManager.class)).thenReturn(mUserManager); in setUp()
|
D | PriorityMigrationTest.java | 69 @Mock Context mUserContext; field in PriorityMigrationTest 100 mUserContext, in setUp()
|
/packages/apps/Car/Settings/src/com/android/car/settings/sound/ |
D | RingtonePickerPreferenceController.java | 62 private final Context mUserContext; field in RingtonePickerPreferenceController 82 mUserContext = createPackageContextAsUser(getContext(), UserHandle.myUserId()); in RingtonePickerPreferenceController() 110 RingtoneManager.setActualDefaultRingtoneUri(mUserContext, mRingtoneType, in saveRingtone() 138 RingtoneManager.getActualDefaultRingtoneUri(mUserContext, mRingtoneType); in onStartInternal()
|
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/privacy/ |
D | CameraQcPanelTest.java | 72 private Context mUserContext; field in CameraQcPanelTest 89 mContext.prepareCreateContextAsUser(UserHandle.SYSTEM, mUserContext); in setUp() 90 when(mUserContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
|
D | MicQcPanelTest.java | 72 private Context mUserContext; field in MicQcPanelTest 89 mContext.prepareCreateContextAsUser(UserHandle.SYSTEM, mUserContext); in setUp() 90 when(mUserContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
|
/packages/apps/Settings/src/com/android/settings/notification/ |
D | DefaultNotificationTonePreference.java | 58 return Ringtone.getTitle(mUserContext, uri, false /* followSettingsUri */, in updateRingtoneName()
|
/packages/modules/AppSearch/service/java/com/android/server/appsearch/stats/ |
D | PlatformLogger.java | 70 private final Context mUserContext; field in PlatformLogger 131 mUserContext = Objects.requireNonNull(userContext); in PlatformLogger() 788 packageUid = PackageUtil.getPackageUid(mUserContext, packageName); in getPackageUidAsUserLocked()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/ |
D | DefaultRingtonePreferenceTest.java | 75 mDefaultRingtonePreference.mUserContext = context; in setUp()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/util/ |
D | WifiPermissionsUtilTest.java | 113 @Mock private Context mUserContext; field in WifiPermissionsUtilTest 1889 when(mMockContext.createContextAsUser(any(), anyInt())).thenReturn(mUserContext); 1890 when(mUserContext.getSystemService(UserManager.class)).thenReturn(mMockUserManager);
|