/packages/apps/Settings/src/com/android/settings/notification/ |
D | NotificationBackend.java | 90 row.pkg = app.packageName; in loadAppRow() 95 Log.e(TAG, "Error loading application label for " + row.pkg, t); in loadAppRow() 96 row.label = row.pkg; in loadAppRow() 99 row.banned = getNotificationsBanned(row.pkg, row.uid); in loadAppRow() 100 row.showBadge = canShowBadge(row.pkg, row.uid); in loadAppRow() 101 row.bubblePreference = getBubblePreference(row.pkg, row.uid); in loadAppRow() 103 row.blockedChannelCount = getBlockedChannelCount(row.pkg, row.uid); in loadAppRow() 104 row.channelCount = getChannelCount(row.pkg, row.uid); in loadAppRow() 135 String pkg, int userId) { in getDeviceList() argument 141 cdm.getAssociations(pkg, userId), in getDeviceList() [all …]
|
/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/permission/utils/ |
D | GrantRevokeTests.kt | 348 val pkg = createMockPackage(mapOf(FG_PERM_NAME to false)) in grantOnePermTest() constant 350 perms[FG_PERM_NAME] = createMockPerm(pkg, FG_PERM_NAME) in grantOnePermTest() 351 val group = createMockGroup(pkg, perms) in grantOnePermTest() 373 val pkg = createMockPackage(mapOf(FG_PERM_NAME to false, FG_PERM_2_NAME to false)) in grantTwoPermTest() constant 375 perms[FG_PERM_NAME] = createMockPerm(pkg, FG_PERM_NAME) in grantTwoPermTest() 376 perms[FG_PERM_2_NAME] = createMockPerm(pkg, FG_PERM_2_NAME, BG_PERM_NAME) in grantTwoPermTest() 377 val group = createMockGroup(pkg, perms) in grantTwoPermTest() 403 val pkg = createMockPackage(mapOf(FG_PERM_NAME_NO_APP_OP to false)) in grantNoAppOpPerm() constant 405 perms[FG_PERM_NAME_NO_APP_OP] = createMockPerm(pkg, FG_PERM_NAME_NO_APP_OP) in grantNoAppOpPerm() 406 val group = createMockGroup(pkg, perms) in grantNoAppOpPerm() [all …]
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/device/apps/specialaccess/ |
D | PowerAllowlistBackend.java | 69 public boolean isSysAllowlisted(String pkg) { in isSysAllowlisted() argument 70 return mSysAllowlistedApps.contains(pkg); in isSysAllowlisted() 76 public boolean isAllowlisted(String pkg) { in isAllowlisted() argument 77 if (mAllowlistedApps.contains(pkg)) { in isAllowlisted() 81 return isDefaultActiveApp(pkg); in isAllowlisted() 87 public boolean isDefaultActiveApp(String pkg) { in isDefaultActiveApp() argument 92 if (mDefaultActiveApps.contains(pkg)) { in isDefaultActiveApp() 98 return devicePolicyManager.packageHasActiveAdmins(pkg); in isDefaultActiveApp() 109 for (String pkg : pkgs) { in isAllowlisted() 110 if (isAllowlisted(pkg)) { in isAllowlisted() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/service/ |
D | LocationAccessCheck.java | 226 String pkg = lineComponents[0]; in loadAlreadyNotifiedPackagesLocked() local 231 packages.add(new UserPackage(mContext, pkg, user)); in loadAlreadyNotifiedPackagesLocked() 266 writer.append(userPkg.pkg); in safeAlreadyNotifiedPackagesLocked() 283 private void markAsNotified(@NonNull String pkg, @NonNull UserHandle user) { in markAsNotified() argument 286 alreadyNotifiedPackages.add(new UserPackage(mContext, pkg, user)); in markAsNotified() 395 UserPackage pkg = packages.get(i); in addLocationNotificationIfNeeded() local 398 LocationManager.class, pkg.user); in addLocationNotificationIfNeeded() 399 if (locationManager.isExtraLocationControllerPackageEnabled() && pkg.pkg.equals( in addLocationNotificationIfNeeded() 401 packageToNotifyFor = pkg; in addLocationNotificationIfNeeded() 443 String pkg = packageOps.getPackageName(); in getLocationUsersWithNoNotificationYetLocked() local [all …]
|
/packages/apps/SecureElement/src/com/android/se/security/gpac/ |
D | PKG_REF_DO.java | 37 public PKG_REF_DO(byte[] pkg) { in PKG_REF_DO() argument 38 super(pkg, TAG, 0, (pkg == null ? 0 : pkg.length)); in PKG_REF_DO() 39 if (pkg != null) { in PKG_REF_DO() 40 mPackageName = new String(pkg); in PKG_REF_DO() 87 byte[] pkg = new byte[getValueLength()]; in interpret() 88 System.arraycopy(data, index, pkg, 0, getValueLength()); in interpret() 89 mPackageName = new String(pkg); in interpret() 100 byte[] pkg = mPackageName.getBytes(); in build() 102 if (pkg.length > 128) { in build() 109 stream.write(pkg.length); in build() [all …]
|
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/ |
D | CarPackageManagerTest.java | 63 String pkg = "I can't believe a package with this name exist. If so, well, too bad!"; in testgetTargetCarVersion_noPackage() local 66 () -> mCarPackageManager.getTargetCarVersion(pkg)); in testgetTargetCarVersion_noPackage() 68 assertWithMessage("exception msg").that(e.getMessage()).contains(pkg); in testgetTargetCarVersion_noPackage() 73 String pkg = "com.android.car"; in testGetTargetCarMajorAndMinorVersion_notSet() local 79 CarVersion apiVersion = mCarPackageManager.getTargetCarVersion(pkg); in testGetTargetCarMajorAndMinorVersion_notSet() 81 assertWithMessage("getTargetCarVersion(%s)", pkg).that(apiVersion).isNotNull(); in testGetTargetCarMajorAndMinorVersion_notSet() 82 assertWithMessage("major version for %s", pkg) in testGetTargetCarMajorAndMinorVersion_notSet() 85 assertWithMessage("minor version for %s", pkg) in testGetTargetCarMajorAndMinorVersion_notSet() 92 String pkg = sContext.getPackageName(); in testGetTargetCarMajorAndMinorVersion_set() local 94 CarVersion apiVersion = mCarPackageManager.getTargetCarVersion(pkg); in testGetTargetCarMajorAndMinorVersion_set() [all …]
|
/packages/modules/AdServices/sdksandbox/tests/hostsidetests/src/com/android/tests/sdksandbox/host/ |
D | SdkSandboxLifecycleHostTest.java | 41 private void clearProcess(String pkg) throws Exception { in clearProcess() argument 42 getDevice().executeShellCommand(String.format("pm clear %s", pkg)); in clearProcess() 45 private void startActivity(String pkg, String activity) throws Exception { in startActivity() argument 46 getDevice().executeShellCommand(String.format("am start -W -n %s/.%s", pkg, activity)); in startActivity() 49 private void killApp(String pkg) throws Exception { in killApp() argument 50 getDevice().executeShellCommand(String.format("am force-stop %s", pkg)); in killApp() 53 private String getUidForPackage(String pkg) throws Exception { in getUidForPackage() argument 54 String pid = getDevice().getProcessPid(pkg); in getUidForPackage() 56 throw new Exception(String.format("Could not find PID for %s", pkg)); in getUidForPackage() 64 private String getSdkSandboxNameForPackage(String pkg) throws Exception { in getSdkSandboxNameForPackage() argument [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/hibernation/ |
D | HibernationPolicy.kt | 235 pkgs.groupBy { pkg -> pkg.uid } in getAppsToHibernate() method 308 userApps.forEachInParallel(Main) { pkg: LightPackageInfo -> in getAppsToHibernate() method 309 if (isPackageHibernationExemptBySystem(pkg, user)) { in getAppsToHibernate() 313 if (isPackageHibernationExemptByUser(context, pkg)) { in getAppsToHibernate() 317 val packageName = pkg.packageName in getAppsToHibernate() 335 userAppsToHibernate.add(pkg) in getAppsToHibernate() 374 pkg: LightPackageInfo, in isPackageHibernationExemptBySystem() 377 if (!LauncherPackagesLiveData.getInitializedValue().contains(pkg.packageName)) { in isPackageHibernationExemptBySystem() 384 .getInitializedValue()[pkg.packageName] in isPackageHibernationExemptBySystem() 409 val carrierPrivilegedStatus = CarrierPrivilegedStatusLiveData[pkg.packageName] in isPackageHibernationExemptBySystem() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/ |
D | ServiceLiveData.kt | 189 suspend fun isServiceEnabled(pkg: String?): Boolean { in <lambda>() 190 if (pkg == null) { in <lambda>() 195 pkg in enabledAccessibilityServicesLiveData.value!! in <lambda>() 198 pkg in enabledInputMethodsLiveData.value!! in <lambda>() 201 pkg in enabledNotificationListenersLiveData.value!! in <lambda>() 204 pkg == selectedWallpaperServiceLiveData.value in <lambda>() 207 pkg == selectedVoiceInteractionServiceLiveData.value in <lambda>() 210 pkg == selectedAutofillServiceLiveData.value in <lambda>() 213 pkg in enabledDreamServicesLiveData.value!! in <lambda>() 216 pkg !in disabledPrintServicesLiveData.value!! in <lambda>() [all …]
|
D | UserSensitivityLiveData.kt | 105 for (pkg in pkgs) { in <lambda>() constant 107 val userSensitiveState = sensitiveStatePerUid.getOrPut(pkg.uid) { in <lambda>() 110 userSensitiveState.packages.add(pkg) in <lambda>() 114 LauncherPackagesLiveData.value?.contains(pkg.packageName) ?: return in <lambda>() 116 KotlinUtils.packageHasLaunchIntent(context, pkg.packageName) in <lambda>() 118 val pkgIsSystemApp = pkg.appFlags and ApplicationInfo.FLAG_SYSTEM != 0 in <lambda>() 120 for (perm in pkg.requestedPermissions.intersect(runtimePerms)) { in <lambda>() 128 val permGrantedByDefault = pm.getPermissionFlags(perm, pkg.packageName, in <lambda>() 149 flags = if (pkg.uid < Process.FIRST_APPLICATION_UID) { in <lambda>()
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | AppStateSmsPremBridge.java | 50 protected void updateExtraInfo(AppEntry app, String pkg, int uid) { in updateExtraInfo() argument 51 app.extraInfo = getState(pkg); in updateExtraInfo() 54 public SmsState getState(String pkg) { in getState() argument 56 state.smsState = getSmsState(pkg); in getState() 60 private int getSmsState(String pkg) { in getSmsState() argument 61 return mSmsManager.getPremiumSmsConsent(pkg); in getSmsState() 64 public void setSmsState(String pkg, int state) { in setSmsState() argument 65 mSmsManager.setPremiumSmsConsent(pkg, state); in setSmsState()
|
D | AppStateManageExternalStorageBridge.java | 47 protected void updateExtraInfo(ApplicationsState.AppEntry app, String pkg, int uid) { in updateExtraInfo() argument 48 app.extraInfo = getManageExternalStoragePermState(pkg, uid); in updateExtraInfo() 64 public PermissionState getPermissionInfo(String pkg, int uid) { in getPermissionInfo() argument 65 PermissionState ps = super.getPermissionInfo(pkg, uid); in getPermissionInfo() 66 ps.appOpMode = mAppOpsManager.unsafeCheckOpNoThrow(APP_OP_STR, uid, pkg); in getPermissionInfo() 74 public PermissionState getManageExternalStoragePermState(String pkg, int uid) { in getManageExternalStoragePermState() argument 75 return getPermissionInfo(pkg, uid); in getManageExternalStoragePermState()
|
D | ProcessStatsDetail.java | 346 String pkg = entry.mServices.keyAt(ip); in fillServicesSection() local 353 psvc = pkgServices.get(pkg); in fillServicesSection() 356 pkgServices.put(pkg, psvc); in fillServicesSection() 401 private void stopService(String pkg, String name) { in stopService() argument 403 ApplicationInfo appInfo = getActivity().getPackageManager().getApplicationInfo(pkg, 0); in stopService() 405 showStopServiceDialog(pkg, name); in stopService() 409 Log.e(TAG, "Can't find app " + pkg, e); in stopService() 412 doStopService(pkg, name); in stopService() 415 private void showStopServiceDialog(final String pkg, final String name) { in showStopServiceDialog() argument 421 doStopService(pkg, name); in showStopServiceDialog() [all …]
|
D | AppStateBaseBridge.java | 74 public void forceUpdate(String pkg, int uid) { in forceUpdate() argument 75 mHandler.obtainMessage(BackgroundHandler.MSG_FORCE_LOAD_PKG, uid, 0, pkg).sendToTarget(); in forceUpdate() 120 protected abstract void updateExtraInfo(AppEntry app, String pkg, int uid); in updateExtraInfo() argument 157 String pkg = (String) msg.obj; in handleMessage() local 161 if (app.info.uid == uid && pkg.equals(app.info.packageName)) { in handleMessage() 162 updateExtraInfo(app, pkg, uid); in handleMessage()
|
/packages/apps/Settings/src/com/android/settings/password/ |
D | PasswordUtils.java | 59 String pkg = getCallingAppPackageName(activityToken); in getCallingAppLabel() local 60 if (pkg == null || pkg.equals(SETTINGS_PACKAGE_NAME)) { in getCallingAppLabel() 64 return Utils.getApplicationLabel(context, pkg); in getCallingAppLabel() 72 String pkg = null; in getCallingAppPackageName() local 74 pkg = ActivityManager.getService().getLaunchedFromPackage(activityToken); in getCallingAppPackageName() 78 return pkg; in getCallingAppPackageName()
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/util/ |
D | LibUtils.java | 218 public static boolean isSystemPackage(Resources resources, PackageManager pm, PackageInfo pkg) { in isSystemPackage() argument 232 && sSystemSignature[0].equals(getFirstSignature(pkg))) in isSystemPackage() 233 || pkg.packageName.equals(sPermissionControllerPackageName) in isSystemPackage() 234 || pkg.packageName.equals(sServicesSystemSharedLibPackageName) in isSystemPackage() 235 || pkg.packageName.equals(sSharedSystemSharedLibPackageName) in isSystemPackage() 236 || pkg.packageName.equals(PrintManager.PRINT_SPOOLER_PACKAGE_NAME) in isSystemPackage() 237 || isDeviceProvisioningPackage(resources, pkg.packageName); in isSystemPackage() 251 private static Signature getFirstSignature(PackageInfo pkg) { in getFirstSignature() argument 252 if (pkg != null && pkg.signatures != null && pkg.signatures.length > 0) { in getFirstSignature() 253 return pkg.signatures[0]; in getFirstSignature()
|
/packages/apps/Settings/src/com/android/settings/notification/app/ |
D | BubblePreferenceController.java | 96 mHasSentInvalidMsg = mBackend.isInInvalidMsgState(mAppRow.pkg, mAppRow.uid); in updateState() 98 mAppRow.pkg, mAppRow.uid).getList().size(); in updateState() 133 .setPkgPrefInfo(mAppRow.pkg, mAppRow.uid, value) in onPreferenceChange() 138 mBackend.setAllowBubbles(mAppRow.pkg, mAppRow.uid, value); in onPreferenceChange() 158 public static void revertBubblesApproval(Context context, String pkg, int uid) { in revertBubblesApproval() argument 160 backend.setAllowBubbles(pkg, uid, BUBBLE_PREFERENCE_NONE); in revertBubblesApproval() 172 public static void applyBubblesApproval(Context context, String pkg, int uid, int pref) { in applyBubblesApproval() argument 174 backend.setAllowBubbles(pkg, uid, pref); in applyBubblesApproval()
|
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/zenaccess/ |
D | ZenAccessController.java | 93 public static boolean hasAccess(Context context, String pkg) { in hasAccess() argument 95 NotificationManager.class).isNotificationPolicyAccessGrantedForPackage(pkg); in hasAccess() 98 public static void setAccess(final Context context, final String pkg, final boolean access) { in setAccess() argument 99 logSpecialPermissionChange(access, pkg, context); in setAccess() 101 mgr.setNotificationPolicyAccessGranted(pkg, access); in setAccess() 104 public static void deleteRules(final Context context, final String pkg) { in deleteRules() argument 106 mgr.removeAutomaticZenRules(pkg); in deleteRules()
|
D | FriendlyWarningDialogFragment.java | 43 public FriendlyWarningDialogFragment setPkgInfo(String pkg, CharSequence label, in setPkgInfo() argument 46 args.putString(KEY_PKG, pkg); in setPkgInfo() 47 args.putString(KEY_LABEL, TextUtils.isEmpty(label) ? pkg : label.toString()); in setPkgInfo() 57 final String pkg = args.getString(KEY_PKG); in onCreateDialog() local 72 ZenAccessController.deleteRules(getContext(), pkg); in onCreateDialog() 73 ZenAccessController.setAccess(getContext(), pkg, false); in onCreateDialog()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/app/ |
D | InvalidConversationPreferenceControllerTest.java | 102 appRow.pkg = "hi"; in testIsAvailable_notIfAppBlocked() 113 appRow.pkg = "hi"; in testIsAvailable_notIfInValidMsgState() 123 appRow.pkg = "hi"; in testIsAvailable() 133 appRow.pkg = "hi"; in testIsAvailable_filteredIn() 144 appRow.pkg = "hi"; in testIsAvailable_filteredOut() 153 appRow.pkg = "hi"; in testUpdateState_disabledByAdmin() 167 appRow.pkg = "pkg"; in testUpdateState_notChecked() 180 appRow.pkg = "pkg"; in testUpdateState_checked() 193 appRow.pkg = "pkg"; in testOnPreferenceChange_toggleEnabled() 212 appRow.pkg = "pkg"; in testOnPreferenceChange_toggleDisabled()
|
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/ |
D | AppStateBaseBridge.java | 64 public void forceUpdate(String pkg, int uid) { in forceUpdate() argument 65 mHandler.obtainMessage(BackgroundHandler.MSG_FORCE_LOAD_PKG, uid, 0, pkg).sendToTarget(); in forceUpdate() 109 protected abstract void updateExtraInfo(AppEntry app, String pkg, int uid); in updateExtraInfo() argument 142 String pkg = (String) msg.obj; in handleMessage() local 146 if (app.info.uid == uid && pkg.equals(app.info.packageName)) { in handleMessage() 147 updateExtraInfo(app, pkg, uid); in handleMessage()
|
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/common/servicemonitor/ |
D | PackageWatcher.java | 90 String pkg = uri != null ? uri.getSchemeSpecificPart() : null; in getPackageName() local 91 return pkg; in getPackageName() 105 String pkg = getPackageName(intent); in onReceive() local 106 if (pkg != null) { in onReceive() 112 String pkg = getPackageName(intent); in onReceive() local 113 if (pkg != null) { in onReceive()
|
/packages/apps/Launcher3/src/com/android/launcher3/util/ |
D | SimpleBroadcastReceiver.java | 52 public void registerPkgActions(Context context, @Nullable String pkg, String... actions) { in registerPkgActions() argument 53 context.registerReceiver(this, getPackageFilter(pkg, actions)); in registerPkgActions() 59 public static IntentFilter getPackageFilter(String pkg, String... actions) { in getPackageFilter() argument 62 if (!TextUtils.isEmpty(pkg)) { in getPackageFilter() 63 filter.addDataSchemeSpecificPart(pkg, PatternMatcher.PATTERN_LITERAL); in getPackageFilter()
|
/packages/modules/IntentResolver/java/tests/src/com/android/intentresolver/ |
D | ShortcutSelectionLogicTest.kt | 39 arrayOf(PACKAGE_A, PACKAGE_B).forEach { pkg -> in <lambda>() method 45 ComponentName(pkg, CLASS_NAME), in <lambda>() 46 pkg.shortcutId(i), in <lambda>() 49 this[pkg] = targets in <lambda>() 69 private operator fun Map<String, Array<ChooserTarget>>.get(pkg: String, idx: Int) = in <lambda>() 70 this[pkg]?.get(idx) ?: error("missing package $pkg") in <lambda>()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/ |
D | ShadowNotificationManager.java | 40 public void setNotificationPolicyAccessGranted(String pkg, boolean granted) { in setNotificationPolicyAccessGranted() argument 42 mNotificationPolicyGrantedPackages.add(pkg); in setNotificationPolicyAccessGranted() 44 mNotificationPolicyGrantedPackages.remove(pkg); in setNotificationPolicyAccessGranted() 49 protected boolean isNotificationPolicyAccessGrantedForPackage(String pkg) { in isNotificationPolicyAccessGrantedForPackage() argument 50 return mNotificationPolicyGrantedPackages.contains(pkg); in isNotificationPolicyAccessGrantedForPackage()
|