Home
last modified time | relevance | path

Searched refs:packageInfo (Results 1 – 25 of 88) sorted by relevance

1234

/frameworks/base/services/tests/servicestests/src/com/android/server/pm/backup/
DBackupUtilsTest.java79 PackageInfo packageInfo = new PackageInfo(); in signaturesMatch_systemApplication_returnsTrue() local
80 packageInfo.packageName = "test"; in signaturesMatch_systemApplication_returnsTrue()
81 packageInfo.applicationInfo = new ApplicationInfo(); in signaturesMatch_systemApplication_returnsTrue()
82 packageInfo.applicationInfo.flags |= ApplicationInfo.FLAG_SYSTEM; in signaturesMatch_systemApplication_returnsTrue()
86 boolean result = BackupUtils.signaturesMatch(storedSigHashes, packageInfo, in signaturesMatch_systemApplication_returnsTrue()
95 PackageInfo packageInfo = new PackageInfo(); in signaturesMatch_disallowsUnsignedApps_storedSignatureNull_returnsFalse() local
96 packageInfo.packageName = "test"; in signaturesMatch_disallowsUnsignedApps_storedSignatureNull_returnsFalse()
97 packageInfo.signingInfo = new SigningInfo( in signaturesMatch_disallowsUnsignedApps_storedSignatureNull_returnsFalse()
103 packageInfo.applicationInfo = new ApplicationInfo(); in signaturesMatch_disallowsUnsignedApps_storedSignatureNull_returnsFalse()
105 boolean result = BackupUtils.signaturesMatch(null, packageInfo, in signaturesMatch_disallowsUnsignedApps_storedSignatureNull_returnsFalse()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/
DAppBackupUtilsTest.java336 PackageInfo packageInfo = new PackageInfo(); in appGetsFullBackup_noCustomBackupAgent_returnsTrue() local
337 packageInfo.applicationInfo = new ApplicationInfo(); in appGetsFullBackup_noCustomBackupAgent_returnsTrue()
338 packageInfo.applicationInfo.backupAgentName = null; in appGetsFullBackup_noCustomBackupAgent_returnsTrue()
340 boolean result = AppBackupUtils.appGetsFullBackup(packageInfo); in appGetsFullBackup_noCustomBackupAgent_returnsTrue()
348 PackageInfo packageInfo = new PackageInfo(); in appGetsFullBackup_withCustomBackupAgentAndFullBackupOnlyFlag_returnsTrue() local
349 packageInfo.applicationInfo = new ApplicationInfo(); in appGetsFullBackup_withCustomBackupAgentAndFullBackupOnlyFlag_returnsTrue()
350 packageInfo.applicationInfo.backupAgentName = "backup.agent"; in appGetsFullBackup_withCustomBackupAgentAndFullBackupOnlyFlag_returnsTrue()
351 packageInfo.applicationInfo.flags |= ApplicationInfo.FLAG_FULL_BACKUP_ONLY; in appGetsFullBackup_withCustomBackupAgentAndFullBackupOnlyFlag_returnsTrue()
353 boolean result = AppBackupUtils.appGetsFullBackup(packageInfo); in appGetsFullBackup_withCustomBackupAgentAndFullBackupOnlyFlag_returnsTrue()
361 PackageInfo packageInfo = new PackageInfo(); in appGetsFullBackup_withCustomBackupAgentAndWithoutFullBackupOnlyFlag_returnsFalse() local
[all …]
DTarBackupReaderTest.java319 PackageInfo packageInfo = new PackageInfo(); in chooseRestorePolicy_doesNotAllowsBackup_returnsIgnore() local
320 packageInfo.applicationInfo = new ApplicationInfo(); in chooseRestorePolicy_doesNotAllowsBackup_returnsIgnore()
321 packageInfo.applicationInfo.flags = ~ApplicationInfo.FLAG_ALLOW_BACKUP; in chooseRestorePolicy_doesNotAllowsBackup_returnsIgnore()
322 PackageManagerStub.sPackageInfo = packageInfo; in chooseRestorePolicy_doesNotAllowsBackup_returnsIgnore()
344 PackageInfo packageInfo = new PackageInfo(); in chooseRestorePolicy_systemAppWithNoAgent_returnsIgnore() local
345 packageInfo.applicationInfo = new ApplicationInfo(); in chooseRestorePolicy_systemAppWithNoAgent_returnsIgnore()
346 packageInfo.applicationInfo.flags |= ApplicationInfo.FLAG_ALLOW_BACKUP; in chooseRestorePolicy_systemAppWithNoAgent_returnsIgnore()
347 packageInfo.applicationInfo.uid = Process.SYSTEM_UID; in chooseRestorePolicy_systemAppWithNoAgent_returnsIgnore()
348 packageInfo.applicationInfo.backupAgentName = null; in chooseRestorePolicy_systemAppWithNoAgent_returnsIgnore()
349 PackageManagerStub.sPackageInfo = packageInfo; in chooseRestorePolicy_systemAppWithNoAgent_returnsIgnore()
[all …]
DBackupManagerMonitorUtilsTest.java93 PackageInfo packageInfo = new PackageInfo(); in monitorEvent_packageAndExtrasAreNotNull_fillsBundleCorrectly() local
94 packageInfo.packageName = "test.package"; in monitorEvent_packageAndExtrasAreNotNull_fillsBundleCorrectly()
95 packageInfo.versionCode = 3; in monitorEvent_packageAndExtrasAreNotNull_fillsBundleCorrectly()
101 packageInfo, 2, extras); in monitorEvent_packageAndExtrasAreNotNull_fillsBundleCorrectly()
119 PackageInfo packageInfo = new PackageInfo(); in monitorEvent_packageAndExtrasAreNotNull_fillsBundleCorrectlyLong() local
120 packageInfo.packageName = "test.package"; in monitorEvent_packageAndExtrasAreNotNull_fillsBundleCorrectlyLong()
121 packageInfo.versionCode = 3; in monitorEvent_packageAndExtrasAreNotNull_fillsBundleCorrectlyLong()
122 packageInfo.versionCodeMajor = 10; in monitorEvent_packageAndExtrasAreNotNull_fillsBundleCorrectlyLong()
128 packageInfo, 2, extras); in monitorEvent_packageAndExtrasAreNotNull_fillsBundleCorrectlyLong()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/fullbackup/
DAppMetadataBackupWriterTest.java113 PackageInfo packageInfo = in testBackupManifest_withoutApkOrSignatures_writesCorrectData() local
117 mBackupWriter.backupManifest(packageInfo, manifestFile, mFilesDir, /* withApk */ false); in testBackupManifest_withoutApkOrSignatures_writesCorrectData()
148 PackageInfo packageInfo = in testBackupManifest_withApk_writesApk() local
152 mBackupWriter.backupManifest(packageInfo, manifestFile, mFilesDir, /* withApk */ true); in testBackupManifest_withApk_writesApk()
177 PackageInfo packageInfo = in testBackupManifest_withSignatures_writesCorrectSignatures() local
179 packageInfo.signingInfo = in testBackupManifest_withSignatures_writesCorrectSignatures()
188 mBackupWriter.backupManifest(packageInfo, manifestFile, mFilesDir, /* withApk */ false); in testBackupManifest_withSignatures_writesCorrectSignatures()
215 PackageInfo packageInfo = createPackageInfo(TEST_PACKAGE, null, TEST_PACKAGE_VERSION_CODE); in testBackupManifest_withoutInstallerPackage_writesEmptyInstaller() local
218 mBackupWriter.backupManifest(packageInfo, manifestFile, mFilesDir, /* withApk */ false); in testBackupManifest_withoutInstallerPackage_writesEmptyInstaller()
230 PackageInfo packageInfo = in testBackupManifest_whenRunPreviouslyWithSameData_producesSameBytesOnSecondRun() local
[all …]
/frameworks/base/services/backup/java/com/android/server/backup/fullbackup/
DAppMetadataBackupWriter.java59 PackageInfo packageInfo, File manifestFile, File filesDir, boolean withApk) in backupManifest() argument
62 packageInfo, in backupManifest()
83 PackageInfo packageInfo, in backupManifest() argument
90 byte[] manifestBytes = getManifestBytes(packageInfo, withApk); in backupManifest()
102 packageInfo.packageName, in backupManifest()
126 private byte[] getManifestBytes(PackageInfo packageInfo, boolean withApk) { in getManifestBytes() argument
127 String packageName = packageInfo.packageName; in getManifestBytes()
133 printer.println(Long.toString(packageInfo.getLongVersionCode())); in getManifestBytes()
142 SigningInfo signingInfo = packageInfo.signingInfo; in getManifestBytes()
170 PackageInfo packageInfo, File metadataFile, File filesDir, byte[] widgetData) in backupWidget() argument
[all …]
/frameworks/base/core/java/android/webkit/
DWebViewProviderResponse.java27 public WebViewProviderResponse(PackageInfo packageInfo, int status) { in WebViewProviderResponse() argument
28 this.packageInfo = packageInfo; in WebViewProviderResponse()
45 packageInfo = in.readTypedObject(PackageInfo.CREATOR); in WebViewProviderResponse()
56 out.writeTypedObject(packageInfo, flags); in writeToParcel()
61 public final PackageInfo packageInfo; field in WebViewProviderResponse
DUserPackage.java39 public UserPackage(UserInfo user, PackageInfo packageInfo) { in UserPackage() argument
41 this.mPackageInfo = packageInfo; in UserPackage()
53 PackageInfo packageInfo = null; in getPackageInfosAllUsers() local
55 packageInfo = context.getPackageManager().getPackageInfoAsUser( in getPackageInfosAllUsers()
59 userPackages.add(new UserPackage(user, packageInfo)); in getPackageInfosAllUsers()
87 public static boolean hasCorrectTargetSdkVersion(PackageInfo packageInfo) { in hasCorrectTargetSdkVersion() argument
88 return packageInfo.applicationInfo.targetSdkVersion >= MINIMUM_SUPPORTED_SDK; in hasCorrectTargetSdkVersion()
DWebViewFactory.java203 if (!response.packageInfo.packageName.equals(packageName)) { in loadWebViewNativeLibraryFromPackage()
210 PackageInfo packageInfo = packageManager.getPackageInfo(packageName, in loadWebViewNativeLibraryFromPackage() local
212 libraryFileName = getWebViewLibrary(packageInfo.applicationInfo); in loadWebViewNativeLibraryFromPackage()
346 response.packageInfo.packageName); in getWebViewContextAndSetProvider()
356 response.packageInfo.packageName, in getWebViewContextAndSetProvider()
372 verifyPackageInfo(response.packageInfo, newPackageInfo); in getWebViewContextAndSetProvider()
455 public static int onWebViewProviderChanged(PackageInfo packageInfo) { in onWebViewProviderChanged() argument
458 startedRelroProcesses = WebViewLibraryLoader.prepareNativeLibraries(packageInfo); in onWebViewProviderChanged()
464 WebViewZygote.onWebViewProviderChanged(packageInfo); in onWebViewProviderChanged()
/frameworks/base/services/core/java/com/android/server/webkit/
DWebViewUpdater.java242 public final PackageInfo packageInfo; field in WebViewUpdater.ProviderAndPackageInfo
244 public ProviderAndPackageInfo(WebViewProviderInfo provider, PackageInfo packageInfo) { in ProviderAndPackageInfo() argument
246 this.packageInfo = packageInfo; in ProviderAndPackageInfo()
255 PackageInfo packageInfo = in getValidWebViewPackagesAndInfos() local
257 if (isValidProvider(allProviders[n], packageInfo)) { in getValidWebViewPackagesAndInfos()
258 providers.add(new ProviderAndPackageInfo(allProviders[n], packageInfo)); in getValidWebViewPackagesAndInfos()
287 return providerAndPackage.packageInfo; in findPreferredWebViewPackage()
302 return providerAndPackage.packageInfo; in findPreferredWebViewPackage()
413 boolean isValidProvider(WebViewProviderInfo configInfo, PackageInfo packageInfo) { in isValidProvider() argument
414 return VALIDITY_OK == validityResult(configInfo, packageInfo); in isValidProvider()
[all …]
/frameworks/base/services/backup/java/com/android/server/backup/keyvalue/
DKeyValueBackupReporter.java208 void onAgentIllegalKey(PackageInfo packageInfo, String key) { in onAgentIllegalKey() argument
209 String packageName = packageInfo.packageName; in onAgentIllegalKey()
215 packageInfo, in onAgentIllegalKey()
253 void onEmptyData(PackageInfo packageInfo) { in onEmptyData() argument
261 packageInfo, in onEmptyData()
292 void onPackageBackupNonIncrementalRequired(PackageInfo packageInfo) { in onPackageBackupNonIncrementalRequired() argument
297 packageInfo, in onPackageBackupNonIncrementalRequired()
332 void onAgentTimedOut(@Nullable PackageInfo packageInfo) { in onAgentTimedOut() argument
333 String packageName = getPackageName(packageInfo); in onAgentTimedOut()
342 packageInfo, in onAgentTimedOut()
[all …]
DKeyValueBackupTask.java371 private int sendDataToTransport(@Nullable PackageInfo packageInfo) in sendDataToTransport() argument
376 mReporter.onAgentDataError(packageInfo.packageName, e); in sendDataToTransport()
482 final PackageInfo packageInfo; in getPackageForBackup() local
484 packageInfo = in getPackageForBackup()
491 ApplicationInfo applicationInfo = packageInfo.applicationInfo; in getPackageForBackup()
496 if (AppBackupUtils.appGetsFullBackup(packageInfo)) { in getPackageForBackup()
504 return packageInfo; in getPackageForBackup()
507 private IBackupAgent bindAgent(PackageInfo packageInfo) throws AgentException { in bindAgent() argument
508 String packageName = packageInfo.packageName; in bindAgent()
513 packageInfo.applicationInfo, BACKUP_MODE_INCREMENTAL); in bindAgent()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DApexManager.java268 private static boolean isActive(PackageInfo packageInfo) { in isActive() argument
269 return (packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_INSTALLED) != 0; in isActive()
278 private static boolean isFactory(PackageInfo packageInfo) { in isFactory() argument
279 return (packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0; in isFactory()
353 final PackageInfo packageInfo = in populateAllPackagesCacheIfNeeded() local
355 mAllPackagesCache.add(packageInfo); in populateAllPackagesCacheIfNeeded()
357 if (activePackagesSet.contains(packageInfo.packageName)) { in populateAllPackagesCacheIfNeeded()
360 + packageInfo.packageName); in populateAllPackagesCacheIfNeeded()
362 activePackagesSet.add(packageInfo.packageName); in populateAllPackagesCacheIfNeeded()
365 if (factoryPackagesSet.contains(packageInfo.packageName)) { in populateAllPackagesCacheIfNeeded()
[all …]
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/robolectric/
DExternalResources.java48 public static Resources injectExternalResources(PackageInfo packageInfo) { in injectExternalResources() argument
50 application.getPackageManager().getPackageInfo(packageInfo.packageName, 0); in injectExternalResources()
53 shadowOf(application.getPackageManager()).addPackage(packageInfo); in injectExternalResources()
55 Resources resources = Resources.forPackageName(packageInfo.packageName); in injectExternalResources()
56 ShadowPackageManager.resources.put(packageInfo.packageName, resources); in injectExternalResources()
154 PackageInfo packageInfo = new PackageInfo(); in createPackageInfo() local
155 packageInfo.packageName = packageName; in createPackageInfo()
156 return packageInfo; in createPackageInfo()
/frameworks/base/services/backup/java/com/android/server/backup/params/
DClearParams.java26 public PackageInfo packageInfo; field in ClearParams
31 PackageInfo packageInfo, in ClearParams() argument
34 this.packageInfo = packageInfo; in ClearParams()
DRestoreParams.java32 @Nullable public final PackageInfo packageInfo; field in RestoreParams
46 PackageInfo packageInfo, in createForSinglePackage() argument
53 packageInfo, in createForSinglePackage()
133 @Nullable PackageInfo packageInfo, in RestoreParams() argument
142 this.packageInfo = packageInfo; in RestoreParams()
/frameworks/base/services/core/java/com/android/server/timezone/
DPackageTrackerHelperImpl.java79 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, flags); in getInstalledPackageVersion() local
80 return packageInfo.getLongVersionCode(); in getInstalledPackageVersion()
86 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, flags); in isPrivilegedApp() local
87 return packageInfo.applicationInfo.isPrivilegedApp(); in isPrivilegedApp()
95 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, flags); in usesPermission() local
96 if (packageInfo.requestedPermissions == null) { in usesPermission()
99 for (String requestedPermission : packageInfo.requestedPermissions) { in usesPermission()
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/users/
DAppRestrictionsHelperTest.java192 final PackageInfo packageInfo = new PackageInfo(); in addSystemAppsWithRequiredAccounts() local
193 packageInfo.applicationInfo = ri.activityInfo.applicationInfo; in addSystemAppsWithRequiredAccounts()
194 packageInfo.applicationInfo.flags |= ApplicationInfo.FLAG_INSTALLED; in addSystemAppsWithRequiredAccounts()
195 packageInfo.requiredAccountType = "account"; in addSystemAppsWithRequiredAccounts()
196 packageInfo.restrictedAccountType = null; in addSystemAppsWithRequiredAccounts()
197 mInstalledAppInfos.add(packageInfo.applicationInfo); in addSystemAppsWithRequiredAccounts()
198 when(mPm.getPackageInfo(eq(pkg), anyInt())).thenReturn(packageInfo); in addSystemAppsWithRequiredAccounts()
214 final PackageInfo packageInfo = new PackageInfo(); in addInstalledApp() local
215 packageInfo.applicationInfo = ri.activityInfo.applicationInfo; in addInstalledApp()
216 packageInfo.applicationInfo.flags |= ApplicationInfo.FLAG_INSTALLED; in addInstalledApp()
[all …]
/frameworks/base/core/java/android/app/backup/
DBackupTransport.java247 public int clearBackupData(PackageInfo packageInfo) { in clearBackupData() argument
315 public int performBackup(PackageInfo packageInfo, ParcelFileDescriptor inFd, int flags) { in performBackup() argument
316 return performBackup(packageInfo, inFd); in performBackup()
323 public int performBackup(PackageInfo packageInfo, ParcelFileDescriptor inFd) { in performBackup() argument
692 public int performBackup(PackageInfo packageInfo, ParcelFileDescriptor inFd, int flags) in performBackup() argument
694 return BackupTransport.this.performBackup(packageInfo, inFd, flags); in performBackup()
698 public int clearBackupData(PackageInfo packageInfo) throws RemoteException { in clearBackupData() argument
699 return BackupTransport.this.clearBackupData(packageInfo); in clearBackupData()
/frameworks/base/core/java/android/os/
DVintfObject.java70 public static int verify(String[] packageInfo) { in verify() argument
71 if (packageInfo != null && packageInfo.length > 0) { in verify()
/frameworks/opt/car/setupwizard/library/main/tests/robotests/src/com/android/car/setupwizardlib/partner/
DExternalResources.java53 public static Resources injectExternalResources(PackageInfo packageInfo) { in injectExternalResources() argument
55 application.getPackageManager().getPackageInfo(packageInfo.packageName, 0); in injectExternalResources()
58 shadowOf(application.getPackageManager()).addPackage(packageInfo); in injectExternalResources()
60 Resources resources = Resources.forPackageName(packageInfo.packageName); in injectExternalResources()
61 shadowOf(application.getPackageManager()).resources.put(packageInfo.packageName, resources); in injectExternalResources()
240 PackageInfo packageInfo = new PackageInfo(); in createPackageInfo() local
241 packageInfo.packageName = packageName; in createPackageInfo()
242 return packageInfo; in createPackageInfo()
/frameworks/base/packages/LocalTransport/src/com/android/localtransport/
DLocalTransport.java191 public int performBackup(PackageInfo packageInfo, ParcelFileDescriptor data) { in performBackup() argument
192 return performBackup(packageInfo, data, /*flags=*/ 0); in performBackup()
196 public int performBackup(PackageInfo packageInfo, ParcelFileDescriptor data, int flags) { in performBackup() argument
198 return performBackupInternal(packageInfo, data, flags); in performBackup()
205 PackageInfo packageInfo, ParcelFileDescriptor data, int flags) { in performBackupInternal() argument
210 Log.i(TAG, "Performing incremental backup for " + packageInfo.packageName); in performBackupInternal()
212 Log.i(TAG, "Performing non-incremental backup for " + packageInfo.packageName); in performBackupInternal()
214 Log.i(TAG, "Performing backup for " + packageInfo.packageName); in performBackupInternal()
220 Log.v(TAG, "performBackup() pkg=" + packageInfo.packageName in performBackupInternal()
224 + packageInfo.packageName); in performBackupInternal()
[all …]
/frameworks/base/services/robotests/backup/src/com/android/server/backup/keyvalue/
DKeyValueBackupTaskTest.java404 argThat(packageInfo(PM_PACKAGE)), any(), anyInt())) in testRunTask_whenTransportReturnsTransportErrorForPm_cleansUpPmFiles()
419 argThat(packageInfo(PM_PACKAGE)), any(), anyInt())) in testRunTask_whenTransportReturnsTransportErrorForPm_resetsBackupState()
597 .performBackup(argThat(packageInfo(PACKAGE_1)), any(), anyInt()); in testRunTask_whenPackageUnknown()
614 .performBackup(argThat(packageInfo(PACKAGE_2)), any(), anyInt()); in testRunTask_whenFirstPackageUnknown_callsTransportForSecondPackage()
627 .performBackup(argThat(packageInfo(PACKAGE_1)), any(), anyInt()); in testRunTask_whenPackageNotEligibleForBackup()
643 .performBackup(argThat(packageInfo(PACKAGE_2)), any(), anyInt()); in testRunTask_whenFirstPackageNotEligibleForBackup_callsTransportForSecondPackage()
673 .performBackup(argThat(packageInfo(PACKAGE_2)), any(), anyInt()); in testRunTask_whenFirstPackageDoesFullBackup_callsTransportForSecondPackage()
700 .performBackup(argThat(packageInfo(PACKAGE_2)), any(), anyInt()); in testRunTask_whenFirstPackageIsStopped_callsTransportForSecondPackage()
948 verify(mReporter).onAgentResultError(argThat(packageInfo(PACKAGE_1))); in testRunTask_whenAgentOnBackupThrows_reportsCorrectly()
981 .performBackup(argThat(packageInfo(PACKAGE_1)), any(), anyInt()); in testRunTask_whenAgentOnBackupThrows_doesNotCallTransport()
[all …]
/frameworks/base/services/core/java/com/android/server/accounts/
DAccountManagerBackupHelper.java124 final PackageInfo packageInfo; in apply() local
126 packageInfo = packageManager.getPackageInfoAsUser(packageName, in apply()
138 packageInfo.signatures); in apply()
141 if (!certDigest.equals(signaturesSha256Digest) && (packageInfo.signatures.length <= 1 in apply()
145 final int uid = packageInfo.applicationInfo.uid; in apply()
183 final PackageInfo packageInfo; in backupAccountAccessPermissions() local
185 packageInfo = packageManager.getPackageInfoAsUser(packageName, in backupAccountAccessPermissions()
193 packageInfo.signatures); in backupAccountAccessPermissions()
/frameworks/ml/nn/runtime/
DTypeManager.cpp109 ANeuralNetworks_PackageInfo packageInfo; in fetchAppPackageLocationInfo() local
110 if (!ANeuralNetworks_fetch_PackageInfo(uid, &packageInfo)) { in fetchAppPackageLocationInfo()
113 appPackageInfo->appPackageName = packageInfo.appPackageName; in fetchAppPackageLocationInfo()
114 appPackageInfo->appIsSystemApp = packageInfo.appIsSystemApp; in fetchAppPackageLocationInfo()
115 appPackageInfo->appIsOnVendorImage = packageInfo.appIsOnVendorImage; in fetchAppPackageLocationInfo()
116 appPackageInfo->appIsOnProductImage = packageInfo.appIsOnProductImage; in fetchAppPackageLocationInfo()
118 ANeuralNetworks_free_PackageInfo(&packageInfo); in fetchAppPackageLocationInfo()

1234