Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 616820a4 authored by Darrell Shi's avatar Darrell Shi
Browse files

Move ServiceWatcher and dependencies to core

This change moves ServiceWatcher and its dependencies to core and makes
them hidden APIs. This enables system packages like SystemUI to utilize
it for monitoring and stablizing service connections.

Test: able to reference ServiceWatcher from SystemUI
Bug: 375236794
Flag: EXEMPT simply moving files

Change-Id: I4c46836a79dea0456d395b2fde408ad570207cd2
parent ccc48a93
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@ import java.util.concurrent.Executor;
 * relatively long-running operations like saving state to disk (in addition to
 * simply being a background priority), which can cause operations scheduled on it
 * to be delayed for a user-noticeable amount of time.
 *
 * @hide
 */
public final class FgThread extends ServiceThread {
    private static final long SLOW_DISPATCH_THRESHOLD_MS = 100;
+2 −0
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ import android.os.StrictMode;

/**
 * Special handler thread that we create for system services that require their own loopers.
 *
 * @hide
 */
public class ServiceThread extends HandlerThread {
    private static final String TAG = "ServiceThread";
+2 −0
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ import java.util.Objects;
 * <p>Optionally, two permissions may be specified: (1) a caller permission - any service that does
 * not require callers to hold this permission is rejected (2) a service permission - any service
 * whose package does not hold this permission is rejected.
 *
 * @hide
 */
public final class CurrentUserServiceSupplier extends BroadcastReceiver implements
        ServiceSupplier<CurrentUserServiceSupplier.BoundServiceInfo> {
+3 −1
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ import java.util.Objects;
 * whether any particular {@link BinderOperation} will succeed. Clients must ensure they do not rely
 * on this, and instead use {@link ServiceListener} notifications as necessary to recover from
 * failures.
 *
 * @hide
 */
public interface ServiceWatcher {

Loading