/frameworks/base/services/core/java/com/android/server/am/ |
D | ForegroundServiceTypeLoggerModule.java | 144 UidState uidState = mUids.get(uid); in logForegroundServiceStart() local 145 if (uidState == null) { in logForegroundServiceStart() 146 uidState = new UidState(); in logForegroundServiceStart() 147 mUids.put(uid, uidState); in logForegroundServiceStart() 162 int fgsIndex = uidState.mRunningFgs.indexOfKey(apiType); in logForegroundServiceStart() 164 uidState.mRunningFgs.put(apiType, new ArrayMap<>()); in logForegroundServiceStart() 165 fgsIndex = uidState.mRunningFgs.indexOfKey(apiType); in logForegroundServiceStart() 166 uidState.mFirstFgsTimeStamp.put(apiType, System.currentTimeMillis()); in logForegroundServiceStart() 169 uidState.mRunningFgs.valueAt(fgsIndex); in logForegroundServiceStart() 174 if (uidState.mApiOpenCalls.contains(apiType)) { in logForegroundServiceStart() [all …]
|
D | BroadcastQueueModernImpl.java | 1661 private void cleanupUserStateLocked(@NonNull SparseBooleanArray uidState, int userId) { in cleanupUserStateLocked() argument 1662 for (int i = uidState.size() - 1; i >= 0; --i) { in cleanupUserStateLocked() 1663 final int uid = uidState.keyAt(i); in cleanupUserStateLocked() 1665 uidState.removeAt(i); in cleanupUserStateLocked()
|
D | ProcessStatsService.java | 845 final UidState uidState = uidStates.valueAt(i); 846 results.put(uid, uidState.getAggregatedDurationsInStates());
|
D | ActiveServices.java | 8377 final int uidState = mAm.getUidStateLocked(callingUid); in shouldAllowFgsWhileInUsePermissionLocked() local 8381 if (uidState <= PROCESS_STATE_TOP) { in shouldAllowFgsWhileInUsePermissionLocked() 8382 ret = getReasonCodeFromProcState(uidState); in shouldAllowFgsWhileInUsePermissionLocked() 8662 final int uidState = mAm.getUidStateLocked(callingUid); in shouldAllowFgsStartForegroundWithBindingCheckLocked() local 8674 + "; uidState: " + ProcessList.makeProcStateString(uidState) in shouldAllowFgsStartForegroundWithBindingCheckLocked() 8706 final int uidState = mAm.getUidStateLocked(callingUid); in shouldAllowFgsStartForegroundNoBindingCheckLocked() local 8708 if (uidState <= PROCESS_STATE_TOP) { in shouldAllowFgsStartForegroundNoBindingCheckLocked() 8709 ret = getReasonCodeFromProcState(uidState); in shouldAllowFgsStartForegroundNoBindingCheckLocked()
|
/frameworks/base/services/core/java/com/android/server/pm/permission/ |
D | UserPermissionState.java | 64 UidPermissionState uidState = mUidStates.get(appId); in getOrCreateUidState() local 65 if (uidState == null) { in getOrCreateUidState() 66 uidState = new UidPermissionState(); in getOrCreateUidState() 67 mUidStates.put(appId, uidState); in getOrCreateUidState() 69 return uidState; in getOrCreateUidState() 76 UidPermissionState uidState = new UidPermissionState(other); in createUidStateWithExisting() local 77 mUidStates.put(appId, uidState); in createUidStateWithExisting() 78 return uidState; in createUidStateWithExisting()
|
D | PermissionManagerServiceImpl.java | 733 final UidPermissionState uidState = getUidStateLocked(pkg, userId); in getPermissionFlagsInternal() local 734 if (uidState == null) { in getPermissionFlagsInternal() 739 return uidState.getPermissionFlags(permName); in getPermissionFlagsInternal() 858 final UidPermissionState uidState = getUidStateLocked(pkg, userId); in updatePermissionFlagsInternal() local 859 if (uidState == null) { in updatePermissionFlagsInternal() 864 if (!uidState.hasPermissionState(permName) && !isRequested) { in updatePermissionFlagsInternal() 869 permissionUpdated = uidState.updatePermissionFlags(bp, flagMask, flagValues); in updatePermissionFlagsInternal() 911 final UidPermissionState uidState = getUidStateLocked(pkg, userId); in updatePermissionFlagsForAllApps() 912 if (uidState == null) { in updatePermissionFlagsForAllApps() 918 changed[0] |= uidState.updatePermissionFlagsForAllPermissions( in updatePermissionFlagsForAllApps() [all …]
|
D | DefaultPermissionGrantPolicy.java | 1810 ArrayMap<String, PermissionState> uidState; in getPermissionState() local 1812 uidState = mDelayedPermissionState.valueAt(uidIdx); in getPermissionState() 1814 uidState = new ArrayMap<>(); in getPermissionState() 1815 mDelayedPermissionState.put(uid, uidState); in getPermissionState() 1818 int permIdx = uidState.indexOfKey(permission); in getPermissionState() 1822 permState = uidState.valueAt(permIdx); in getPermissionState() 1834 uidState.put(permission, permState); in getPermissionState()
|
/frameworks/base/services/core/java/com/android/server/appop/ |
D | AppOpsRecentAccessPersistence.java | 182 final AppOpsService.UidState uidState = mAppOpsService.new UidState(uid); in readUid() local 183 uidStates.put(uid, uidState); in readUid() 194 readOp(parser, uidState, pkgName); in readUid() 204 @NonNull AppOpsService.UidState uidState, @NonNull String pkgName) in readOp() argument 207 AppOpsService.Op op = mAppOpsService.new Op(uidState, pkgName, opCode, uidState.uid); in readOp() 226 AppOpsService.Ops ops = uidState.pkgOps.get(pkgName); in readOp() 228 ops = new AppOpsService.Ops(pkgName, uidState); in readOp() 229 uidState.pkgOps.put(pkgName, ops); in readOp() 238 final int uidState = extractUidStateFromKey(key); in readAttributionOp() local 259 proxyAttributionTag, proxyDeviceId, uidState, opFlags); in readAttributionOp() [all …]
|
D | AppOpsUidStateTrackerImpl.java | 137 int uidState = getUidState(uid); in evalMode() local 139 int result = evalModeInternal(uid, code, uidState, uidCapability); in evalMode() 141 mEventLog.logEvalForegroundMode(uid, uidState, uidCapability, code, result); in evalMode() 145 private int evalModeInternal(int uid, int code, int uidState, int uidCapability) { in evalModeInternal() argument 160 if (uidState > AppOpsManager.resolveFirstUnrestrictedUidState(code)) { in evalModeInternal() 221 int uidState = processStateToUidState(procState); in updateUidProcState() local 229 && (uidState != prevUidState || capability != prevCapability)) in updateUidProcState() 231 && (uidState != pendingUidState || capability != pendingCapability))) { in updateUidProcState() 236 mPendingUidStates.put(uid, uidState); in updateUidProcState() 242 } else if (uidState < prevUidState in updateUidProcState() [all …]
|
D | AttributedOp.java | 106 @AppOpsManager.UidState int uidState, @AppOpsManager.OpFlags int flags) { in accessed() argument 109 uidState, flags); in accessed() 112 parent.packageName, tag, uidState, flags, accessTime, in accessed() 131 @Nullable String proxyDeviceId, @AppOpsManager.UidState int uidState, in accessed() argument 133 long key = makeKey(uidState, flags); in accessed() 160 public void rejected(@AppOpsManager.UidState int uidState, @AppOpsManager.OpFlags int flags) { in rejected() argument 161 rejected(System.currentTimeMillis(), uidState, flags); in rejected() local 164 parent.packageName, tag, uidState, flags); in rejected() 175 public void rejected(long noteTime, @AppOpsManager.UidState int uidState, in rejected() argument 177 long key = makeKey(uidState, flags); in rejected() [all …]
|
D | AppOpsService.java | 570 final UidState uidState; field in AppOpsService.Ops 589 uidState = _uidState; in Ops() 608 final UidState uidState; field in AppOpsService.Op 619 Op(UidState uidState, String packageName, int op, int uid) { in Op() argument 622 this.uidState = uidState; in Op() 1048 UidState uidState = getUidStateLocked(uid, true); 1049 if (!uidState.pkgOps.containsKey(pkgName)) { 1050 uidState.pkgOps.put(pkgName, 1051 new Ops(pkgName, uidState)); 1235 UidState uidState = getUidStateLocked(uid, true); in initializePackageUidStateLocked() local [all …]
|
D | HistoricalRegistry.java | 475 @Nullable String attributionTag, @UidState int uidState, @OpFlags int flags, in incrementOpAccessedCount() argument 486 attributionTag, uidState, flags, 1); in incrementOpAccessedCount() 489 flags, uidState, accessTime, -1, attributionFlags, attributionChainId); in incrementOpAccessedCount() 495 @Nullable String attributionTag, @UidState int uidState, @OpFlags int flags) { in incrementOpRejected() argument 504 attributionTag, uidState, flags, 1); in incrementOpRejected() 510 @Nullable String attributionTag, @UidState int uidState, @OpFlags int flags, in increaseOpAccessDuration() argument 521 attributionTag, uidState, flags, increment); in increaseOpAccessDuration() 523 flags, uidState, eventStartTime, increment, attributionFlags, in increaseOpAccessDuration() 1437 final int uidState = AppOpsManager.extractUidStateFromKey(key); in readStateDLocked() local 1447 ops.increaseAccessCount(op, uid, packageName, attributionTag, uidState, flags, in readStateDLocked() [all …]
|
D | DiscreteRegistry.java | 247 @AppOpsManager.OpFlags int flags, @AppOpsManager.UidState int uidState, long accessTime, in recordDiscreteAccess() argument 254 mDiscreteOps.addDiscreteAccess(op, uid, packageName, attributionTag, flags, uidState, in recordDiscreteAccess() 636 @AppOpsManager.UidState int uidState, long accessTime, long accessDuration, in addDiscreteAccess() argument 651 uidState, accessTime, accessDuration, attributionFlags, offsetChainId); in addDiscreteAccess() 891 @AppOpsManager.OpFlags int flags, @AppOpsManager.UidState int uidState, in addDiscreteAccess() argument 895 uidState, accessTime, accessDuration, attributionFlags, attributionChainId); in addDiscreteAccess() 961 @AppOpsManager.OpFlags int flags, @AppOpsManager.UidState int uidState, in addDiscreteAccess() argument 964 getOrCreateDiscreteOp(op).addDiscreteAccess(attributionTag, flags, uidState, accessTime, in addDiscreteAccess() 1120 @AppOpsManager.OpFlags int flags, @AppOpsManager.UidState int uidState, in addDiscreteAccess() argument 1133 if (previousOp.mOpFlag == flags && previousOp.mUidState == uidState in addDiscreteAccess() [all …]
|
D | AppOpsUidStateTracker.java | 121 void onUidStateChanged(int uid, int uidState, boolean foregroundModeMayChange); in onUidStateChanged() argument
|
/frameworks/base/core/java/android/net/ |
D | NetworkPolicyManager.java | 821 public static boolean isProcStateAllowedWhileIdleOrPowerSaveMode(@Nullable UidState uidState) { 822 if (uidState == null) { 825 return isProcStateAllowedWhileIdleOrPowerSaveMode(uidState.procState, uidState.capability); 839 public static boolean isProcStateAllowedWhileInLowPowerStandby(@Nullable UidState uidState) { 840 if (uidState == null) { 843 return uidState.procState <= TOP_THRESHOLD_STATE; 853 public static boolean isProcStateAllowedNetworkWhileBackground(@Nullable UidState uidState) { 854 if (uidState == null) { 857 return uidState.procState < BACKGROUND_THRESHOLD_STATE 858 || (uidState.capability & PROCESS_CAPABILITY_POWER_RESTRICTED_NETWORK) != 0; [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/app/procstats/ |
D | ProcessStatsTest.java | 228 UidState uidState = processStats.mUidStates.get(APP_1_UID); in testSafelyResetClearsProcessInUidState() local 229 assertTrue(uidState.isInUse()); in testSafelyResetClearsProcessInUidState() 231 uidState.resetSafely(NOW_MS); in testSafelyResetClearsProcessInUidState() 233 assertFalse(uidState.isInUse()); in testSafelyResetClearsProcessInUidState()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/appop/ |
D | AppOpsRecentAccessPersistenceTest.java | 115 AppOpsService.UidState uidState = uidStates.get(10001); in validateUidStates() local 116 assertThat(uidState.uid).isEqualTo(10001); in validateUidStates() 118 ArrayMap<String, AppOpsService.Ops> packageOps = uidState.pkgOps; in validateUidStates()
|
/frameworks/base/core/java/android/app/ |
D | AppOpsManager.java | 611 public static String getUidStateName(@UidState int uidState) { in getUidStateName() argument 612 switch (uidState) { in getUidStateName() 863 final int uidState = extractUidStateFromKey(key); in keyToString() local 865 return "[" + getUidStateName(uidState) + "-" + flagsToString(flags) + "]"; in keyToString() 869 public static @DataBucketKey long makeKey(@UidState int uidState, @OpFlags int flags) { in makeKey() argument 870 return ((long) uidState << UID_STATE_OFFSET) | flags; in makeKey() 4840 public int getProxyUid(@UidState int uidState, @OpFlags int flags) { in getProxyUid() argument 4841 OpEventProxyInfo proxy = getLastProxyInfo(uidState, uidState, flags); in getProxyUid() 4866 public @Nullable String getProxyPackageName(@UidState int uidState, @OpFlags int flags) { in getProxyPackageName() argument 4867 OpEventProxyInfo proxy = getLastProxyInfo(uidState, uidState, flags); in getProxyPackageName() [all …]
|
/frameworks/base/core/java/com/android/internal/app/procstats/ |
D | ProcessStats.java | 351 UidState uidState = mUidStates.get(uid); in add() local 352 if (uidState == null) { in add() 353 uidState = uidStates.valueAt(ip).clone(); in add() 354 mUidStates.put(uid, uidState); in add() 356 uidState.add(uidStates.valueAt(ip)); in add() 381 UidState uidState = mUidStates.get(uid); in add() local 382 if (uidState == null) { in add() 383 uidState = new UidState(this, uid); in add() 384 mUidStates.put(uid, uidState); in add() 386 uidState.addProcess(thisProc); in add() [all …]
|
D | ProcessState.java | 509 final UidState uidState = mStats.mUidStates.get(mUid); in setCombinedStateIdv() local 510 if (uidState != null) { in setCombinedStateIdv() 511 uidState.updateCombinedState(state, now); in setCombinedStateIdv()
|
/frameworks/base/services/core/java/com/android/server/net/ |
D | NetworkPolicyManagerService.java | 4290 final UidState uidState = mUidState.get(uid); 4291 fout.print("state", uidState); 4357 final UidState uidState = mUidState.get(uid); 4358 if (isProcStateAllowedWhileOnRestrictBackground(uidState)) { 4364 final long prevProcStateSeq = uidState != null ? uidState.procStateSeq : -1; 4377 final UidState uidState = mUidState.get(uid); 4378 if (isProcStateAllowedWhileIdleOrPowerSaveMode(uidState)) { 4384 final long prevProcStateSeq = uidState != null ? uidState.procStateSeq : -1; 4396 final UidState uidState = mUidState.get(uid); 4398 return isProcStateAllowedWhileInLowPowerStandby(uidState);
|
/frameworks/base/services/tests/servicestests/src/com/android/server/net/ |
D | NetworkPolicyManagerServiceTest.java | 2314 final NetworkPolicyManager.UidState uidState = mService.getUidStateForTest(uid); in isUidState() local 2315 if (uidState == null) { in isUidState() 2318 return uidState.uid == uid && uidState.procStateSeq == procStateSeq in isUidState() 2319 && uidState.procState == procState && uidState.capability == capability; in isUidState()
|
/frameworks/base/services/core/java/com/android/server/power/ |
D | PowerManagerService.java | 5400 UidState uidState, @Nullable IWakeLockCallback callback) { 5410 mUidState = uidState;
|