From dd31bc4429045c1a63abecba6835c7320729de55 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Mon, 15 Jul 2019 18:03:23 +0800 Subject: [PATCH] p2p: mirgrate p2p into tethering modes Bug: 137602441 Bug: 139783330 Test: atest FrameworksNetTests Test: atest FrameworksWifiTests Test: CtsVerifier - Wi-Fi Direct Test: Enable hotspot when P2P GO is running * P2P GO is terminated * hotspot is running Test: Enable P2P GO when hotspot is running * hotspot is intact * P2P GO could not be launched Test: Verify P2P functions with legacy WifiP2pService Change-Id: Icb2e2b106ae52b19af29b7a1ebc55d3cdf80db9c --- core/java/android/net/ConnectivityManager.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index 111a8c48a4..ace0413e49 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -472,6 +472,14 @@ public class ConnectivityManager { @SystemApi public static final int TETHERING_BLUETOOTH = 2; + /** + * Wifi P2p tethering type. + * Wifi P2p tethering is set through events automatically, and don't + * need to start from #startTethering(int, boolean, OnStartTetheringCallback). + * @hide + */ + public static final int TETHERING_WIFI_P2P = 3; + /** * Extra used for communicating with the TetherService. Includes the type of tethering to * enable if any.