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

Commit 030fd23c authored by paulhu's avatar paulhu Committed by Paul Hu
Browse files

Expose BroadcastOptions#setMaxManifestReceiverApiLevel as system API

Connectivity service is going to become a mainline module which
will not able to access hidden APIs. But it needs
BroadcastOptions#setMaxManifestReceiverApiLevel to restrict the
receiving of CONNECTIVITY_ACTION intent. Thus, expose it as a
system API to support the usage.

Bug: 170593746
Test: atest FrameworksNetTests
Test: atest CtsNetApi23TestCases
Test: atest KeyChainTests
Change-Id: Ic45552174c3f9e74141db4495bb99a582000b574
Merged-In: Ic45552174c3f9e74141db4495bb99a582000b574
parent 3c3baf16
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
// Signature format: 2.0
package android.app {

  public class BroadcastOptions {
    method public int getMaxManifestReceiverApiLevel();
    method public void setMaxManifestReceiverApiLevel(int);
  }

}

package android.os {

  public class Binder implements android.os.IBinder {
+2 −0
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ public class BroadcastOptions {
     * them.  This only applies to receivers declared in the app's AndroidManifest.xml.
     * @hide
     */
    @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
    public void setMaxManifestReceiverApiLevel(int apiLevel) {
        mMaxManifestReceiverApiLevel = apiLevel;
    }
@@ -135,6 +136,7 @@ public class BroadcastOptions {
     * Return {@link #setMaxManifestReceiverApiLevel}.
     * @hide
     */
    @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
    public int getMaxManifestReceiverApiLevel() {
        return mMaxManifestReceiverApiLevel;
    }