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

Commit 4bb015d9 authored by Joe LaPenna's avatar Joe LaPenna Committed by Robert Greenwalt
Browse files

CW on Master: Disable CaptivePortalTracker, EthernetService

BUG: 15143878

Change-Id: I6c534a28c1fcd475982ae70e7f3af69f3a219e24
parent 4ec20233
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1445,6 +1445,14 @@ public abstract class PackageManager {
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_WEBVIEW = "android.software.webview";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: This device supports ethernet.
     * @hide
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_ETHERNET = "android.hardware.ethernet";

    /**
     * Action to external storage service to clean out removed apps.
     * @hide
+8 −0
Original line number Diff line number Diff line
@@ -51,6 +51,11 @@ public class EthernetManager {
     * @return the Ethernet Configuration, contained in {@link IpConfiguration}.
     */
    public IpConfiguration getConfiguration() {
        if (mService == null) {
            return new IpConfiguration(IpAssignment.UNASSIGNED,
                                       ProxySettings.UNASSIGNED,
                                       new LinkProperties());
        }
        try {
            return mService.getConfiguration();
        } catch (RemoteException e) {
@@ -64,6 +69,9 @@ public class EthernetManager {
     * Set Ethernet configuration.
     */
    public void setConfiguration(IpConfiguration config) {
        if (mService == null) {
            return;
        }
        try {
            mService.setConfiguration(config);
        } catch (RemoteException e) {
+7 −2
Original line number Diff line number Diff line
@@ -256,7 +256,10 @@ public class ConnectivityService extends IConnectivityManager.Stub {
     */
    private NetworkStateTracker mNetTrackers[];

    /* Handles captive portal check on a network */
    /*
     * Handles captive portal check on a network.
     * Only set if device has {@link PackageManager#FEATURE_WIFI}.
     */
    private CaptivePortalTracker mCaptivePortalTracker;

    /**
@@ -2337,7 +2340,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
    }

    void systemReady() {
        if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI)) {
            mCaptivePortalTracker = CaptivePortalTracker.makeCaptivePortalTracker(mContext, this);
        }
        loadGlobalProxy();

        synchronized(this) {
+1 −9
Original line number Diff line number Diff line
@@ -648,21 +648,13 @@ public final class SystemServer {
                }

                mSystemServiceManager.startService(WIFI_P2P_SERVICE_CLASS);

                mSystemServiceManager.startService(WIFI_PASSPOINT_SERVICE_CLASS);

                mSystemServiceManager.startService(WIFI_SERVICE_CLASS);

                mSystemServiceManager.startService(
                            "com.android.server.wifi.WifiScanningService");

                if (!isEmulator) {
                if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_ETHERNET)) {
                    mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);
                } else {
                    // Don't start the Ethernet service on the emulator because
                    // it interferes with qemu's SLIRP emulation, which uses
                    // IPv4 over eth0. http://b/15341003 .
                    Slog.i(TAG, "Not starting Ethernet service (emulator)");
                }

                try {