Loading core/java/android/app/ActivityThread.java +4 −2 Original line number Diff line number Diff line Loading @@ -1233,7 +1233,8 @@ public final class ActivityThread extends ClientTransactionHandler } @Override public final void scheduleTimeoutServiceForType(IBinder token, int startId, int fgsType) { public final void scheduleTimeoutServiceForType(IBinder token, int startId, @ServiceInfo.ForegroundServiceType int fgsType) { if (Trace.isTagEnabled(Trace.TRACE_TAG_ACTIVITY_MANAGER)) { Trace.instant(Trace.TRACE_TAG_ACTIVITY_MANAGER, "scheduleTimeoutServiceForType. token=" + token); Loading Loading @@ -5151,7 +5152,8 @@ public final class ActivityThread extends ClientTransactionHandler } } private void handleTimeoutServiceForType(IBinder token, int startId, int fgsType) { private void handleTimeoutServiceForType(IBinder token, int startId, @ServiceInfo.ForegroundServiceType int fgsType) { Service s = mServices.get(token); if (s != null) { try { Loading core/java/android/app/Service.java +5 −4 Original line number Diff line number Diff line Loading @@ -1164,7 +1164,7 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac } /** @hide */ public final void callOnTimeLimitExceeded(int startId, int fgsType) { public final void callOnTimeLimitExceeded(int startId, @ForegroundServiceType int fgsType) { // Note, because all the service callbacks (and other similar callbacks, e.g. activity // callbacks) are delivered using the main handler, it's possible the service is already // stopped when before this method is called, so we do a double check here. Loading @@ -1190,9 +1190,10 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac * * @param startId the startId passed to {@link #onStartCommand(Intent, int, int)} when * the service started. * @param fgsType the foreground service type which caused the timeout. * @param fgsType the {@link ServiceInfo.ForegroundServiceType foreground service type} which * caused the timeout. */ @FlaggedApi(Flags.FLAG_INTRODUCE_NEW_SERVICE_ONTIMEOUT_CALLBACK) public void onTimeout(int startId, int fgsType) { public void onTimeout(int startId, @ForegroundServiceType int fgsType) { } } Loading
core/java/android/app/ActivityThread.java +4 −2 Original line number Diff line number Diff line Loading @@ -1233,7 +1233,8 @@ public final class ActivityThread extends ClientTransactionHandler } @Override public final void scheduleTimeoutServiceForType(IBinder token, int startId, int fgsType) { public final void scheduleTimeoutServiceForType(IBinder token, int startId, @ServiceInfo.ForegroundServiceType int fgsType) { if (Trace.isTagEnabled(Trace.TRACE_TAG_ACTIVITY_MANAGER)) { Trace.instant(Trace.TRACE_TAG_ACTIVITY_MANAGER, "scheduleTimeoutServiceForType. token=" + token); Loading Loading @@ -5151,7 +5152,8 @@ public final class ActivityThread extends ClientTransactionHandler } } private void handleTimeoutServiceForType(IBinder token, int startId, int fgsType) { private void handleTimeoutServiceForType(IBinder token, int startId, @ServiceInfo.ForegroundServiceType int fgsType) { Service s = mServices.get(token); if (s != null) { try { Loading
core/java/android/app/Service.java +5 −4 Original line number Diff line number Diff line Loading @@ -1164,7 +1164,7 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac } /** @hide */ public final void callOnTimeLimitExceeded(int startId, int fgsType) { public final void callOnTimeLimitExceeded(int startId, @ForegroundServiceType int fgsType) { // Note, because all the service callbacks (and other similar callbacks, e.g. activity // callbacks) are delivered using the main handler, it's possible the service is already // stopped when before this method is called, so we do a double check here. Loading @@ -1190,9 +1190,10 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac * * @param startId the startId passed to {@link #onStartCommand(Intent, int, int)} when * the service started. * @param fgsType the foreground service type which caused the timeout. * @param fgsType the {@link ServiceInfo.ForegroundServiceType foreground service type} which * caused the timeout. */ @FlaggedApi(Flags.FLAG_INTRODUCE_NEW_SERVICE_ONTIMEOUT_CALLBACK) public void onTimeout(int startId, int fgsType) { public void onTimeout(int startId, @ForegroundServiceType int fgsType) { } }