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

Commit f4f93b22 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Enable Ethernet if the device has FEATURE_USB_HOST.

Any device that supports USB OTG is capable of running Ethernet
via a USB OTG cable and Ethernet to USB adapter.

Currently, we only start the Ethernet system service if the
device has FEATURE_ETHERNET, but this requires that every device
explicitly declare FEATURE_ETHERNET, which causes bugs like
http://b/18515146 , where the L OTA broke Ethernet on nakasi.

Therefore, start the Ethernet service on all devices that have
FEATURE_USB_HOST.

Bug: 18515146
Change-Id: I3b4e85d1ad8e1aea9baa046a27f5b4dd68c42028
parent 6657dd3c
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -677,7 +677,8 @@ public final class SystemServer {


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


                if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_ETHERNET)) {
                if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_ETHERNET) ||
                    mPackageManager.hasSystemFeature(PackageManager.FEATURE_USB_HOST)) {
                    mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);
                    mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);
                }
                }