Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d99cd44f authored by Lorenzo Colitti's avatar Lorenzo Colitti Committed by Android Git Automerger
Browse files

am dc99c504: Merge "Make StatusBar display all default networks." into lmp-mr1-dev

* commit 'dc99c504':
  Make StatusBar display all default networks.
parents 0821a566 dc99c504
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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
     * connected, this network is the default route for outgoing connections.
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ interface IConnectivityManager
    NetworkInfo[] getAllNetworkInfo();
    Network getNetworkForType(int networkType);
    Network[] getAllNetworks();
    NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser(int userId);

    NetworkInfo getProvisioningOrActiveNetworkInfo();

+8 −1
Original line number Diff line number Diff line
@@ -154,9 +154,16 @@ public final class NetworkCapabilities implements Parcelable {
     */
    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 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.
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ public class QSTileHost implements QSTile.Host {
                    tile.userSwitch(newUserId);
                }
                mSecurity.onUserSwitched(newUserId);
                mNetwork.getAccessPointController().onUserSwitched(newUserId);
                mNetwork.onUserSwitched(newUserId);
                mObserver.register();
            }
        };
+1 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ public interface NetworkController {
    void addNetworkSignalChangedCallback(NetworkSignalChangedCallback cb);
    void removeNetworkSignalChangedCallback(NetworkSignalChangedCallback cb);
    void setWifiEnabled(boolean enabled);
    void onUserSwitched(int newUserId);
    AccessPointController getAccessPointController();
    MobileDataController getMobileDataController();

@@ -49,7 +50,6 @@ public interface NetworkController {
        void scanForAccessPoints();
        boolean connect(AccessPoint ap);
        boolean canConfigWifi();
        void onUserSwitched(int newUserId);

        public interface AccessPointCallback {
            void onAccessPointsChanged(AccessPoint[] accessPoints);
Loading