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

Commit 0df62d47 authored by Chong Zhang's avatar Chong Zhang Committed by Android Git Automerger
Browse files

am 954b3b86: am 919559d4: Merge "wifi-display: disable WFD IE when Wifi...

am 954b3b86: am 919559d4: Merge "wifi-display: disable WFD IE when Wifi display is turned off" into klp-dev

* commit '954b3b86':
  wifi-display: disable WFD IE when Wifi display is turned off
parents 9c5b1497 954b3b86
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -286,6 +286,25 @@ final class WifiDisplayController implements DumpUtils.Dump {
            }
        } else {
            // WFD should be disabled.
            if (mWfdEnabled || mWfdEnabling) {
                WifiP2pWfdInfo wfdInfo = new WifiP2pWfdInfo();
                wfdInfo.setWfdEnabled(false);
                mWifiP2pManager.setWFDInfo(mWifiP2pChannel, wfdInfo, new ActionListener() {
                    @Override
                    public void onSuccess() {
                        if (DEBUG) {
                            Slog.d(TAG, "Successfully set WFD info.");
                        }
                    }

                    @Override
                    public void onFailure(int reason) {
                        if (DEBUG) {
                            Slog.d(TAG, "Failed to set WFD info with reason " + reason + ".");
                        }
                    }
                });
            }
            mWfdEnabling = false;
            mWfdEnabled = false;
            reportFeatureState();