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

Commit b9a56a4a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Cherry-pick: Add null check for Wi-Fi command" into oc-dr1-dev

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