Home
last modified time | relevance | path

Searched refs:PackageManager (Results 1 – 25 of 2337) sorted by relevance

12345678910>>...94

/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/model/
DPermission.java19 import android.content.pm.PackageManager;
144 return (mFlags & PackageManager.FLAG_PERMISSION_REVIEW_REQUIRED) != 0; in isReviewRequired()
148 mFlags &= ~PackageManager.FLAG_PERMISSION_REVIEW_REQUIRED; in unsetReviewRequired()
160 return (mFlags & PackageManager.FLAG_PERMISSION_USER_FIXED) != 0; in isUserFixed()
165 mFlags |= PackageManager.FLAG_PERMISSION_USER_FIXED; in setUserFixed()
167 mFlags &= ~PackageManager.FLAG_PERMISSION_USER_FIXED; in setUserFixed()
177 mFlags |= PackageManager.FLAG_PERMISSION_REVOKE_WHEN_REQUESTED; in setRevokeWhenRequested()
179 mFlags &= ~PackageManager.FLAG_PERMISSION_REVOKE_WHEN_REQUESTED; in setRevokeWhenRequested()
189 mFlags |= PackageManager.FLAG_PERMISSION_ONE_TIME; in setOneTime()
191 mFlags &= ~PackageManager.FLAG_PERMISSION_ONE_TIME; in setOneTime()
[all …]
/packages/modules/Permission/tests/cts/permissionpolicy/src/android/permissionpolicy/cts/
DRestrictedStoragePermissionTest.java35 import android.content.pm.PackageManager;
531 final PackageManager packageManager = getContext().getPackageManager(); in assertCannotWhitelistStorage()
536 PackageManager.FLAG_PERMISSION_WHITELIST_SYSTEM in assertCannotWhitelistStorage()
537 | PackageManager.FLAG_PERMISSION_WHITELIST_UPGRADE in assertCannotWhitelistStorage()
538 | PackageManager.FLAG_PERMISSION_WHITELIST_INSTALLER)) in assertCannotWhitelistStorage()
541 PackageManager.FLAG_PERMISSION_WHITELIST_SYSTEM in assertCannotWhitelistStorage()
542 | PackageManager.FLAG_PERMISSION_WHITELIST_UPGRADE in assertCannotWhitelistStorage()
543 | PackageManager.FLAG_PERMISSION_WHITELIST_INSTALLER)) in assertCannotWhitelistStorage()
552 PackageManager.FLAG_PERMISSION_WHITELIST_INSTALLER); in assertCannotWhitelistStorage()
560 PackageManager.FLAG_PERMISSION_WHITELIST_INSTALLER); in assertCannotWhitelistStorage()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DInstalledAppCounterTest.java38 import android.content.pm.PackageManager;
39 import android.content.pm.PackageManager.ApplicationInfoFlags;
90 private PackageManager mPackageManager;
132 eq(PackageManager.GET_DISABLED_COMPONENTS | PackageManager.MATCH_DIRECT_BOOT_AWARE in expectQueryIntentActivities()
133 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE), in expectQueryIntentActivities()
165 count(PackageManager.INSTALL_REASON_POLICY, async); in testCountInstalledAppsAcrossAllUsers()
185 assertThat(InstalledAppCounter.includeInCount(PackageManager.INSTALL_REASON_POLICY, in testIncludeInCount()
187 assertThat(InstalledAppCounter.includeInCount(PackageManager.INSTALL_REASON_POLICY, in testIncludeInCount()
189 assertThat(InstalledAppCounter.includeInCount(PackageManager.INSTALL_REASON_POLICY, in testIncludeInCount()
191 assertThat(InstalledAppCounter.includeInCount(PackageManager.INSTALL_REASON_POLICY, in testIncludeInCount()
[all …]
DAppWithAdminGrantedPermissionsListerTest.java33 import android.content.pm.PackageManager;
86 private PackageManager mPackageManager;
119 when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS in verifyListInstalledApps()
120 | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS in verifyListInstalledApps()
121 | PackageManager.MATCH_ANY_USER, in verifyListInstalledApps()
145 .thenReturn(PackageManager.PERMISSION_DENIED); in verifyListInstalledApps()
147 .thenReturn(PackageManager.PERMISSION_DENIED); in verifyListInstalledApps()
149 .thenReturn(PackageManager.PERMISSION_DENIED); in verifyListInstalledApps()
151 .thenReturn(PackageManager.PERMISSION_GRANTED); in verifyListInstalledApps()
153 .thenReturn(PackageManager.PERMISSION_DENIED); in verifyListInstalledApps()
[all …]
DAppWithAdminGrantedPermissionsCounterTest.java35 import android.content.pm.PackageManager;
89 private PackageManager mPackageManager;
177 .thenReturn(PackageManager.PERMISSION_DENIED); in configureInstallTimePermissions()
179 .thenReturn(PackageManager.PERMISSION_DENIED); in configureInstallTimePermissions()
181 .thenReturn(PackageManager.PERMISSION_DENIED); in configureInstallTimePermissions()
183 .thenReturn(PackageManager.PERMISSION_GRANTED); in configureInstallTimePermissions()
185 .thenReturn(PackageManager.PERMISSION_DENIED); in configureInstallTimePermissions()
187 .thenReturn(PackageManager.PERMISSION_GRANTED); in configureInstallTimePermissions()
189 .thenReturn(PackageManager.PERMISSION_DENIED); in configureInstallTimePermissions()
191 .thenReturn(PackageManager.PERMISSION_DENIED); in configureInstallTimePermissions()
[all …]
DInstalledAppListerTest.java33 import android.content.pm.PackageManager;
80 private PackageManager mPackageManager;
87 eq(PackageManager.GET_DISABLED_COMPONENTS | PackageManager.MATCH_DIRECT_BOOT_AWARE in expectQueryIntentActivities()
88 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE), in expectQueryIntentActivities()
109 when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS in testCountInstalledAppsAcrossAllUsers()
110 | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS in testCountInstalledAppsAcrossAllUsers()
111 | PackageManager.MATCH_ANY_USER, in testCountInstalledAppsAcrossAllUsers()
129 .thenReturn(PackageManager.INSTALL_REASON_POLICY); in testCountInstalledAppsAcrossAllUsers()
131 .thenReturn(PackageManager.INSTALL_REASON_UNKNOWN); in testCountInstalledAppsAcrossAllUsers()
133 .thenReturn(PackageManager.INSTALL_REASON_POLICY); in testCountInstalledAppsAcrossAllUsers()
[all …]
/packages/apps/TvSettings/unbundle/java/com/android/tv/settings/unbundle/sdklib/
DPackageManagerCompat.java25 import android.content.pm.PackageManager;
36 public static final int DELETE_SUCCEEDED = PackageManager.DELETE_SUCCEEDED;
43 PackageManager.MOVE_FAILED_INSUFFICIENT_STORAGE;
50 PackageManager.MOVE_FAILED_DOESNT_EXIST;
57 PackageManager.MOVE_FAILED_SYSTEM_PACKAGE;
64 PackageManager.MOVE_FAILED_INVALID_LOCATION;
71 PackageManager.MOVE_FAILED_INTERNAL_ERROR;
78 PackageManager.MOVE_FAILED_DEVICE_ADMIN;
81 PackageManager.MOVE_SUCCEEDED;
83 private final PackageManager mManager;
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/model/livedatatypes/
DLightPermission.kt20 import android.content.pm.PackageManager
59 val isPolicyFixed = flags and PackageManager.FLAG_PERMISSION_POLICY_FIXED != 0
61 val isSystemFixed = flags and PackageManager.FLAG_PERMISSION_SYSTEM_FIXED != 0
63 val isUserFixed = flags and PackageManager.FLAG_PERMISSION_USER_FIXED != 0
65 val isUserSet = flags and PackageManager.FLAG_PERMISSION_USER_SET != 0
67 val isCompatRevoked = flags and PackageManager.FLAG_PERMISSION_REVOKED_COMPAT != 0
69 val isReviewRequired = flags and PackageManager.FLAG_PERMISSION_REVIEW_REQUIRED != 0
71 val isOneTime = flags and PackageManager.FLAG_PERMISSION_ONE_TIME != 0
93 val isGrantedByDefault = flags and PackageManager.FLAG_PERMISSION_GRANTED_BY_DEFAULT != 0
95 val isGrantedByRole = flags and PackageManager.FLAG_PERMISSION_GRANTED_BY_ROLE != 0
[all …]
/packages/apps/Settings/tests/unit/src/com/android/settings/deviceinfo/legal/
DModuleLicenseProviderTest.java33 import android.content.pm.PackageManager;
144 throws PackageManager.NameNotFoundException { in getType_packageNotAModule_throwsIllegalArgumentException()
147 PackageManager packageManager = mock(PackageManager.class); in getType_packageNotAModule_throwsIllegalArgumentException()
151 .thenThrow(new PackageManager.NameNotFoundException()); in getType_packageNotAModule_throwsIllegalArgumentException()
163 throws PackageManager.NameNotFoundException { in getType_validUri_returnsHtmlMimeType()
166 PackageManager packageManager = mock(PackageManager.class); in getType_validUri_returnsHtmlMimeType()
244 throws PackageManager.NameNotFoundException { in openFile_packageNotAModule_throwsIllegalArgumentException()
247 PackageManager packageManager = mock(PackageManager.class); in openFile_packageNotAModule_throwsIllegalArgumentException()
251 .thenThrow(new PackageManager.NameNotFoundException()); in openFile_packageNotAModule_throwsIllegalArgumentException()
263 throws PackageManager.NameNotFoundException { in openFile_validUri_notReadMode_throwsIllegalArgumentException()
[all …]
/packages/apps/Settings/src/com/android/settings/
DSettingsInitialize.java19 import static android.content.pm.PackageManager.GET_ACTIVITIES;
20 import static android.content.pm.PackageManager.GET_META_DATA;
21 import static android.content.pm.PackageManager.GET_RESOLVED_FILTER;
22 import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS;
30 import android.content.pm.PackageManager;
66 final PackageManager pm = context.getPackageManager(); in onReceive()
74 private void managedProfileSetup(Context context, final PackageManager pm, Intent broadcast, in managedProfileSetup()
101 userInfo.profileGroupId, PackageManager.SKIP_CURRENT_PROFILE); in managedProfileSetup()
109 private void cloneProfileSetup(Context context, PackageManager pm, UserInfo userInfo) { in cloneProfileSetup()
118 private void webviewSettingSetup(Context context, PackageManager pm, UserInfo userInfo) { in webviewSettingSetup()
[all …]
/packages/apps/Camera2/src/com/android/camera/
DSetActivitiesCameraReceiver.java23 import android.content.pm.PackageManager;
42 ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED in onReceive()
43 : PackageManager.COMPONENT_ENABLED_STATE_DISABLED; in onReceive()
53 PackageManager pm = context.getPackageManager(); in hasCamera()
54 return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA) in hasCamera()
55 || pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT) in hasCamera()
56 || pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL); in hasCamera()
60 PackageManager pm = context.getPackageManager(); in hasBackCamera()
61 return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA); in hasBackCamera()
66 PackageManager pm = context.getPackageManager(); in setComponent()
[all …]
/packages/modules/OnDevicePersonalization/common/java/com/android/odp/module/common/
DPackageUtils.java19 import static android.content.pm.PackageManager.GET_META_DATA;
20 import static android.content.pm.PackageManager.GET_SIGNING_CERTIFICATES;
21 import static android.content.pm.PackageManager.MATCH_STATIC_SHARED_AND_SDK_LIBRARIES;
31 import android.content.pm.PackageManager;
80 throws PackageManager.NameNotFoundException { in getCertDigest()
85 PackageManager.PackageInfoFlags.of( in getCertDigest()
101 throws PackageManager.NameNotFoundException { in isPackageDebuggable()
105 packageName, PackageManager.ApplicationInfoFlags.of(GET_META_DATA)); in isPackageDebuggable()
119 .getPackageInfo(ODP_MAINLINE_SIGNED_APEX_NAME, PackageManager.MATCH_APEX); in getApexVersion()
125 .getPackageInfo(ODP_AOSP_BUILT_APEX_NAME, PackageManager.MATCH_APEX); in getApexVersion()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/compat/
DPackageManagerCompatUtils.java26 import android.content.pm.PackageManager;
115 @NonNull PackageManager packageManager, int flags) { in getInstalledPackages()
118 ? packageManager.getInstalledPackages(PackageManager.PackageInfoFlags.of(flags)) in getInstalledPackages()
136 @NonNull PackageManager packageManager, int flags) { in getInstalledApplications()
140 PackageManager.ApplicationInfoFlags.of(flags)) in getInstalledApplications()
159 @NonNull PackageManager packageManager, @NonNull String packageName, int flags) in getApplicationInfo()
160 throws PackageManager.NameNotFoundException { in getApplicationInfo()
165 packageName, PackageManager.ApplicationInfoFlags.of(flags)) in getApplicationInfo()
184 @NonNull PackageManager packageManager, @NonNull String packageName, int flags) in getPackageUid()
185 throws PackageManager.NameNotFoundException { in getPackageUid()
[all …]
/packages/modules/AdServices/sdksandbox/service/java/com/android/server/sdksandbox/helpers/
DPackageManagerHelper.java22 import android.content.pm.PackageManager;
37 private final PackageManager mPackageManager;
49 throws PackageManager.NameNotFoundException { in getSdkSharedLibraryInfoForSdk()
57 throw new PackageManager.NameNotFoundException(sdkName); in getSdkSharedLibraryInfoForSdk()
67 throws PackageManager.NameNotFoundException { in getSdkSharedLibraryInfo()
71 PackageManager.ApplicationInfoFlags.of( in getSdkSharedLibraryInfo()
72 PackageManager.GET_SHARED_LIBRARY_FILES)); in getSdkSharedLibraryInfo()
83 public PackageManager.Property getProperty( in getProperty()
85 throws PackageManager.NameNotFoundException { in getProperty()
93 throws PackageManager.NameNotFoundException { in getApplicationInfoForSharedLibrary()
[all …]
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/util/
DPackageUtils.java22 import android.content.pm.PackageManager;
49 PackageManager userPackageManager = userContext.getPackageManager(); in getPackageInfoAsUser()
52 PackageManager.MATCH_DIRECT_BOOT_AWARE in getPackageInfoAsUser()
53 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE | extraFlags); in getPackageInfoAsUser()
54 } catch (PackageManager.NameNotFoundException e) { in getPackageInfoAsUser()
70 return getPackageInfoAsUser(packageName, PackageManager.MATCH_SYSTEM_ONLY, user, context) in isSystemPackageAsUser()
87 PackageManager userPackageManager = userContext.getPackageManager(); in getApplicationInfoAsUser()
90 PackageManager.MATCH_DIRECT_BOOT_AWARE in getApplicationInfoAsUser()
91 | PackageManager.MATCH_DIRECT_BOOT_UNAWARE); in getApplicationInfoAsUser()
92 } catch (PackageManager.NameNotFoundException e) { in getApplicationInfoAsUser()
/packages/apps/Messaging/src/com/android/messaging/receiver/
DSmsReceiver.java26 import android.content.pm.PackageManager;
106 final PackageManager packageManager = context.getPackageManager(); in updateSmsReceiveHandler()
114 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP); in updateSmsReceiveHandler()
122 PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); in updateSmsReceiveHandler()
130 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP); in updateSmsReceiveHandler()
137 PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); in updateSmsReceiveHandler()
145 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP); in updateSmsReceiveHandler()
148 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP); in updateSmsReceiveHandler()
155 PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); in updateSmsReceiveHandler()
158 PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); in updateSmsReceiveHandler()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/
DConnectedDeviceGroupControllerTest.java32 import android.content.pm.PackageManager;
130 mPackageManager.setSystemFeature(PackageManager.FEATURE_BLUETOOTH, true); in setUp()
215 mPackageManager.setSystemFeature(PackageManager.FEATURE_BLUETOOTH, false); in getAvailabilityStatus_noBluetoothUsbDockFeature_returnUnSupported()
216 mPackageManager.setSystemFeature(PackageManager.FEATURE_USB_ACCESSORY, false); in getAvailabilityStatus_noBluetoothUsbDockFeature_returnUnSupported()
217 mPackageManager.setSystemFeature(PackageManager.FEATURE_USB_HOST, false); in getAvailabilityStatus_noBluetoothUsbDockFeature_returnUnSupported()
227 mPackageManager.setSystemFeature(PackageManager.FEATURE_BLUETOOTH, true); in getAvailabilityStatus_BluetoothFeature_returnSupported()
228 mPackageManager.setSystemFeature(PackageManager.FEATURE_USB_ACCESSORY, false); in getAvailabilityStatus_BluetoothFeature_returnSupported()
229 mPackageManager.setSystemFeature(PackageManager.FEATURE_USB_HOST, false); in getAvailabilityStatus_BluetoothFeature_returnSupported()
239 mPackageManager.setSystemFeature(PackageManager.FEATURE_BLUETOOTH, false); in getAvailabilityStatus_haveUsbFeature_returnSupported()
240 mPackageManager.setSystemFeature(PackageManager.FEATURE_USB_ACCESSORY, false); in getAvailabilityStatus_haveUsbFeature_returnSupported()
[all …]
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/model/
DPermissions.java23 import android.content.pm.PackageManager;
185 PackageManager userPackageManager = userContext.getPackageManager(); in grantAsUser()
188 PackageManager.FLAG_PERMISSION_WHITELIST_SYSTEM)); in grantAsUser()
197 PackageManager.FLAG_PERMISSION_WHITELIST_SYSTEM); in grantAsUser()
248 newFlags |= PackageManager.FLAG_PERMISSION_GRANTED_BY_ROLE; in grantSingleAsUser()
251 newFlags |= PackageManager.FLAG_PERMISSION_GRANTED_BY_DEFAULT; in grantSingleAsUser()
254 newFlags |= PackageManager.FLAG_PERMISSION_SYSTEM_FIXED; in grantSingleAsUser()
257 newMask |= PackageManager.FLAG_PERMISSION_REVIEW_REQUIRED; in grantSingleAsUser()
260 newMask |= PackageManager.FLAG_PERMISSION_USER_FIXED in grantSingleAsUser()
261 | PackageManager.FLAG_PERMISSION_USER_SET; in grantSingleAsUser()
[all …]
/packages/apps/Settings/src/com/android/settings/deviceinfo/
DStorageWizardMoveProgress.java21 import static android.content.pm.PackageManager.EXTRA_MOVE_ID;
24 import android.content.pm.PackageManager;
25 import android.content.pm.PackageManager.MoveCallback;
73 if (PackageManager.isMoveStatusFinished(status)) {
75 if (status != PackageManager.MOVE_SUCCEEDED) {
89 case PackageManager.MOVE_FAILED_INSUFFICIENT_STORAGE: in moveStatusToMessage()
91 case PackageManager.MOVE_FAILED_DEVICE_ADMIN: in moveStatusToMessage()
95 case PackageManager.MOVE_FAILED_DOESNT_EXIST: in moveStatusToMessage()
97 case PackageManager.MOVE_FAILED_INVALID_LOCATION: in moveStatusToMessage()
99 case PackageManager.MOVE_FAILED_SYSTEM_PACKAGE: in moveStatusToMessage()
[all …]
/packages/apps/Settings/src/com/android/settings/applications/appcompat/
DUserAspectRatioManager.java20 import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_16_9;
21 import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_3_2;
22 import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_4_3;
23 import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_APP_DEFAULT;
24 import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_DISPLAY_SIZE;
25 import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_FULLSCREEN;
26 import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_SPLIT_SCREEN;
27 import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_UNSET;
42 import android.content.pm.PackageManager;
108 @PackageManager.UserMinAspectRatio
[all …]
/packages/apps/TV/common/src/com/android/tv/common/util/
DPermissionUtils.java19 import android.content.pm.PackageManager;
38 == PackageManager.PERMISSION_GRANTED; in hasAccessAllEpg()
48 == PackageManager.PERMISSION_GRANTED; in hasAccessWatchedHistory()
57 == PackageManager.PERMISSION_GRANTED; in hasModifyParentalControls()
64 == PackageManager.PERMISSION_GRANTED; in hasReadTvListings()
69 == PackageManager.PERMISSION_GRANTED; in hasInternet()
74 == PackageManager.PERMISSION_GRANTED; in hasWriteExternalStorage()
82 == PackageManager.PERMISSION_GRANTED; in hasChangeHdmiCecActiveSource()
92 == PackageManager.PERMISSION_GRANTED; in hasReadContetnRatingSystem()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/permission/
DHealthConnectPermissionHelper.java20 import static android.content.pm.PackageManager.PERMISSION_GRANTED;
28 import android.content.pm.PackageManager;
56 PackageManager.FLAG_PERMISSION_USER_SET
57 | PackageManager.FLAG_PERMISSION_USER_FIXED
58 | PackageManager.FLAG_PERMISSION_AUTO_REVOKED;
61 private final PackageManager mPackageManager;
79 PackageManager packageManager, in HealthConnectPermissionHelper()
113 PackageManager.FLAG_PERMISSION_USER_SET, in grantHealthPermission()
138 == PackageManager.PERMISSION_DENIED; in revokeHealthPermission()
146 && (permissionFlags & PackageManager.FLAG_PERMISSION_USER_SET) != 0) { in revokeHealthPermission()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/
DPermissionHelperTest.java35 import android.content.pm.PackageManager;
58 @Mock private PackageManager mMockPackageManagerGrant;
59 @Mock private PackageManager mMockPackageManagerDeny;
75 .getPackageInfo(anyString(), eq(PackageManager.GET_PERMISSIONS)); in setup()
81 .getPackageInfo(anyString(), eq(PackageManager.GET_PERMISSIONS)); in setup()
84 private Context getMockContext(String permissionToGrant, PackageManager packageManager) { in getMockContext()
89 ? PackageManager.PERMISSION_GRANTED in getMockContext()
90 : PackageManager.PERMISSION_DENIED; in getMockContext()
94 public PackageManager getPackageManager() { in getMockContext()
220 .thenReturn(PackageManager.PERMISSION_GRANTED);
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/wifi/
DWifiEntryGroupPreferenceControllerTest.java31 import android.content.pm.PackageManager;
65 private PackageManager mPackageManager;
89 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)).thenReturn(true); in getAvailabilityStatus_wifiAvailable_notRestricted_available()
99 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)).thenReturn(true); in getAvailabilityStatus_wifiAvailable_notRestricted_available_zoneWrite()
111 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)).thenReturn(true); in getAvailabilityStatus_wifiAvailable_notRestricted_available_zoneRead()
123 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)).thenReturn(true); in getAvailabilityStatus_wifiAvailable_notRestricted_available_zoneHidden()
135 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)).thenReturn(true); in getAvailabilityStatus_wifiAvailable_restrictedByUm_viewing()
147 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)).thenReturn(true); in getAvailabilityStatus_wifiAvailable_restrictedByUm_viewing_zoneWrite()
161 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)).thenReturn(true); in getAvailabilityStatus_wifiAvailable_restrictedByUm_viewing_zoneRead()
175 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)).thenReturn(true); in getAvailabilityStatus_wifiAvailable_restrictedByUm_viewing_zoneHidden()
[all …]
/packages/modules/HealthFitness/tests/integrationtests/src/android/healthconnect/tests/permissions/
DHealthConnectWithManagePermissionsTest.java32 import android.content.pm.PackageManager;
123 assertFlagsSet(permissionsFlags.get(DEFAULT_PERM), PackageManager.FLAG_PERMISSION_USER_SET); in testGrantHealthPermission_appHasPermissionDeclared_flagUserSetEnabled()
125 permissionsFlags.get(DEFAULT_PERM), PackageManager.FLAG_PERMISSION_USER_FIXED); in testGrantHealthPermission_appHasPermissionDeclared_flagUserSetEnabled()
138 permissionsFlags.get(DEFAULT_PERM), PackageManager.FLAG_PERMISSION_USER_FIXED); in testGrantHealthPermission_revokeTwiceThenGrant_flagUserSetEnabled()
143 assertFlagsSet(permissionsFlags.get(DEFAULT_PERM), PackageManager.FLAG_PERMISSION_USER_SET); in testGrantHealthPermission_revokeTwiceThenGrant_flagUserSetEnabled()
145 permissionsFlags.get(DEFAULT_PERM), PackageManager.FLAG_PERMISSION_USER_FIXED); in testGrantHealthPermission_revokeTwiceThenGrant_flagUserSetEnabled()
231 assertFlagsSet(permissionsFlags.get(DEFAULT_PERM), PackageManager.FLAG_PERMISSION_USER_SET); in testRevokeHealthPermission_firstRevoke_flagUserSetEnabled()
233 permissionsFlags.get(DEFAULT_PERM), PackageManager.FLAG_PERMISSION_USER_FIXED); in testRevokeHealthPermission_firstRevoke_flagUserSetEnabled()
244 assertFlagsSet(permissionsFlags.get(DEFAULT_PERM), PackageManager.FLAG_PERMISSION_USER_SET); in testRevokeHealthPermission_grantThenRevoke_flagUserSetEnabled()
246 permissionsFlags.get(DEFAULT_PERM), PackageManager.FLAG_PERMISSION_USER_FIXED); in testRevokeHealthPermission_grantThenRevoke_flagUserSetEnabled()
[all …]

12345678910>>...94