Home
last modified time | relevance | path

Searched refs:procState (Results 1 – 25 of 99) sorted by relevance

1234

/frameworks/base/services/core/java/com/android/server/appop/
DAppOpsUidStateTracker.java42 static int processStateToUidState(int procState) { in processStateToUidState() argument
43 if (procState == PROCESS_STATE_UNKNOWN) { in processStateToUidState()
47 if (procState <= PROCESS_STATE_PERSISTENT_UI) { in processStateToUidState()
51 if (procState <= PROCESS_STATE_TOP) { in processStateToUidState()
55 if (procState <= PROCESS_STATE_BOUND_TOP) { in processStateToUidState()
59 if (procState <= PROCESS_STATE_FOREGROUND_SERVICE) { in processStateToUidState()
63 if (procState <= PROCESS_STATE_BOUND_FOREGROUND_SERVICE) { in processStateToUidState()
67 if (procState <= PROCESS_STATE_RECEIVER) { in processStateToUidState()
79 void updateUidProcState(int uid, int procState, int capability); in updateUidProcState() argument
DAppOpsUidStateTrackerImpl.java220 public void updateUidProcState(int uid, int procState, int capability) { in updateUidProcState() argument
221 int uidState = processStateToUidState(procState); in updateUidProcState()
235 mEventLog.logUpdateUidProcState(uid, procState, capability); in updateUidProcState()
239 if (procState == PROCESS_STATE_NONEXISTENT) { in updateUidProcState()
444 void logUpdateUidProcState(int uid, int procState, int capability) { in logUpdateUidProcState() argument
449 this, System.currentTimeMillis(), uid, procState, capability)); in logUpdateUidProcState()
452 void logUpdateUidProcStateAsync(long timestamp, int uid, int procState, int capability) { in logUpdateUidProcStateAsync() argument
463 mUpdateUidProcStateLog[idx][1] = procState; in logUpdateUidProcStateAsync()
576 int procState = mUpdateUidProcStateLog[idx][1];
587 pw.print(String.format("%-30s", ActivityManager.procStateToString(procState)));
/frameworks/base/native/android/
Dactivity_manager.cpp46 void onUidStateChanged(uid_t uid, int32_t procState, int64_t procStateSeq,
53 static int32_t procStateToImportance(int32_t procState);
64 int32_t UidObserver::procStateToImportance(int32_t procState) { in procStateToImportance() argument
66 if (procState == ActivityManager::PROCESS_STATE_NONEXISTENT) { in procStateToImportance()
68 } else if (procState >= ActivityManager::PROCESS_STATE_HOME) { in procStateToImportance()
70 } else if (procState == ActivityManager::PROCESS_STATE_HEAVY_WEIGHT) { in procStateToImportance()
72 } else if (procState >= ActivityManager::PROCESS_STATE_TOP_SLEEPING) { in procStateToImportance()
74 } else if (procState >= ActivityManager::PROCESS_STATE_SERVICE) { in procStateToImportance()
76 } else if (procState >= ActivityManager::PROCESS_STATE_TRANSIENT_BACKGROUND) { in procStateToImportance()
78 } else if (procState >= ActivityManager::PROCESS_STATE_IMPORTANT_FOREGROUND) { in procStateToImportance()
[all …]
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DBatteryStatsImplTest.java191 for (int procState = 0; procState < NUM_PROCESS_STATE; ++procState) { in testUpdateProcStateCpuTimes()
192 assertFalse(u.getCpuFreqTimes(timeInFreqs, procState)); in testUpdateProcStateCpuTimes()
193 assertFalse(u.getScreenOffCpuFreqTimes(timeInFreqs, procState)); in testUpdateProcStateCpuTimes()
216 for (int procState = 0; procState < NUM_PROCESS_STATE; ++procState) { in testUpdateProcStateCpuTimes()
217 final boolean hasTimeInFreq = u.getCpuFreqTimes(timeInFreqs, procState); in testUpdateProcStateCpuTimes()
218 if (procState == testProcStates[i]) { in testUpdateProcStateCpuTimes()
223 assertFalse(u.getScreenOffCpuFreqTimes(timeInFreqs, procState)); in testUpdateProcStateCpuTimes()
250 for (int procState = 0; procState < NUM_PROCESS_STATE; ++procState) { in testUpdateProcStateCpuTimes()
251 if (procState == testProcStates[i]) { in testUpdateProcStateCpuTimes()
256 assertTrue(u.getCpuFreqTimes(timeInFreqs, procState)); in testUpdateProcStateCpuTimes()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/
DMirrorActiveUids.java38 synchronized void onUidActive(int uid, int procState) { in onUidActive() argument
39 mUidStates.put(uid, procState); in onUidActive()
46 synchronized void onUidProcStateChanged(int uid, int procState) { in onUidProcStateChanged() argument
49 mUidStates.setValueAt(index, procState); in onUidProcStateChanged()
/frameworks/base/services/core/java/com/android/server/am/
DOomAdjuster.java1663 int procState; field in OomAdjuster.ComputeOomAdjWindowCallback
1672 boolean hasVisibleActivities, int procState, int schedGroup, int appUid, in initialize() argument
1678 this.procState = procState; in initialize()
1697 if (procState > processStateCurTop) { in onVisibleActivity()
1698 procState = processStateCurTop; in onVisibleActivity()
1721 if (procState > processStateCurTop) { in onPausedActivity()
1722 procState = processStateCurTop; in onPausedActivity()
1754 if (procState > PROCESS_STATE_LAST_ACTIVITY) { in onStoppingActivity()
1755 procState = PROCESS_STATE_LAST_ACTIVITY; in onStoppingActivity()
1769 if (procState > PROCESS_STATE_CACHED_ACTIVITY) { in onOtherActivity()
[all …]
DProcessMemInfo.java23 final int procState; field in ProcessMemInfo
35 procState = _procState; in ProcessMemInfo()
DUidObserverController.java166 int enqueueUidChange(@Nullable ChangeRecord currentRecord, int uid, int change, int procState, in enqueueUidChange() argument
187 changeRecord.procState = procState; in enqueueUidChange()
301 validateUid.setSetProcState(item.procState); in dispatchUidsChanged()
302 validateUid.setCurProcState(item.procState); in dispatchUidsChanged()
396 final boolean newAboveCut = item.procState <= reg.mCutpoint; in dispatchUidsChangedForObserver()
399 doReport = item.procState != PROCESS_STATE_NONEXISTENT; in dispatchUidsChangedForObserver()
409 + ": " + item.procState + ": " + item.capability); in dispatchUidsChangedForObserver()
412 reg.mLastProcStates.put(item.uid, item.procState); in dispatchUidsChangedForObserver()
414 observer.onUidStateChanged(item.uid, item.procState, in dispatchUidsChangedForObserver()
503 public int procState; field in UidObserverController.ChangeRecord
[all …]
DAppProfiler.java679 int procState; in collectPssInBackground() local
694 procState = profile.getPssProcState(); in collectPssInBackground()
698 if (profile.getThread() != null && procState == profile.getSetProcState() in collectPssInBackground()
727 && profile.getSetProcState() == procState in collectPssInBackground()
731 recordPssSampleLPf(profile, procState, pss, tmp[0], tmp[1], tmp[2], in collectPssInBackground()
740 + " initState=" + procState + " curState=" in collectPssInBackground()
820 int procState; in collectRssInBackground() local
835 procState = profile.getPssProcState(); in collectRssInBackground()
839 if (profile.getThread() != null && procState == profile.getSetProcState() in collectRssInBackground()
868 && profile.getSetProcState() == procState in collectRssInBackground()
[all …]
DBaseAppStateEventsTracker.java122 void onUidProcStateChanged(final int uid, final int procState) { in onUidProcStateChanged() argument
128 onUidProcStateChangedUncheckedLocked(uid, procState); in onUidProcStateChanged()
133 void onUidProcStateChangedUncheckedLocked(final int uid, final int procState) { in onUidProcStateChangedUncheckedLocked() argument
134 if (procState < ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE) { in onUidProcStateChangedUncheckedLocked()
/frameworks/base/core/java/android/net/
DNetworkPolicyManager.java801 public static int getDefaultProcessNetworkCapabilities(int procState) {
802 switch (procState) {
825 return isProcStateAllowedWhileIdleOrPowerSaveMode(uidState.procState, uidState.capability);
830 int procState, @ProcessCapability int capability) {
831 if (procState == PROCESS_STATE_UNKNOWN) {
834 return procState <= FOREGROUND_THRESHOLD_STATE
843 return uidState.procState <= TOP_THRESHOLD_STATE;
857 return uidState.procState < BACKGROUND_THRESHOLD_STATE
870 return isProcStateAllowedWhileOnRestrictBackground(uidState.procState, uidState.capability);
874 public static boolean isProcStateAllowedWhileOnRestrictBackground(int procState,
[all …]
/frameworks/base/services/core/java/com/android/server/power/stats/
DPowerStatsExporter.java212 int procState = breakDownByProcState in populateUidBatteryConsumers() local
215 powerByProcState[procState] += power; in populateUidBatteryConsumers()
219 for (int procState = 0; procState < powerByProcState.length; procState++) { in populateUidBatteryConsumers()
220 double power = powerByProcState[procState]; in populateUidBatteryConsumers()
226 && procState != BatteryConsumer.PROCESS_STATE_UNSPECIFIED) { in populateUidBatteryConsumers()
227 builder.addConsumedPower(builder.getKey(powerComponentId, procState), in populateUidBatteryConsumers()
/frameworks/av/media/module/libmediatranscoding/
DTranscodingUidPolicy.cpp144 void TranscodingUidPolicy::onUidStateChanged(uid_t uid, int32_t procState) { in onUidStateChanged() argument
145 ALOGV("onUidStateChanged: uid %u, procState %d", uid, procState); in onUidStateChanged()
153 if (it != mUidStateMap.end() && it->second != procState) { in onUidStateChanged()
154 isUidGone = (procState == AACTIVITYMANAGER_IMPORTANCE_GONE); in onUidStateChanged()
160 mStateUidMap[procState].insert(uid); in onUidStateChanged()
161 it->second = procState; in onUidStateChanged()
/frameworks/base/apex/jobscheduler/framework/java/android/os/
DPowerExemptionManager.java674 public static @ReasonCode int getReasonCodeFromProcState(int procState) { in getReasonCodeFromProcState() argument
675 if (procState <= PROCESS_STATE_PERSISTENT) { in getReasonCodeFromProcState()
677 } else if (procState <= PROCESS_STATE_PERSISTENT_UI) { in getReasonCodeFromProcState()
679 } else if (procState <= PROCESS_STATE_TOP) { in getReasonCodeFromProcState()
681 } else if (procState <= PROCESS_STATE_BOUND_TOP) { in getReasonCodeFromProcState()
683 } else if (procState <= PROCESS_STATE_FOREGROUND_SERVICE) { in getReasonCodeFromProcState()
685 } else if (procState <= PROCESS_STATE_BOUND_FOREGROUND_SERVICE) { in getReasonCodeFromProcState()
/frameworks/native/libs/binder/
DIUidObserver.cpp59 virtual void onUidStateChanged(uid_t uid, int32_t procState, int64_t procStateSeq, in onUidStateChanged() argument
64 data.writeInt32(procState); in onUidStateChanged()
115 int32_t procState = data.readInt32(); in onTransact() local
118 onUidStateChanged(uid, procState, procStateSeq, capability); in onTransact()
/frameworks/av/media/utils/include/mediautils/
DProcessInfo.h34 virtual bool overrideProcessInfo(int pid, int procState, int oomScore);
44 int procState; member
/frameworks/base/services/core/java/com/android/server/pm/permission/
DOneTimePermissionUserManager.java183 public void onUidStateChanged(int uid, int procState, long procStateSeq,
186 if (procState > ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
187 && procState != ActivityManager.PROCESS_STATE_NONEXISTENT) {
249 private int getStateFromProcState(int procState) { in getStateFromProcState() argument
250 if (procState == ActivityManager.PROCESS_STATE_NONEXISTENT) { in getStateFromProcState()
253 if (procState > ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE) { in getStateFromProcState()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkPolicyManagerInternal.java104 public static int updateBlockedReasonsWithProcState(int blockedReasons, int procState) { in updateBlockedReasonsWithProcState() argument
105 final int allowedReasons = getAllowedReasonsForProcState(procState); in updateBlockedReasonsWithProcState()
/frameworks/av/media/utils/
DProcessInfo.cpp80 states[index] = it->second.procState; in checkProcessExistent()
144 bool ProcessInfo::overrideProcessInfo(int pid, int procState, int oomScore) { in overrideProcessInfo() argument
154 mOverrideMap.emplace(pid, ProcessInfoOverride{procState, oomScore}); in overrideProcessInfo()
/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DUidObserverControllerTest.java231 private void addPendingChange(int uid, int change, int procState, long procStateSeq, in addPendingChange() argument
236 record.procState = procState; in addPendingChange()
243 private void assertPendingChange(int uid, int change, int procState, long procStateSeq, in assertPendingChange() argument
251 assertEquals(procState, record.procState); in assertPendingChange()
/frameworks/av/media/module/service.mediatranscoding/tests/
Dmediatranscodingservice_resource_tests.cpp90 void TranscodingHelper_setProcessInfoOverride(int32_t procState, int32_t oomScore) { in TranscodingHelper_setProcessInfoOverride() argument
98 service->overrideProcessInfo(gResourceManagerClient, getpid(), procState, oomScore); in TranscodingHelper_setProcessInfoOverride()
/frameworks/base/core/java/android/app/
DActivityManager.java216 public void onUidStateChanged(int uid, int procState, long procStateSeq, int capability) { in onUidStateChanged() argument
218 procState, mContext)); in onUidStateChanged()
1098 public static final boolean isProcStateBackground(int procState) { in isProcStateBackground() argument
1099 return procState >= PROCESS_STATE_TRANSIENT_BACKGROUND; in isProcStateBackground()
1104 public static final boolean isProcStateCached(int procState) { in isProcStateCached() argument
1105 return procState >= PROCESS_STATE_CACHED_ACTIVITY; in isProcStateCached()
1110 public static boolean isForegroundService(int procState) { in isForegroundService() argument
1111 return procState == PROCESS_STATE_FOREGROUND_SERVICE; in isForegroundService()
3904 public static @Importance int procStateToImportance(int procState) { in procStateToImportance() argument
3905 if (procState == PROCESS_STATE_NONEXISTENT) { in procStateToImportance()
[all …]
DIUidObserver.aidl55 void onUidStateChanged(int uid, int procState, long procStateSeq, int capability); in onUidStateChanged() argument
DUidObserver.java48 public void onUidStateChanged(int uid, int procState, long procStateSeq, int capability) { in onUidStateChanged() argument
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/
DOngoingCallController.kt291 private fun isProcessVisibleToUser(procState: Int): Boolean { in <lambda>()
292 return procState <= ActivityManager.PROCESS_STATE_TOP in <lambda>()
422 procState: Int, in <lambda>()
432 isCallAppVisible = isProcessVisibleToUser(procState) in <lambda>()

1234