Loading core/api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -7765,7 +7765,7 @@ package android.app { method public int onStartCommand(android.content.Intent, int, int); method public void onTaskRemoved(android.content.Intent); method public void onTimeout(int); method @FlaggedApi("android.app.introduce_new_service_ontimeout_callback") public void onTimeout(int, int); method public void onTimeout(int, int); method public void onTrimMemory(int); method public boolean onUnbind(android.content.Intent); method public final void startForeground(int, android.app.Notification); core/java/android/app/Service.java +2 −8 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MANIFEST; import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER; import static android.text.TextUtils.formatSimple; import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -1135,10 +1134,8 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac } catch (RemoteException ex) { } onTimeout(startId); if (Flags.introduceNewServiceOntimeoutCallback()) { onTimeout(startId, ServiceInfo.FOREGROUND_SERVICE_TYPE_SHORT_SERVICE); } } /** * Callback called on timeout for {@link ServiceInfo#FOREGROUND_SERVICE_TYPE_SHORT_SERVICE}. Loading Loading @@ -1189,10 +1186,8 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac } } catch (RemoteException ex) { } if (Flags.introduceNewServiceOntimeoutCallback()) { onTimeout(startId, fgsType); } } /** * Callback called when a particular foreground service type has timed out. Loading Loading @@ -1220,7 +1215,6 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac * @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, @ForegroundServiceType int fgsType) { } } services/core/java/com/android/server/am/ActiveServices.java +1 −3 Original line number Diff line number Diff line Loading @@ -2420,7 +2420,6 @@ public final class ActiveServices { } } else if (CompatChanges.isChangeEnabled( FGS_INTRODUCE_TIME_LIMITS, r.appInfo.uid) && android.app.Flags.introduceNewServiceOntimeoutCallback() && getTimeLimitedFgsType(foregroundServiceType) != ServiceInfo.FOREGROUND_SERVICE_TYPE_NONE) { // Calling startForeground on a FGS type which has a time limit will only be Loading Loading @@ -2723,8 +2722,7 @@ public final class ActiveServices { mAm.notifyPackageUse(r.serviceInfo.packageName, PackageManager.NOTIFY_PACKAGE_USE_FOREGROUND_SERVICE); if (CompatChanges.isChangeEnabled(FGS_INTRODUCE_TIME_LIMITS, r.appInfo.uid) && android.app.Flags.introduceNewServiceOntimeoutCallback()) { if (CompatChanges.isChangeEnabled(FGS_INTRODUCE_TIME_LIMITS, r.appInfo.uid)) { maybeUpdateFgsTrackingLocked(r, previousFgsType); } } else { Loading Loading
core/api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -7765,7 +7765,7 @@ package android.app { method public int onStartCommand(android.content.Intent, int, int); method public void onTaskRemoved(android.content.Intent); method public void onTimeout(int); method @FlaggedApi("android.app.introduce_new_service_ontimeout_callback") public void onTimeout(int, int); method public void onTimeout(int, int); method public void onTrimMemory(int); method public boolean onUnbind(android.content.Intent); method public final void startForeground(int, android.app.Notification);
core/java/android/app/Service.java +2 −8 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MANIFEST; import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER; import static android.text.TextUtils.formatSimple; import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -1135,10 +1134,8 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac } catch (RemoteException ex) { } onTimeout(startId); if (Flags.introduceNewServiceOntimeoutCallback()) { onTimeout(startId, ServiceInfo.FOREGROUND_SERVICE_TYPE_SHORT_SERVICE); } } /** * Callback called on timeout for {@link ServiceInfo#FOREGROUND_SERVICE_TYPE_SHORT_SERVICE}. Loading Loading @@ -1189,10 +1186,8 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac } } catch (RemoteException ex) { } if (Flags.introduceNewServiceOntimeoutCallback()) { onTimeout(startId, fgsType); } } /** * Callback called when a particular foreground service type has timed out. Loading Loading @@ -1220,7 +1215,6 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac * @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, @ForegroundServiceType int fgsType) { } }
services/core/java/com/android/server/am/ActiveServices.java +1 −3 Original line number Diff line number Diff line Loading @@ -2420,7 +2420,6 @@ public final class ActiveServices { } } else if (CompatChanges.isChangeEnabled( FGS_INTRODUCE_TIME_LIMITS, r.appInfo.uid) && android.app.Flags.introduceNewServiceOntimeoutCallback() && getTimeLimitedFgsType(foregroundServiceType) != ServiceInfo.FOREGROUND_SERVICE_TYPE_NONE) { // Calling startForeground on a FGS type which has a time limit will only be Loading Loading @@ -2723,8 +2722,7 @@ public final class ActiveServices { mAm.notifyPackageUse(r.serviceInfo.packageName, PackageManager.NOTIFY_PACKAGE_USE_FOREGROUND_SERVICE); if (CompatChanges.isChangeEnabled(FGS_INTRODUCE_TIME_LIMITS, r.appInfo.uid) && android.app.Flags.introduceNewServiceOntimeoutCallback()) { if (CompatChanges.isChangeEnabled(FGS_INTRODUCE_TIME_LIMITS, r.appInfo.uid)) { maybeUpdateFgsTrackingLocked(r, previousFgsType); } } else { Loading