Loading core/java/android/net/ConnectivityManager.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -720,6 +720,19 @@ public class ConnectivityManager { } } } } /** * Returns an array of of {@link NetworkCapabilities} objects, representing * the Networks that applications run by the given user will use by default. * @hide */ public NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser(int userId) { try { return mService.getDefaultNetworkCapabilitiesForUser(userId); } catch (RemoteException e) { return null; } } /** /** * Returns details about the Provisioning or currently active default data network. When * Returns details about the Provisioning or currently active default data network. When * connected, this network is the default route for outgoing connections. * connected, this network is the default route for outgoing connections. Loading core/java/android/net/IConnectivityManager.aidl +1 −0 Original line number Original line Diff line number Diff line Loading @@ -49,6 +49,7 @@ interface IConnectivityManager NetworkInfo[] getAllNetworkInfo(); NetworkInfo[] getAllNetworkInfo(); Network getNetworkForType(int networkType); Network getNetworkForType(int networkType); Network[] getAllNetworks(); Network[] getAllNetworks(); NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser(int userId); NetworkInfo getProvisioningOrActiveNetworkInfo(); NetworkInfo getProvisioningOrActiveNetworkInfo(); Loading core/java/android/net/NetworkCapabilities.java +8 −1 Original line number Original line Diff line number Diff line Loading @@ -154,9 +154,16 @@ public final class NetworkCapabilities implements Parcelable { */ */ public static final int NET_CAPABILITY_NOT_VPN = 15; public static final int NET_CAPABILITY_NOT_VPN = 15; /** * Indicates that connectivity on this network was successfully validated. For example, for a * network with NET_CAPABILITY_INTERNET, it means that Internet connectivity was successfully * detected. * @hide */ public static final int NET_CAPABILITY_VALIDATED = 16; private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS; private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS; private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_NOT_VPN; private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_VALIDATED; /** /** * Adds the given capability to this {@code NetworkCapability} instance. * Adds the given capability to this {@code NetworkCapability} instance. Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -122,7 +122,7 @@ public class QSTileHost implements QSTile.Host { tile.userSwitch(newUserId); tile.userSwitch(newUserId); } } mSecurity.onUserSwitched(newUserId); mSecurity.onUserSwitched(newUserId); mNetwork.getAccessPointController().onUserSwitched(newUserId); mNetwork.onUserSwitched(newUserId); mObserver.register(); mObserver.register(); } } }; }; Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,7 @@ public interface NetworkController { void addNetworkSignalChangedCallback(NetworkSignalChangedCallback cb); void addNetworkSignalChangedCallback(NetworkSignalChangedCallback cb); void removeNetworkSignalChangedCallback(NetworkSignalChangedCallback cb); void removeNetworkSignalChangedCallback(NetworkSignalChangedCallback cb); void setWifiEnabled(boolean enabled); void setWifiEnabled(boolean enabled); void onUserSwitched(int newUserId); AccessPointController getAccessPointController(); AccessPointController getAccessPointController(); MobileDataController getMobileDataController(); MobileDataController getMobileDataController(); Loading Loading @@ -49,7 +50,6 @@ public interface NetworkController { void scanForAccessPoints(); void scanForAccessPoints(); boolean connect(AccessPoint ap); boolean connect(AccessPoint ap); boolean canConfigWifi(); boolean canConfigWifi(); void onUserSwitched(int newUserId); public interface AccessPointCallback { public interface AccessPointCallback { void onAccessPointsChanged(AccessPoint[] accessPoints); void onAccessPointsChanged(AccessPoint[] accessPoints); Loading Loading
core/java/android/net/ConnectivityManager.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -720,6 +720,19 @@ public class ConnectivityManager { } } } } /** * Returns an array of of {@link NetworkCapabilities} objects, representing * the Networks that applications run by the given user will use by default. * @hide */ public NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser(int userId) { try { return mService.getDefaultNetworkCapabilitiesForUser(userId); } catch (RemoteException e) { return null; } } /** /** * Returns details about the Provisioning or currently active default data network. When * Returns details about the Provisioning or currently active default data network. When * connected, this network is the default route for outgoing connections. * connected, this network is the default route for outgoing connections. Loading
core/java/android/net/IConnectivityManager.aidl +1 −0 Original line number Original line Diff line number Diff line Loading @@ -49,6 +49,7 @@ interface IConnectivityManager NetworkInfo[] getAllNetworkInfo(); NetworkInfo[] getAllNetworkInfo(); Network getNetworkForType(int networkType); Network getNetworkForType(int networkType); Network[] getAllNetworks(); Network[] getAllNetworks(); NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser(int userId); NetworkInfo getProvisioningOrActiveNetworkInfo(); NetworkInfo getProvisioningOrActiveNetworkInfo(); Loading
core/java/android/net/NetworkCapabilities.java +8 −1 Original line number Original line Diff line number Diff line Loading @@ -154,9 +154,16 @@ public final class NetworkCapabilities implements Parcelable { */ */ public static final int NET_CAPABILITY_NOT_VPN = 15; public static final int NET_CAPABILITY_NOT_VPN = 15; /** * Indicates that connectivity on this network was successfully validated. For example, for a * network with NET_CAPABILITY_INTERNET, it means that Internet connectivity was successfully * detected. * @hide */ public static final int NET_CAPABILITY_VALIDATED = 16; private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS; private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS; private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_NOT_VPN; private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_VALIDATED; /** /** * Adds the given capability to this {@code NetworkCapability} instance. * Adds the given capability to this {@code NetworkCapability} instance. Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -122,7 +122,7 @@ public class QSTileHost implements QSTile.Host { tile.userSwitch(newUserId); tile.userSwitch(newUserId); } } mSecurity.onUserSwitched(newUserId); mSecurity.onUserSwitched(newUserId); mNetwork.getAccessPointController().onUserSwitched(newUserId); mNetwork.onUserSwitched(newUserId); mObserver.register(); mObserver.register(); } } }; }; Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,7 @@ public interface NetworkController { void addNetworkSignalChangedCallback(NetworkSignalChangedCallback cb); void addNetworkSignalChangedCallback(NetworkSignalChangedCallback cb); void removeNetworkSignalChangedCallback(NetworkSignalChangedCallback cb); void removeNetworkSignalChangedCallback(NetworkSignalChangedCallback cb); void setWifiEnabled(boolean enabled); void setWifiEnabled(boolean enabled); void onUserSwitched(int newUserId); AccessPointController getAccessPointController(); AccessPointController getAccessPointController(); MobileDataController getMobileDataController(); MobileDataController getMobileDataController(); Loading Loading @@ -49,7 +50,6 @@ public interface NetworkController { void scanForAccessPoints(); void scanForAccessPoints(); boolean connect(AccessPoint ap); boolean connect(AccessPoint ap); boolean canConfigWifi(); boolean canConfigWifi(); void onUserSwitched(int newUserId); public interface AccessPointCallback { public interface AccessPointCallback { void onAccessPointsChanged(AccessPoint[] accessPoints); void onAccessPointsChanged(AccessPoint[] accessPoints); Loading