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

Commit 1be84546 authored by Takashi Furukawa's avatar Takashi Furukawa Committed by android-build-merger
Browse files

Merge "Cherry-pick: Add null check for Wi-Fi command" into oc-mr1-dev am: 552d35cb

am: 154a2377

Change-Id: I1c843a238cef6920887d8ed6a265913985452692
parents 0ebe6e31 154a2377
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -51,6 +51,10 @@ public class WifiCommand extends Svc.Command {
            if (validCommand) {
            if (validCommand) {
                IWifiManager wifiMgr
                IWifiManager wifiMgr
                        = IWifiManager.Stub.asInterface(ServiceManager.getService(Context.WIFI_SERVICE));
                        = IWifiManager.Stub.asInterface(ServiceManager.getService(Context.WIFI_SERVICE));
                if (wifiMgr == null) {
                    System.err.println("Wi-Fi service is not ready");
                    return;
                }
                try {
                try {
                    wifiMgr.setWifiEnabled("com.android.shell", flag);
                    wifiMgr.setWifiEnabled("com.android.shell", flag);
                }
                }