Merge "Update test on calling getAppExclusionList with restricted user"
diff --git a/OWNERS_core_networking_xts b/OWNERS_core_networking_xts
index 59d6575..dc92788 100644
--- a/OWNERS_core_networking_xts
+++ b/OWNERS_core_networking_xts
@@ -4,4 +4,8 @@
# For cherry-picks of CLs that are already merged in aosp/master.
jchalard@google.com #{LAST_RESORT_SUGGESTION}
maze@google.com #{LAST_RESORT_SUGGESTION}
-reminv@google.com #{LAST_RESORT_SUGGESTION}
\ No newline at end of file
+reminv@google.com #{LAST_RESORT_SUGGESTION}
+
+# Only temporary ownership to improve ethernet code quality (b/236280707)
+# TODO: remove by 12/31/2022
+per-file EthernetManagerTest.java = prohr@google.com #{LAST_RESORT_SUGGESTION}
\ No newline at end of file
diff --git a/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java b/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java
index 43aff7e..2dcf9d7 100644
--- a/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java
+++ b/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java
@@ -1943,7 +1943,9 @@
tester, false /* isClat */);
}
+ // TODO: support R device. See b/234727688.
@Test
+ @IgnoreUpTo(Build.VERSION_CODES.R)
public void testTetherClatTcp() throws Exception {
// CLAT only starts on IPv6 only network.
final TetheringTester tester = initTetheringTester(toList(TEST_IP6_ADDR),
diff --git a/service/src/com/android/server/ConnectivityService.java b/service/src/com/android/server/ConnectivityService.java
index 9322172..93265e5 100755
--- a/service/src/com/android/server/ConnectivityService.java
+++ b/service/src/com/android/server/ConnectivityService.java
@@ -9639,6 +9639,8 @@
try {
switch (cmd) {
case "airplane-mode":
+ // Usage : adb shell cmd connectivity airplane-mode [enable|disable]
+ // If no argument, get and display the current status
final String action = getNextArg();
if ("enable".equals(action)) {
setAirplaneMode(true);
@@ -9656,6 +9658,27 @@
onHelp();
return -1;
}
+ case "reevaluate":
+ // Usage : adb shell cmd connectivity reevaluate <netId>
+ // If netId is omitted, then reevaluate the default network
+ final String netId = getNextArg();
+ final NetworkAgentInfo nai;
+ if (null == netId) {
+ // Note that the command is running on the wrong thread to call this,
+ // so this could in principle return stale data. But it can't crash.
+ nai = getDefaultNetwork();
+ } else {
+ // If netId can't be parsed, this throws NumberFormatException, which
+ // is passed back to adb who prints it.
+ nai = getNetworkAgentInfoForNetId(Integer.parseInt(netId));
+ }
+ if (null == nai) {
+ pw.println("Unknown network (net ID not found or no default network)");
+ return 0;
+ }
+ Log.d(TAG, "Reevaluating network " + nai.network);
+ reportNetworkConnectivity(nai.network, !nai.isValidated());
+ return 0;
default:
return handleDefaultCommands(cmd);
}
diff --git a/tools/Android.bp b/tools/Android.bp
index 7d6b248..3ce76f6 100644
--- a/tools/Android.bp
+++ b/tools/Android.bp
@@ -27,14 +27,6 @@
"gen_jarjar.py",
],
main: "gen_jarjar.py",
- version: {
- py2: {
- enabled: false,
- },
- py3: {
- enabled: true,
- },
- },
visibility: ["//packages/modules/Connectivity:__subpackages__"],
}
@@ -95,12 +87,4 @@
":jarjar-rules-generator-testjavalib",
],
main: "gen_jarjar_test.py",
- version: {
- py2: {
- enabled: false,
- },
- py3: {
- enabled: true,
- },
- },
}