Define FIREWALL_CHAIN_LOW_POWER_STANDBY

Bug: 190822356
Test: atest NetworkManagementServiceTest
Change-Id: I970eea0e1952f8074cc5c998bbd2ee1ff5a3dc92
This commit is contained in:
Robert Horvath
2022-01-27 19:52:43 +01:00
parent f36a025f38
commit 34cba14425
2 changed files with 11 additions and 1 deletions

View File

@@ -46,6 +46,7 @@ package android.net {
field public static final int BLOCKED_REASON_NONE = 0; // 0x0 field public static final int BLOCKED_REASON_NONE = 0; // 0x0
field public static final int BLOCKED_REASON_RESTRICTED_MODE = 8; // 0x8 field public static final int BLOCKED_REASON_RESTRICTED_MODE = 8; // 0x8
field public static final int FIREWALL_CHAIN_DOZABLE = 1; // 0x1 field public static final int FIREWALL_CHAIN_DOZABLE = 1; // 0x1
field public static final int FIREWALL_CHAIN_LOW_POWER_STANDBY = 5; // 0x5
field public static final int FIREWALL_CHAIN_POWERSAVE = 3; // 0x3 field public static final int FIREWALL_CHAIN_POWERSAVE = 3; // 0x3
field public static final int FIREWALL_CHAIN_RESTRICTED = 4; // 0x4 field public static final int FIREWALL_CHAIN_RESTRICTED = 4; // 0x4
field public static final int FIREWALL_CHAIN_STANDBY = 2; // 0x2 field public static final int FIREWALL_CHAIN_STANDBY = 2; // 0x2

View File

@@ -963,13 +963,22 @@ public class ConnectivityManager {
@SystemApi(client = MODULE_LIBRARIES) @SystemApi(client = MODULE_LIBRARIES)
public static final int FIREWALL_CHAIN_RESTRICTED = 4; public static final int FIREWALL_CHAIN_RESTRICTED = 4;
/**
* Firewall chain used for low power standby.
* Allowlist of apps that have access in low power standby.
* @hide
*/
@SystemApi(client = MODULE_LIBRARIES)
public static final int FIREWALL_CHAIN_LOW_POWER_STANDBY = 5;
/** @hide */ /** @hide */
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
@IntDef(flag = false, prefix = "FIREWALL_CHAIN_", value = { @IntDef(flag = false, prefix = "FIREWALL_CHAIN_", value = {
FIREWALL_CHAIN_DOZABLE, FIREWALL_CHAIN_DOZABLE,
FIREWALL_CHAIN_STANDBY, FIREWALL_CHAIN_STANDBY,
FIREWALL_CHAIN_POWERSAVE, FIREWALL_CHAIN_POWERSAVE,
FIREWALL_CHAIN_RESTRICTED FIREWALL_CHAIN_RESTRICTED,
FIREWALL_CHAIN_LOW_POWER_STANDBY
}) })
public @interface FirewallChain {} public @interface FirewallChain {}