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

Commit 893640f1 authored by David Riley's avatar David Riley
Browse files

Update ConnectionInfo and getRunningServiceConnections documentation.

Updates per API review.

Bug: 439003370
Flag: TEST_ONLY
Test: atest android.app.cts.service.ServiceTest
Change-Id: Ie282d7abb36d6ebb3a7c2e0a84469e4d218a7889
parent 897d275e
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -3444,7 +3444,11 @@ public class ActivityManager {
        }
    }

    /** @hide */
    /**
     * Information you can retrieve about a particular connection to a
     * Service that is currently running in the system.
     * @hide
     */
    @TestApi
    @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
    public static final class ConnectionInfo implements Parcelable {
@@ -3513,16 +3517,25 @@ public class ActivityManager {
            return 0;
        }

        /**
         * Get the bind service flags for the connection.
         */
        @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
        public long getFlags() {
        public @Context.BindServiceFlagsLongBits long getFlags() {
            return mFlags;
        }

        /**
         * Get the process name of the client.
         */
        @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
        public @NonNull String getProcessName() {
            return mProcessName;
        }

        /**
         * Get the package name of the client.
         */
        @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
        public @NonNull String getPackageName() {
            return mPackageName;
@@ -3546,6 +3559,10 @@ public class ActivityManager {

    /**
     * Returns a list of ConnectionInfo for connections bound to a given service.
     * @param service The component name of the service to return ConnectionInfo
     * records for.
     * @return Returns a list of ConnectionInfo records describing each of
     * the service connections.
     * @hide
     */
    @TestApi