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

Commit dd5f6f0d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix handling, documentation and testing of updateable flags." into main

parents d4782543 5d7efb6c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1051,6 +1051,10 @@ package android.content {
    field public static final String TEST_NETWORK_SERVICE = "test_network";
  }

  public static final class Context.BindServiceFlags {
    method @FlaggedApi("android.content.flags.enable_update_service_bindings") public long getValue();
  }

  public class ContextWrapper extends android.content.Context {
    method public int getDisplayId();
    method public void updateDisplay(int);
+6 −1
Original line number Diff line number Diff line
@@ -366,6 +366,8 @@ public abstract class Context {
         * @return Return flags in 64 bits long integer.
         * @hide
         */
        @TestApi
        @FlaggedApi(FLAG_ENABLE_UPDATE_SERVICE_BINDINGS)
        public long getValue() {
            return mValue;
        }
@@ -786,11 +788,14 @@ public abstract class Context {
    /**
     * These bind flags may be updated (i.e. added or removed) for an existing
     * connection.
     *
     * Any updates here should also modify the {@link #getUpdateableFlags} documentation
     * as well as verify that no checks from {@link #bindService} and
     * {@code ActiveServices.bindServiceLocked} are being skipped.
     * @hide
     */
    public static final long BIND_UPDATEABLE_FLAGS =
            Context.BIND_NOT_FOREGROUND
                    | Context.BIND_ABOVE_CLIENT
                    | Context.BIND_ALLOW_OOM_MANAGEMENT
                    | Context.BIND_WAIVE_PRIORITY
                    | Context.BIND_IMPORTANT