Loading services/core/java/com/android/server/am/ActiveServices.java +6 −4 Original line number Original line Diff line number Diff line Loading @@ -3598,11 +3598,9 @@ public final class ActiveServices { Slog.d(TAG_SERVICE, "[STALE] Short FGS timed out: " + sr Slog.d(TAG_SERVICE, "[STALE] Short FGS timed out: " + sr + " " + sr.getShortFgsTimedEventDescription(nowUptime)); + " " + sr.getShortFgsTimedEventDescription(nowUptime)); } } mShortFGSAnrTimer.discard(sr); return; return; } } Slog.e(TAG_SERVICE, "Short FGS timed out: " + sr); Slog.e(TAG_SERVICE, "Short FGS timed out: " + sr); mShortFGSAnrTimer.accept(sr); traceInstant("short FGS timeout: ", sr); traceInstant("short FGS timeout: ", sr); logFGSStateChangeLocked(sr, logFGSStateChangeLocked(sr, Loading Loading @@ -3682,8 +3680,10 @@ public final class ActiveServices { Slog.d(TAG_SERVICE, "[STALE] Short FGS ANR'ed: " + sr Slog.d(TAG_SERVICE, "[STALE] Short FGS ANR'ed: " + sr + " " + sr.getShortFgsTimedEventDescription(nowUptime)); + " " + sr.getShortFgsTimedEventDescription(nowUptime)); } } mShortFGSAnrTimer.discard(sr); return; return; } } mShortFGSAnrTimer.accept(sr); final String message = "Short FGS ANR'ed: " + sr; final String message = "Short FGS ANR'ed: " + sr; if (DEBUG_SHORT_SERVICE) { if (DEBUG_SHORT_SERVICE) { Loading Loading @@ -7426,7 +7426,6 @@ public final class ActiveServices { mActiveServiceAnrTimer.discard(proc); mActiveServiceAnrTimer.discard(proc); return; return; } } mActiveServiceAnrTimer.accept(proc); final long now = SystemClock.uptimeMillis(); final long now = SystemClock.uptimeMillis(); final long maxTime = now final long maxTime = now - (psr.shouldExecServicesFg() - (psr.shouldExecServicesFg() Loading @@ -7445,6 +7444,7 @@ public final class ActiveServices { } } } } if (timeout != null && mAm.mProcessList.isInLruListLOSP(proc)) { if (timeout != null && mAm.mProcessList.isInLruListLOSP(proc)) { mActiveServiceAnrTimer.accept(proc); Slog.w(TAG, "Timeout executing service: " + timeout); Slog.w(TAG, "Timeout executing service: " + timeout); StringWriter sw = new StringWriter(); StringWriter sw = new StringWriter(); PrintWriter pw = new FastPrintWriter(sw, false, 1024); PrintWriter pw = new FastPrintWriter(sw, false, 1024); Loading @@ -7459,6 +7459,7 @@ public final class ActiveServices { timeoutRecord = TimeoutRecord.forServiceExec(timeout.shortInstanceName, timeoutRecord = TimeoutRecord.forServiceExec(timeout.shortInstanceName, waitedMillis); waitedMillis); } else { } else { mActiveServiceAnrTimer.discard(proc); final long delay = psr.shouldExecServicesFg() final long delay = psr.shouldExecServicesFg() ? (nextTime + mAm.mConstants.SERVICE_TIMEOUT) : ? (nextTime + mAm.mConstants.SERVICE_TIMEOUT) : (nextTime + mAm.mConstants.SERVICE_BACKGROUND_TIMEOUT) (nextTime + mAm.mConstants.SERVICE_BACKGROUND_TIMEOUT) Loading Loading @@ -7493,7 +7494,6 @@ public final class ActiveServices { return; return; } } mServiceFGAnrTimer.accept(r); app = r.app; app = r.app; if (app != null && app.isDebugging()) { if (app != null && app.isDebugging()) { // The app's being debugged; let it ride // The app's being debugged; let it ride Loading @@ -7501,6 +7501,8 @@ public final class ActiveServices { return; return; } } mServiceFGAnrTimer.accept(r); if (DEBUG_BACKGROUND_CHECK) { if (DEBUG_BACKGROUND_CHECK) { Slog.i(TAG, "Service foreground-required timeout for " + r); Slog.i(TAG, "Service foreground-required timeout for " + r); } } Loading Loading
services/core/java/com/android/server/am/ActiveServices.java +6 −4 Original line number Original line Diff line number Diff line Loading @@ -3598,11 +3598,9 @@ public final class ActiveServices { Slog.d(TAG_SERVICE, "[STALE] Short FGS timed out: " + sr Slog.d(TAG_SERVICE, "[STALE] Short FGS timed out: " + sr + " " + sr.getShortFgsTimedEventDescription(nowUptime)); + " " + sr.getShortFgsTimedEventDescription(nowUptime)); } } mShortFGSAnrTimer.discard(sr); return; return; } } Slog.e(TAG_SERVICE, "Short FGS timed out: " + sr); Slog.e(TAG_SERVICE, "Short FGS timed out: " + sr); mShortFGSAnrTimer.accept(sr); traceInstant("short FGS timeout: ", sr); traceInstant("short FGS timeout: ", sr); logFGSStateChangeLocked(sr, logFGSStateChangeLocked(sr, Loading Loading @@ -3682,8 +3680,10 @@ public final class ActiveServices { Slog.d(TAG_SERVICE, "[STALE] Short FGS ANR'ed: " + sr Slog.d(TAG_SERVICE, "[STALE] Short FGS ANR'ed: " + sr + " " + sr.getShortFgsTimedEventDescription(nowUptime)); + " " + sr.getShortFgsTimedEventDescription(nowUptime)); } } mShortFGSAnrTimer.discard(sr); return; return; } } mShortFGSAnrTimer.accept(sr); final String message = "Short FGS ANR'ed: " + sr; final String message = "Short FGS ANR'ed: " + sr; if (DEBUG_SHORT_SERVICE) { if (DEBUG_SHORT_SERVICE) { Loading Loading @@ -7426,7 +7426,6 @@ public final class ActiveServices { mActiveServiceAnrTimer.discard(proc); mActiveServiceAnrTimer.discard(proc); return; return; } } mActiveServiceAnrTimer.accept(proc); final long now = SystemClock.uptimeMillis(); final long now = SystemClock.uptimeMillis(); final long maxTime = now final long maxTime = now - (psr.shouldExecServicesFg() - (psr.shouldExecServicesFg() Loading @@ -7445,6 +7444,7 @@ public final class ActiveServices { } } } } if (timeout != null && mAm.mProcessList.isInLruListLOSP(proc)) { if (timeout != null && mAm.mProcessList.isInLruListLOSP(proc)) { mActiveServiceAnrTimer.accept(proc); Slog.w(TAG, "Timeout executing service: " + timeout); Slog.w(TAG, "Timeout executing service: " + timeout); StringWriter sw = new StringWriter(); StringWriter sw = new StringWriter(); PrintWriter pw = new FastPrintWriter(sw, false, 1024); PrintWriter pw = new FastPrintWriter(sw, false, 1024); Loading @@ -7459,6 +7459,7 @@ public final class ActiveServices { timeoutRecord = TimeoutRecord.forServiceExec(timeout.shortInstanceName, timeoutRecord = TimeoutRecord.forServiceExec(timeout.shortInstanceName, waitedMillis); waitedMillis); } else { } else { mActiveServiceAnrTimer.discard(proc); final long delay = psr.shouldExecServicesFg() final long delay = psr.shouldExecServicesFg() ? (nextTime + mAm.mConstants.SERVICE_TIMEOUT) : ? (nextTime + mAm.mConstants.SERVICE_TIMEOUT) : (nextTime + mAm.mConstants.SERVICE_BACKGROUND_TIMEOUT) (nextTime + mAm.mConstants.SERVICE_BACKGROUND_TIMEOUT) Loading Loading @@ -7493,7 +7494,6 @@ public final class ActiveServices { return; return; } } mServiceFGAnrTimer.accept(r); app = r.app; app = r.app; if (app != null && app.isDebugging()) { if (app != null && app.isDebugging()) { // The app's being debugged; let it ride // The app's being debugged; let it ride Loading @@ -7501,6 +7501,8 @@ public final class ActiveServices { return; return; } } mServiceFGAnrTimer.accept(r); if (DEBUG_BACKGROUND_CHECK) { if (DEBUG_BACKGROUND_CHECK) { Slog.i(TAG, "Service foreground-required timeout for " + r); Slog.i(TAG, "Service foreground-required timeout for " + r); } } Loading