diff --git a/api/current.txt b/api/current.txt index 04f3399bede6c..d5ece2e7301c7 100644 --- a/api/current.txt +++ b/api/current.txt @@ -30654,6 +30654,7 @@ package android.net.wifi { method public boolean isP2pSupported(); method public boolean isPreferredNetworkOffloadSupported(); method @Deprecated public boolean isScanAlwaysAvailable(); + method public boolean isStaApConcurrencySupported(); method public boolean isTdlsSupported(); method public boolean isWapiSupported(); method public boolean isWifiEnabled(); diff --git a/packages/Tethering/jarjar-rules.txt b/packages/Tethering/jarjar-rules.txt index c6efa41e580ad..3c182ec151ee1 100644 --- a/packages/Tethering/jarjar-rules.txt +++ b/packages/Tethering/jarjar-rules.txt @@ -16,3 +16,4 @@ rule com.android.internal.util.TrafficStatsConstants* com.android.networkstack.t rule android.net.LocalLog* com.android.networkstack.tethering.LocalLog@1 rule android.net.shared.Inet4AddressUtils* com.android.networkstack.tethering.shared.Inet4AddressUtils@1 +rule android.net.util.** com.android.networkstack.tethering.util.@1 diff --git a/packages/Tethering/src/com/android/server/connectivity/tethering/TetheringInterfaceUtils.java b/packages/Tethering/src/com/android/server/connectivity/tethering/TetheringInterfaceUtils.java index 4dd68301f9fab..174836c14bd19 100644 --- a/packages/Tethering/src/com/android/server/connectivity/tethering/TetheringInterfaceUtils.java +++ b/packages/Tethering/src/com/android/server/connectivity/tethering/TetheringInterfaceUtils.java @@ -21,8 +21,7 @@ import android.net.LinkProperties; import android.net.NetworkCapabilities; import android.net.RouteInfo; import android.net.util.InterfaceSet; - -import com.android.net.module.util.NetUtils; +import android.net.util.NetUtils; import java.net.InetAddress; import java.net.UnknownHostException; diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java index 6ee864880716f..66a2b013e299d 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java @@ -3395,6 +3395,9 @@ public class UserManagerService extends IUserManager.Stub { private void dispatchUserAddedIntent(@NonNull UserInfo userInfo) { Intent addedIntent = new Intent(Intent.ACTION_USER_ADDED); addedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userInfo.id); + // Also, add the UserHandle for mainline modules which can't use the @hide + // EXTRA_USER_HANDLE. + addedIntent.putExtra(Intent.EXTRA_USER, UserHandle.of(userInfo.id)); mContext.sendBroadcastAsUser(addedIntent, UserHandle.ALL, android.Manifest.permission.MANAGE_USERS); MetricsLogger.count(mContext, userInfo.isGuest() ? TRON_GUEST_CREATED @@ -3678,9 +3681,12 @@ public class UserManagerService extends IUserManager.Stub { // wiping the user's system directory and removing from the user list long ident = Binder.clearCallingIdentity(); try { - Intent addedIntent = new Intent(Intent.ACTION_USER_REMOVED); - addedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId); - mContext.sendOrderedBroadcastAsUser(addedIntent, UserHandle.ALL, + Intent removedIntent = new Intent(Intent.ACTION_USER_REMOVED); + removedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId); + // Also, add the UserHandle for mainline modules which can't use the @hide + // EXTRA_USER_HANDLE. + removedIntent.putExtra(Intent.EXTRA_USER, UserHandle.of(userId)); + mContext.sendOrderedBroadcastAsUser(removedIntent, UserHandle.ALL, android.Manifest.permission.MANAGE_USERS, new BroadcastReceiver() { diff --git a/wifi/jarjar-rules.txt b/wifi/jarjar-rules.txt index 8f720407f4d7c..60a38dd827fab 100644 --- a/wifi/jarjar-rules.txt +++ b/wifi/jarjar-rules.txt @@ -1,5 +1,6 @@ rule android.net.InterfaceConfigurationParcel* @0 rule android.net.InterfaceConfiguration* com.android.server.x.wifi.net.InterfaceConfiguration@1 +rule android.net.util.** com.android.server.x.wifi.net.util.@1 # We don't jar-jar the entire package because, we still use some classes (like # AsyncChannel in com.android.internal.util) from these packages which are not diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 2f7cf54f3b121..95401032219dc 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -2368,6 +2368,15 @@ public class WifiManager { return isFeatureSupported(WIFI_FEATURE_AWARE); } + /** + * Query whether the device supports Station (STA) + Access point (AP) concurrency or not. + * + * @return true if this device supports STA + AP concurrency, false otherwise. + */ + public boolean isStaApConcurrencySupported() { + return isFeatureSupported(WIFI_FEATURE_AP_STA); + } + /** * @deprecated Please use {@link android.content.pm.PackageManager#hasSystemFeature(String)} * with {@link android.content.pm.PackageManager#FEATURE_WIFI_RTT} and