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

Commit f178c96c authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Introduce new service bind flag to permit capabilities

Any process state-based capabilities such as location
can be allowed to permeate to the bound app, if the app
has the required permissions as well.

Bug: 128337543
Test: N/A
Change-Id: I0b066d2667333fbd65985959e202785641f704fc
parent 293b2d75
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9794,6 +9794,7 @@ package android.content {
    field public static final int BIND_DEBUG_UNBIND = 2; // 0x2
    field public static final int BIND_EXTERNAL_SERVICE = -2147483648; // 0x80000000
    field public static final int BIND_IMPORTANT = 64; // 0x40
    field public static final int BIND_INCLUDE_CAPABILITIES = 4096; // 0x1000
    field public static final int BIND_NOT_FOREGROUND = 4; // 0x4
    field public static final int BIND_WAIVE_PRIORITY = 32; // 0x20
    field public static final String BIOMETRIC_SERVICE = "biometric";
+8 −0
Original line number Diff line number Diff line
@@ -337,6 +337,14 @@ public abstract class Context {
     */
    public static final int BIND_ADJUST_BELOW_PERCEPTIBLE = 0x0100;

    /**
     * Flag for {@link #bindService}: If binding from an app that has specific capabilities
     * due to its foreground state such as an activity or foreground service, then this flag will
     * allow the bound app to get the same capabilities, as long as it has the required permissions
     * as well.
     */
    public static final int BIND_INCLUDE_CAPABILITIES = 0x00001000;

    /**
     * Flag for {@link #bindService}: This flag is intended to be used only by the system to adjust
     * the scheduling policy for IMEs (and any other out-of-process user-visible components that