Home
last modified time | relevance | path

Searched refs:pi (Results 1 – 25 of 109) sorted by relevance

12345

/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DNotificationBackendTest.java85 PackageInfo pi = new PackageInfo(); in testMarkAppRow_fixedImportance() local
86 pi.packageName = "test"; in testMarkAppRow_fixedImportance()
87 pi.applicationInfo = new ApplicationInfo(); in testMarkAppRow_fixedImportance()
88 pi.applicationInfo.packageName = "test"; in testMarkAppRow_fixedImportance()
89 pi.applicationInfo.uid = 123; in testMarkAppRow_fixedImportance()
91 when(mInm.isImportanceLocked(pi.packageName, 123)).thenReturn(true); in testMarkAppRow_fixedImportance()
94 mock(PackageManager.class), pi); in testMarkAppRow_fixedImportance()
102 PackageInfo pi = new PackageInfo(); in testMarkAppRow_notFixedPermission() local
103 pi.packageName = "test"; in testMarkAppRow_notFixedPermission()
104 pi.applicationInfo = new ApplicationInfo(); in testMarkAppRow_notFixedPermission()
[all …]
DNotificationAccessConfirmationActivityTest.java90 PackageInfo pi = new PackageInfo(); in installPackage() local
91 pi.packageName = packageName; in installPackage()
92 pi.applicationInfo = new ApplicationInfo(); in installPackage()
93 pi.applicationInfo.packageName = packageName; in installPackage()
94 pi.applicationInfo.name = appName; in installPackage()
95 shadowOf(RuntimeEnvironment.application.getPackageManager()).installPackage(pi); in installPackage()
/packages/modules/Connectivity/tests/unit/java/com/android/server/net/
DPersistentIntTest.kt64 val pi = createPersistentInt() in testNormalReadWrite() constant
65 assertEquals(0, pi.get()) in testNormalReadWrite()
66 pi.set(12345) in testNormalReadWrite()
67 assertEquals(12345, pi.get()) in testNormalReadWrite()
70 val pi2 = createPersistentInt(pathOf(pi)) in testNormalReadWrite()
84 val pi = createPersistentInt() in testReadOrWriteFailsAfterCreate() constant
85 pi.set(42) in testReadOrWriteFailsAfterCreate()
86 assertEquals(42, pi.get()) in testReadOrWriteFailsAfterCreate()
88 val path = pathOf(pi) in testReadOrWriteFailsAfterCreate()
90 assertThrows(IOException::class.java) { pi.get() } in testReadOrWriteFailsAfterCreate()
[all …]
/packages/apps/Settings/src/com/android/settings/applications/
DRunningState.java460 PackageInfo pi = pm.getPackageInfo(name, 0); in ensureLabel() local
461 if (pi.sharedUserLabel != 0) { in ensureLabel()
463 pi.sharedUserLabel, pi.applicationInfo); in ensureLabel()
467 mPackageInfo = pi.applicationInfo; in ensureLabel()
850 private boolean isInterestingProcess(ActivityManager.RunningAppProcessInfo pi) { in isInterestingProcess() argument
851 if ((pi.flags & ActivityManager.RunningAppProcessInfo.FLAG_CANT_SAVE_STATE) != 0) { in isInterestingProcess()
854 if ((pi.flags & ActivityManager.RunningAppProcessInfo.FLAG_PERSISTENT) == 0 in isInterestingProcess()
855 && pi.importance >= ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND in isInterestingProcess()
856 && pi.importance < ActivityManager.RunningAppProcessInfo.IMPORTANCE_CANT_SAVE_STATE in isInterestingProcess()
857 && pi.importanceReasonCode in isInterestingProcess()
[all …]
/packages/apps/Settings/src/com/android/settings/users/
DAppRestrictionsFragment.java336 private boolean isPlatformSigned(PackageInfo pi) { in isPlatformSigned() argument
337 return (pi != null && pi.signatures != null && in isPlatformSigned()
338 mSysPackageInfo.signatures[0].equals(pi.signatures[0])); in isPlatformSigned()
341 private boolean isAppEnabledForUser(PackageInfo pi) { in isAppEnabledForUser() argument
342 if (pi == null) return false; in isAppEnabledForUser()
343 final int flags = pi.applicationInfo.flags; in isAppEnabledForUser()
344 final int privateFlags = pi.applicationInfo.privateFlags; in isAppEnabledForUser()
376 PackageInfo pi = null; in populateApps() local
378 pi = ipm.getPackageInfo(packageName, in populateApps()
384 if (pi == null) { in populateApps()
[all …]
/packages/modules/IntentResolver/tests/unit/src/com/android/intentresolver/ui/
DShareResultSenderImplTest.kt55 val pi = PendingIntent.getBroadcast(context, 0, Intent(), PendingIntent.FLAG_IMMUTABLE) in <lambda>() constant
67 resultSender = pi.intentSender, in <lambda>()
89 val pi = PendingIntent.getBroadcast(context, 0, Intent(), PendingIntent.FLAG_IMMUTABLE) in <lambda>() constant
101 resultSender = pi.intentSender, in <lambda>()
127 val pi = PendingIntent.getBroadcast(context, 0, Intent(), PendingIntent.FLAG_IMMUTABLE) in <lambda>() constant
139 resultSender = pi.intentSender, in <lambda>()
168 val pi = PendingIntent.getBroadcast(context, 0, Intent(), PendingIntent.FLAG_IMMUTABLE) in <lambda>() constant
180 resultSender = pi.intentSender, in <lambda>()
/packages/apps/Settings/src/com/android/settings/media/
DMediaOutputUtils.java51 final MediaController.PlaybackInfo pi = controller.getPlaybackInfo(); in getActiveLocalMediaController() local
52 if (pi == null) { in getActiveLocalMediaController()
64 + ", play back type : " + pi.getPlaybackType() + ", play back state : " in getActiveLocalMediaController()
73 if (pi.getPlaybackType() == MediaController.PlaybackInfo.PLAYBACK_TYPE_REMOTE) { in getActiveLocalMediaController()
83 if (pi.getPlaybackType() == MediaController.PlaybackInfo.PLAYBACK_TYPE_LOCAL) { in getActiveLocalMediaController()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/users/
DAppRestrictionsFragment.java410 private boolean isPlatformSigned(PackageInfo pi) { in isPlatformSigned() argument
411 return (pi != null && pi.signatures != null && in isPlatformSigned()
412 mSysPackageInfo.signatures[0].equals(pi.signatures[0])); in isPlatformSigned()
415 private boolean isAppEnabledForUser(PackageInfo pi) { in isAppEnabledForUser() argument
416 if (pi == null) return false; in isAppEnabledForUser()
417 final int flags = pi.applicationInfo.flags; in isAppEnabledForUser()
418 final int privateFlags = pi.applicationInfo.privateFlags; in isAppEnabledForUser()
462 PackageInfo pi = null; in populateApps() local
464 pi = mIPm.getPackageInfo(packageName, in populateApps()
470 if (pi == null) { in populateApps()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/pictureinpicture/
DPictureInPictureSettingsTest.java151 PackageInfo pi = new PackageInfo(); in createPackage() local
156 pi.activities = new ActivityInfo[1]; in createPackage()
157 pi.activities[0] = ai; in createPackage()
158 pi.applicationInfo = new ApplicationInfo(); in createPackage()
159 pi.applicationInfo.name = appTitle; in createPackage()
160 return pi; in createPackage()
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DTetheringNotificationUpdater.java272 final PendingIntent pi = PendingIntent.getActivity( in notifyTetheringDisabledByRestriction()
282 RESTRICTED_NOTIFICATION_ID, false /* ongoing */, pi, new Action[0]); in notifyTetheringDisabledByRestriction()
295 final PendingIntent pi = PendingIntent.getBroadcast( in notifyTetheringNoUpstream() local
300 final Action action = new Action.Builder(NO_ICON_ID, disableButton, pi).build(); in notifyTetheringNoUpstream()
317 final PendingIntent pi = PendingIntent.getActivity( in setupRoamingNotification()
327 ROAMING_NOTIFICATION_ID, true /* ongoing */, pi, new Action[0]); in setupRoamingNotification()
345 @Nullable PendingIntent pi, @NonNull final Action... actions) { in showNotification() argument
356 .setContentIntent(pi) in showNotification()
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DHttpClientFactory.java110 PackageInfo pi; in getUserAgent() local
112 pi = context.getPackageManager().getPackageInfo( in getUserAgent()
118 pi.packageName, in getUserAgent()
119 pi.versionName, in getUserAgent()
/packages/apps/Settings/src/com/android/settings/notification/history/
DNotificationSbnViewHolder.java99 void addOnClick(int position, String pkg, int uid, int userId, PendingIntent pi, in addOnClick() argument
104 boolean isPendingIntentValid = pi != null && pi.isActivity(); in addOnClick()
114 if (pi != null && isPendingIntentValid) { in addOnClick()
119 pi.send(options.toBundle()); in addOnClick()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/safetycenter/ui/
DPendingIntentSender.kt31 fun send(pi: PendingIntent?, launchTaskId: Int? = null) { in send()
32 if (pi == null) { in send()
35 com.android.safetycenter.pendingintents.PendingIntentSender.send(pi, launchTaskId) in send()
/packages/modules/StatsD/framework/test/hostsidetests/app/src/com/android/tests/statsd/framework/appnopermission/
DStatsdPermissionTest.java78 PendingIntent pi = PendingIntent.getBroadcast( in testApisThrowExceptionWithoutPermission() local
82 () -> statsManager.setBroadcastSubscriber(pi, 123, 0)); in testApisThrowExceptionWithoutPermission()
90 () -> statsManager.setFetchReportsOperation(pi, 123)); in testApisThrowExceptionWithoutPermission()
98 () -> statsManager.setActiveConfigsChangedOperation(pi)); in testApisThrowExceptionWithoutPermission()
/packages/apps/DeskClock/src/com/android/deskclock/data/
DTimerModel.kt636 val pi: PendingIntent? = PendingIntent.getService(mContext, in updateAlarmManager() constant
638 if (pi != null) { in updateAlarmManager()
639 mAlarmManager.cancel(pi) in updateAlarmManager()
640 pi.cancel() in updateAlarmManager()
644 val pi: PendingIntent = PendingIntent.getService(mContext, in updateAlarmManager() constant
646 schedulePendingIntent(mAlarmManager, nextExpiringTimer.expirationTime, pi) in updateAlarmManager()
809 fun schedulePendingIntent(am: AlarmManager, triggerTime: Long, pi: PendingIntent) { in schedulePendingIntent()
812 am.setExactAndAllowWhileIdle(ELAPSED_REALTIME_WAKEUP, triggerTime, pi) in schedulePendingIntent()
814 am.setExact(ELAPSED_REALTIME_WAKEUP, triggerTime, pi) in schedulePendingIntent()
/packages/apps/DeskClock/src/com/android/alarmclock/
DDigitalAppWidgetProvider.kt188 val pi: PendingIntent = in <lambda>() constant
190 getAlarmManager(context).setExact(AlarmManager.RTC, nextDay.time, pi) in <lambda>()
197 val pi: PendingIntent? = in <lambda>() constant
199 if (pi != null) { in <lambda>()
200 getAlarmManager(context).cancel(pi) in <lambda>()
201 pi.cancel() in <lambda>()
328 val pi: PendingIntent = PendingIntent.getActivity(context, 0, openApp, 0) in <lambda>() constant
329 rv.setOnClickPendingIntent(R.id.digital_widget, pi) in <lambda>()
392 val pi: PendingIntent = PendingIntent.getActivity(context, 0, selectCity, 0) in <lambda>() constant
393 rv.setPendingIntentTemplate(R.id.world_city_list, pi) in <lambda>()
/packages/apps/Settings/tests/robotests/src/com/android/settings/gestures/
DButtonNavigationSettingsFragmentTest.java65 PackageInfo pi = new PackageInfo(); in addPackageToPackageManager() local
66 pi.packageName = pkg; in addPackageToPackageManager()
67 shadowPm.installPackage(pi); in addPackageToPackageManager()
/packages/apps/Car/Settings/src/com/android/car/settings/enterprise/
DDeviceAdminAddPoliciesPreferenceController.java59 for (DeviceAdminInfo.PolicyInfo pi : mDeviceAdminInfo.getUsedPolicies()) { in getPolicyText()
60 int labelId = isSystemUser ? pi.label : pi.labelForSecondaryUsers; in getPolicyText()
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DServicePermissionTest.java64 for (PackageInfo pi : holding) { in testServicePermissions()
65 if (!Objects.equals("android", pi.packageName)) { in testServicePermissions()
66 failures.add(perm + " held by " + pi.packageName); in testServicePermissions()
/packages/apps/Settings/src/com/android/settings/notification/
DMediaVolumePreferenceController.java137 PendingIntent pi = null; in getSliceEndItem() local
145 pi = in getSliceEndItem()
168 pi = in getSliceEndItem()
178 return SliceAction.createDeeplink(pi, icon, ListBuilder.ICON_IMAGE, getPreferenceKey()); in getSliceEndItem()
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/
DPermissionHelper.java63 final PackageInfo pi = getAppPackageInfo(pkgName); in getDeclaredHealthPermissions() local
64 final String[] requestedPermissions = pi.requestedPermissions; in getDeclaredHealthPermissions()
76 final PackageInfo pi = getAppPackageInfo(pkgName); in getGrantedHealthPermissions() local
77 final String[] requestedPermissions = pi.requestedPermissions; in getGrantedHealthPermissions()
78 final int[] requestedPermissionsFlags = pi.requestedPermissionsFlags; in getGrantedHealthPermissions()
/packages/modules/Connectivity/clatd/
Dclatd.c154 struct tun_pi pi; in process_packet_4_to_6() member
183 uint16_t proto = ntohs(buf.pi.proto); in process_packet_4_to_6()
189 if (buf.pi.flags != 0) { in process_packet_4_to_6()
190 logmsg(ANDROID_LOG_WARN, "%s: unexpected flags = %d", __func__, buf.pi.flags); in process_packet_4_to_6()
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/
DAppStateUsageStatsBridge.java110 PackageInfo pi = null; in getDaysSinceInstalled() local
112 pi = mPm.getPackageInfo(packageName, 0); in getDaysSinceInstalled()
117 if (pi == null) { in getDaysSinceInstalled()
120 return (TimeUnit.MILLISECONDS.toDays(mClock.getCurrentTime() - pi.firstInstallTime)); in getDaysSinceInstalled()
/packages/apps/TvSettings/unbundle/java/com/android/tv/settings/unbundle/sdklib/
DPendingIntentCompat.java23 public PendingIntentCompat(PendingIntent pi) { in PendingIntentCompat() argument
24 this.mPi = pi; in PendingIntentCompat()
/packages/apps/Settings/src/com/android/settings/development/
DDevelopmentAppPicker.java103 PackageInfo pi = mPm.getPackageInfo(ai.packageName, in getCandidates() local
105 if (pi.requestedPermissions == null) { in getCandidates()
108 for (String requestedPermission : pi.requestedPermissions) { in getCandidates()

12345