/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/pictureinpicture/ |
D | PictureInPictureSettingsTest.java | 27 import android.content.pm.PackageInfo; 58 private ArrayList<PackageInfo> mPrimaryUserPackages; 59 private ArrayList<PackageInfo> mProfileUserPackages; 84 PackageInfo primaryP1 = createPackage("Calculator", true); in testCollectPipApps() 85 PackageInfo primaryP2 = createPackage("Clock", false); in testCollectPipApps() 86 PackageInfo profileP1 = createPackage("Calculator", false); in testCollectPipApps() 87 PackageInfo profileP2 = createPackage("Clock", true); in testCollectPipApps() 101 PackageInfo primaryP1 = createPackage("Android", true); in testAppSort() 102 PackageInfo primaryP2 = createPackage("Boop", true); in testAppSort() 103 PackageInfo primaryP3 = createPackage("Deck", true); in testAppSort() [all …]
|
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/ |
D | AppsAsyncLoaderTest.java | 31 import com.android.storagemanager.deletionhelper.AppsAsyncLoader.PackageInfo; 117 AppsAsyncLoader.PackageInfo app = in test_appInstalledSameDayNeverUsed_isInvalid() 125 AppsAsyncLoader.PackageInfo app = in test_noThresholdFilter_appInstalledSameDayNeverUsed_isValid() 133 AppsAsyncLoader.PackageInfo app = in test_unusedApp_isValid() 141 AppsAsyncLoader.PackageInfo app = in test_noThresholdFilter_unusedApp_isValid() 149 AppsAsyncLoader.PackageInfo app = createPackage(PACKAGE_NAME, -1, 90); in test_unknownLastUse_isFilteredOut() 156 AppsAsyncLoader.PackageInfo app = createPackage(PACKAGE_NAME, -1, 90); in test_noThresholdFilter_unknownLastUse_isFilteredOut() 163 AppsAsyncLoader.PackageInfo app = createPackage(PACKAGE_NAME, 1, 200); in test_oldAppRecentlyUsed_isNotValid() 170 AppsAsyncLoader.PackageInfo app = createPackage(PACKAGE_NAME, 1, 200); in test_noThresholdFilter_oldAppRecentlyUsed_isValid() 177 AppsAsyncLoader.PackageInfo app = createPackage(PACKAGE_NAME, 199, 200); in test_oldUnusedApp_isValid() [all …]
|
D | AppDeletionPreferenceTest.java | 20 import com.android.storagemanager.deletionhelper.AppsAsyncLoader.PackageInfo; 49 PackageInfo app = in testPreferenceSummary() 50 new PackageInfo.Builder() in testPreferenceSummary() 68 PackageInfo app = in testTwoDayPreferenceSummary() 69 new PackageInfo.Builder() in testTwoDayPreferenceSummary() 87 PackageInfo app = in testYesterdayPreferenceSummary() 88 new PackageInfo.Builder() in testYesterdayPreferenceSummary() 106 PackageInfo app = in testTodayPreferenceSummary() 107 new PackageInfo.Builder() in testTodayPreferenceSummary() 125 PackageInfo app = in testNeverUsedPreferenceSummary() [all …]
|
D | AppDeletionTypeTest.java | 55 List<AppsAsyncLoader.PackageInfo> loadedPackages = new ArrayList<>(); in uncheckedAppNotReported() 57 new AppsAsyncLoader.PackageInfo.Builder() in uncheckedAppNotReported() 74 List<AppsAsyncLoader.PackageInfo> loadedPackages = new ArrayList<>(); in checkedAppIsReported() 76 new AppsAsyncLoader.PackageInfo.Builder() in checkedAppIsReported() 106 List<AppsAsyncLoader.PackageInfo> apps = new ArrayList<>(); in testLoadingState_completeEmptyOnNothingFound() 114 List<AppsAsyncLoader.PackageInfo> apps = new ArrayList<>(); in testLoadingState_completeOnDeletableContentFound() 116 new AppsAsyncLoader.PackageInfo.Builder() in testLoadingState_completeOnDeletableContentFound()
|
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/migration/ |
D | MigrationBroadcastSendingTest.java | 36 import android.content.pm.PackageInfo; 91 .thenReturn(new ArrayList<PackageInfo>()); in testBroadcast_noPermissionMatchingApps_noBroadcastSent() 102 ArrayList<PackageInfo> packageInfoArray = createPackageInfoArray(MOCK_CONFIGURED_PACKAGE); in testBroadcast_noIntentMatchingApps_noBroadcastSent() 122 ArrayList<PackageInfo> packageInfoArray = createPackageInfoArray(MOCK_CONFIGURED_PACKAGE); in testBroadcast_oneConfiguredMigratorAppWithNonNullReceiver_explicitBroadcastSent() 129 .thenReturn(new PackageInfo()); in testBroadcast_oneConfiguredMigratorAppWithNonNullReceiver_explicitBroadcastSent() 150 ArrayList<PackageInfo> packageInfoArray = createPackageInfoArray(MOCK_CONFIGURED_PACKAGE); in testBroadcast_oneConfiguredMigratorAppWithNullReceiver_implicitBroadcastSent() 157 .thenReturn(new PackageInfo()); in testBroadcast_oneConfiguredMigratorAppWithNullReceiver_implicitBroadcastSent() 178 ArrayList<PackageInfo> packageInfoArray = createPackageInfoArray(MOCK_CONFIGURED_PACKAGE); in testBroadcast_oneConfiguredMigratorAppWithoutReceiver_implicitBroadcastSent() 185 .thenReturn(new PackageInfo()); in testBroadcast_oneConfiguredMigratorAppWithoutReceiver_implicitBroadcastSent() 205 ArrayList<PackageInfo> packageInfoArray = createPackageInfoArray(MOCK_CONFIGURED_PACKAGE); in testBroadcast_oneConfiguredMigratorAppWithMultipleReceivers_implicitBroadcastSent() [all …]
|
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/ |
D | AppsAsyncLoader.java | 36 import com.android.storagemanager.deletionhelper.AppsAsyncLoader.PackageInfo; 53 public class AppsAsyncLoader extends AsyncLoader<List<PackageInfo>> { 95 public List<PackageInfo> loadInBackground() { in loadInBackground() 99 private List<PackageInfo> loadApps() { in loadApps() 111 List<PackageInfo> stats = new ArrayList<>(); in loadApps() 131 PackageInfo extraInfo = in loadApps() 132 new PackageInfo.Builder() in loadApps() 208 protected void onDiscardResult(List<PackageInfo> result) {} in onDiscardResult() 210 private static boolean isDefaultLauncher(PackageManager packageManager, PackageInfo info) { in isDefaultLauncher() 287 public static final Comparator<PackageInfo> PACKAGE_INFO_COMPARATOR = [all …]
|
D | AppDeletionType.java | 33 import com.android.storagemanager.deletionhelper.AppsAsyncLoader.PackageInfo; 42 implements LoaderManager.LoaderCallbacks<List<PackageInfo>>, DeletionType { 54 private List<PackageInfo> mApps; 103 for (PackageInfo app : mApps) { in clearFreeableData() 156 final PackageInfo app = mApps.get(i); in getTotalAppsFreeableSpace() 223 public Loader<List<PackageInfo>> onCreateLoader(int id, Bundle args) { in onCreateLoader() 238 public void onLoadFinished(Loader<List<PackageInfo>> loader, List<PackageInfo> data) { in onLoadFinished() 246 public void onLoaderReset(Loader<List<PackageInfo>> loader) {} in onLoaderReset() 257 void onAppRebuild(List<PackageInfo> apps); in onAppRebuild()
|
/packages/modules/StatsD/lib/libstatsgtestmatchers/include/ |
D | gtest_matchers.h | 31 using PackageInfo = UidMapping_PackageInfoSnapshot_PackageInfo; variable 120 EQ_MATCHER(PackageInfo, 121 PROPERTY_EQ(PackageInfo, version), 122 PROPERTY_EQ(PackageInfo, uid), 123 PROPERTY_EQ(PackageInfo, deleted), 124 PROPERTY_EQ(PackageInfo, truncated_certificate_hash), 125 PROPERTY_EQ(PackageInfo, name_hash), 126 PROPERTY_EQ(PackageInfo, version_string_hash), 127 PROPERTY_EQ(PackageInfo, name), 128 PROPERTY_EQ(PackageInfo, version_string), [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/specialaccess/ |
D | AppStateAppOpsBridgeTest.java | 33 import android.content.pm.PackageInfo; 71 private ParceledListSlice<PackageInfo> mParceledListSlice1; 72 private ParceledListSlice<PackageInfo> mParceledListSlice2; 73 private List<PackageInfo> mPackages; 113 PackageInfo packageInfo = createPackageInfo(packageName, USER_ID1); in androidPackagesIgnored() 125 PackageInfo packageInfo = createPackageInfo(packageName, USER_ID1); in selfPackageIgnored() 137 PackageInfo packageInfo = createPackageInfo(packageName, USER_ID1); in packagesNotRequestingPermissionIgnored() 152 PackageInfo packageInfo = createPackageInfo(packageName, USER_ID1); in additionalAppOpPermissionPackagesIncluded() 177 PackageInfo packageInfo = createPackageInfo(packageName, USER_ID1); in unavailablePackageIgnored() 191 PackageInfo packageInfo = createPackageInfo(packageName, USER_ID1); in loadsAppOpsExtraInfo_modeAllowed_isPermissible() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/ |
D | NotificationsPreferenceControllerTest.java | 34 import android.content.pm.PackageInfo; 64 private PackageInfo mPackageInfo; 90 mPackageInfo = new PackageInfo(); in setUp() 136 PackageInfo packageInfo = new PackageInfo(); in onCreate_noNotificationPermission_isNotEnabled() 150 PackageInfo packageInfo = new PackageInfo(); in onCreate_systemFixedFlag_isNotEnabled() 167 PackageInfo packageInfo = new PackageInfo(); in onCreate_policyFixedFlag_isNotEnabled() 184 PackageInfo packageInfo = new PackageInfo(); in onCreate_hasPermissions_isEnabled() 203 PackageInfo packageInfo = new PackageInfo(); in onCreate_targetSdkBelow33_systemFixedFlag_isNotEnabled() 222 PackageInfo packageInfo = new PackageInfo(); in onCreate_targetSdkBelow33_policyFixedFlag_isNotEnabled() 241 PackageInfo packageInfo = new PackageInfo(); in onCreate_targetSdkBelow33_doesNotHavePermission_isEnabled()
|
/packages/modules/StatsD/statsd/tests/ |
D | statsd_test_util_test.cpp | 35 PackageInfo packageInfo = buildPackageInfo(appName, uid, version, versionString, in TEST() 58 PackageInfo packageInfo = buildPackageInfo(appName, uid, version, versionString, in TEST_P() 69 PackageInfo packageInfo = buildPackageInfo(appName, uid, version, versionString, in TEST() 84 PackageInfo packageInfo = buildPackageInfo(appName, uid, version, versionString, in TEST() 107 PackageInfo packageInfo = buildPackageInfo(appName, uid, version, versionString, in TEST_P() 123 PackageInfo packageInfo = buildPackageInfo(appName, uid, version, versionString, installer, in TEST_P() 133 PackageInfo packageInfo = in TEST() 144 PackageInfo packageInfo = in TEST() 156 vector<PackageInfo> packageInfos = buildPackageInfos( in TEST_P() 160 PackageInfo packageInfo = buildPackageInfo( in TEST_P() [all …]
|
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/storage/datatypehelpers/ |
D | HealthDataCategoryPriorityHelperTest.java | 38 import android.content.pm.PackageInfo; 111 @Mock private PackageInfo mPackageInfo1; 112 @Mock private PackageInfo mPackageInfo2; 113 @Mock private PackageInfo mPackageInfo3; 367 new int[] {0, PackageInfo.REQUESTED_PERMISSION_GRANTED, 0, 0}; in testUpdateHealthDataPriority_ifWritePermissionsForApp_doesNotRemoveApp() 770 new int[] {PackageInfo.REQUESTED_PERMISSION_GRANTED}; in testOldReSyncHealthDataPriorityTable_maintainsExistingOrdering() 775 new int[] {PackageInfo.REQUESTED_PERMISSION_GRANTED}; in testOldReSyncHealthDataPriorityTable_maintainsExistingOrdering() 780 new int[] {PackageInfo.REQUESTED_PERMISSION_GRANTED}; in testOldReSyncHealthDataPriorityTable_maintainsExistingOrdering() 834 PackageInfo.REQUESTED_PERMISSION_GRANTED, in testOldReSyncHealthDataPriorityTable_addsNewApps_withWritePermission() 835 PackageInfo.REQUESTED_PERMISSION_GRANTED in testOldReSyncHealthDataPriorityTable_addsNewApps_withWritePermission() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
D | TargetPackageInfoGetterTask.java | 20 import android.content.pm.PackageInfo; 28 AsyncTask<String, Void, PackageInfo> { 30 private static final LruCache<String, PackageInfo> sCache = new LruCache<>(MAX_CACHE_ENTRIES); 32 public static PackageInfo getCachedPackageInfo(final String packageName) { in getCachedPackageInfo() 51 protected PackageInfo doInBackground(final String... packageName) { in doInBackground() 55 final PackageInfo packageInfo = pm.getPackageInfo(packageName[0], 0 /* flags */); in doInBackground() 64 protected void onPostExecute(final PackageInfo info) { in onPostExecute()
|
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/permission/ |
D | PackageInfoUtils.java | 26 import android.content.pm.PackageInfo; 82 @NonNull List<PackageInfo> packageInfos, UserHandle user) { in collectSharedUserNameToUidsMappingForUser() 84 for (PackageInfo info : packageInfos) { in collectSharedUserNameToUidsMappingForUser() 96 public List<PackageInfo> getPackagesHoldingHealthPermissions(UserHandle user, Context context) { in getPackagesHoldingHealthPermissions() 98 List<PackageInfo> allInfos = in getPackagesHoldingHealthPermissions() 101 List<PackageInfo> healthAppsInfos = new ArrayList<>(); in getPackagesHoldingHealthPermissions() 103 for (PackageInfo info : allInfos) { in getPackagesHoldingHealthPermissions() 116 PackageInfo info = getPackageInfoWithPermissionsAsUser(packageName, user, context); in hasGrantedHealthPermissions() 137 @Nullable Context context, @Nullable PackageInfo packageInfo) { in anyRequestedHealthPermissionGranted() 147 & PackageInfo.REQUESTED_PERMISSION_GRANTED) in anyRequestedHealthPermissionGranted() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/telemetry/ |
D | UidPackageMapperTest.java | 33 import android.content.pm.PackageInfo; 62 private static final PackageInfo sPackageA = buildPackageInfo(1, "com.android.a", false); 63 private static final PackageInfo sPackageB = buildPackageInfo(1, "com.android.b", false); 64 private static final PackageInfo sPackageC = buildPackageInfo(2, "com.android.c", false); 65 private static final PackageInfo sPackageApex = buildPackageInfo(4, "com.andr.apex", true); 66 private static final PackageInfo sPackageN = buildPackageInfo(5, "com.android.n", false); 67 private static final PackageInfo sPackageX = buildPackageInfo(10, "com.android.x", false); 196 private void broadcastAppAdded(PackageInfo packageInfo) { in broadcastAppAdded() 203 private void broadcastAppRemoved(PackageInfo packageInfo) { in broadcastAppRemoved() 217 private static PackageInfo buildPackageInfo(int uid, String packageName, boolean isApex) { in buildPackageInfo() [all …]
|
/packages/apps/Car/Settings/src/com/android/car/settings/applications/specialaccess/ |
D | AppStateAppOpsBridge.java | 23 import android.content.pm.PackageInfo; 101 List<PackageInfo> packageInfos = getPackageInfos(profileId); in getPackageToStateMapsByProfileId() 104 for (PackageInfo packageInfo : packageInfos) { in getPackageToStateMapsByProfileId() 125 private PermissionState getPermissionState(PackageInfo packageInfo) { in getPermissionState() 131 (permissionFlags[i] & PackageInfo.REQUESTED_PERMISSION_GRANTED) != 0) { in getPermissionState() 140 private List<PackageInfo> getPackageInfos(int profileId) throws RemoteException { in getPackageInfos() 142 List<PackageInfo> packageInfos = in getPackageInfos() 152 PackageInfo pkgInfo = mIPackageManager.getPackageInfo(pkgName, in getPackageInfos() 160 private Set<String> getPackageNames(List<PackageInfo> packageInfos) { in getPackageNames() 162 for (PackageInfo info : packageInfos) { in getPackageNames() [all …]
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | ContactsMockPackageManager.java | 21 import android.content.pm.PackageInfo; 46 private List<PackageInfo> mPackages; 97 public void setInstalledPackages(List<PackageInfo> packages) { in setInstalledPackages() 102 public List<PackageInfo> getInstalledPackages(int flags) { in getInstalledPackages() 107 public PackageInfo getPackageInfo(String packageName, int flags) throws NameNotFoundException { in getPackageInfo() 108 for (PackageInfo info : mPackages) { in getPackageInfo() 133 final List<PackageInfo> packages = getInstalledPackages(flags); in queryContentProviders() 137 for (PackageInfo pkg : packages) { in queryContentProviders() 167 PackageInfo packageInfo = getPackageInfo(packageName, 0); in isPackageStopped()
|
/packages/modules/HealthFitness/tests/unittests/src/android/health/connect/ |
D | HealthPermissionsTest.java | 32 import android.content.pm.PackageInfo; 147 @Mock private PackageInfo mPackageInfo1; 212 PackageInfo.REQUESTED_PERMISSION_GRANTED, in testGetDataCategoriesWithWritePermissionsForPackage_returnsCorrectSet() 214 PackageInfo.REQUESTED_PERMISSION_GRANTED, in testGetDataCategoriesWithWritePermissionsForPackage_returnsCorrectSet() 215 PackageInfo.REQUESTED_PERMISSION_GRANTED in testGetDataCategoriesWithWritePermissionsForPackage_returnsCorrectSet() 238 PackageInfo.REQUESTED_PERMISSION_GRANTED, in testPackageHasWriteHealthPermissionsForCategory_ifNoWritePermissions_returnsFalse() 240 PackageInfo.REQUESTED_PERMISSION_GRANTED, in testPackageHasWriteHealthPermissionsForCategory_ifNoWritePermissions_returnsFalse() 241 PackageInfo.REQUESTED_PERMISSION_GRANTED in testPackageHasWriteHealthPermissionsForCategory_ifNoWritePermissions_returnsFalse() 261 PackageInfo.REQUESTED_PERMISSION_GRANTED, in testPackageHasWriteHealthPermissionsForCategory_ifWritePermissions_returnsTrue() 263 PackageInfo.REQUESTED_PERMISSION_GRANTED, in testPackageHasWriteHealthPermissionsForCategory_ifWritePermissions_returnsTrue() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ |
D | AppInstallerInfoPreferenceControllerTest.java | 37 import android.content.pm.PackageInfo; 107 final PackageInfo packageInfo = mock(PackageInfo.class); in updateState_shouldSetSummary() 118 final PackageInfo packageInfo = mock(PackageInfo.class); in updateState_noAppStoreLink_shouldDisablePreference() 130 final PackageInfo packageInfo = mock(PackageInfo.class); in updateState_hasAppStoreLink_shouldSetPreferenceIntent() 159 final PackageInfo packageInfo = new PackageInfo(); in mockMainlineModule()
|
D | DrawOverlayDetailPreferenceControllerTest.java | 30 import android.content.pm.PackageInfo; 80 when(mFragment.getPackageInfo()).thenReturn(new PackageInfo()); in getAvailabilityStatus_noPermissionRequested_shouldReturnDisabled() 89 final PackageInfo info = new PackageInfo(); in getAvailabilityStatus_noSystemAlertWindowPermission_shouldReturnDisabled() 100 final PackageInfo info = new PackageInfo(); in getAvailabilityStatus_hasSystemAlertWindowPermission_shouldReturnAvailable()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/notifications/ |
D | NotificationsAppListPreferenceControllerTest.java | 34 import android.content.pm.PackageInfo; 178 PackageInfo packageInfo = new PackageInfo(); in onCreate_noNotificationPermission_isNotEnabled() 193 PackageInfo packageInfo = new PackageInfo(); in onCreate_systemFixedFlag_isNotEnabled() 211 PackageInfo packageInfo = new PackageInfo(); in onCreate_policyFixedFlag_isNotEnabled() 240 PackageInfo packageInfo = new PackageInfo(); in onCreate_targetSdkBelow33_systemFixedFlag_isNotEnabled() 260 PackageInfo packageInfo = new PackageInfo(); in onCreate_targetSdkBelow33_policyFixedFlag_isNotEnabled() 280 PackageInfo packageInfo = new PackageInfo(); in onCreate_targetSdkBelow33_doesNotHavePermission_isEnabled() 367 PackageInfo packageInfo = new PackageInfo(); in setupNotificationsEnabledPermissions()
|
/packages/modules/AppSearch/service/java/com/android/server/appsearch/appsindexer/ |
D | AppsIndexerImpl.java | 23 import android.content.pm.PackageInfo; 75 Map<PackageInfo, ResolveInfo> launchablePackages = in doUpdate() 77 Set<PackageInfo> packageInfos = launchablePackages.keySet(); in doUpdate() 79 Map<PackageInfo, ResolveInfo> packagesToBeAddedOrUpdated = new ArrayMap<>(); in doUpdate() 84 for (PackageInfo packageInfo : packageInfos) { in doUpdate() 107 for (PackageInfo packageInfo : packageInfos) { in doUpdate()
|
D | AppsUtil.java | 26 import android.content.pm.PackageInfo; 130 public static Map<PackageInfo, ResolveInfo> getLaunchablePackages( in getLaunchablePackages() 133 List<PackageInfo> packageInfos = in getLaunchablePackages() 136 Map<PackageInfo, ResolveInfo> launchablePackages = new ArrayMap<>(); in getLaunchablePackages() 148 PackageInfo packageInfo = packageInfos.get(i); in getLaunchablePackages() 170 @NonNull Map<PackageInfo, ResolveInfo> packageInfos) { in buildAppsFromPackageInfos() argument 175 for (Map.Entry<PackageInfo, ResolveInfo> entry : packageInfos.entrySet()) { in buildAppsFromPackageInfos() 187 public static byte[] getCertificate(@NonNull PackageInfo packageInfo) { in getCertificate() 218 @NonNull PackageInfo packageInfo, in createMobileApplication()
|
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/ |
D | AppIdleStatePermissionTest.java | 20 import android.content.pm.PackageInfo; 48 final List<PackageInfo> holding = pm.getPackagesHoldingPermissions(new String[]{ in testChangeAppIdleStatePermission() 54 for (PackageInfo pkg : holding) { in testChangeAppIdleStatePermission() 74 final List<PackageInfo> holding = pm.getPackagesHoldingPermissions(new String[]{ in testChangeAppLaunchEstimatePermission() 80 for (PackageInfo pkg : holding) { in testChangeAppLaunchEstimatePermission()
|
/packages/modules/OnDevicePersonalization/common/java/com/android/odp/module/common/ |
D | PackageUtils.java | 30 import android.content.pm.PackageInfo; 81 PackageInfo sdkPackageInfo = in getCertDigest() 118 PackageInfo odpMainlineApexInfo = context.getPackageManager() in getApexVersion() 124 PackageInfo odpAospApexInfo = context.getPackageManager() in getApexVersion() 132 List<PackageInfo> installedPackages = in getApexVersion() 135 for (PackageInfo pkg : installedPackages) { in getApexVersion()
|