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

Commit 5ba1be60 authored by Jimmy Chen's avatar Jimmy Chen
Browse files

Wifi: update p2p API usage in settings

Bug: 146423859
Bug: 144799344
Test: atest --host SettingsRoboTests
Change-Id: Ia0225fa8110ff16ceda260f59ffee3739776a6a9
parent 36c3446b
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -520,7 +520,7 @@ public final class WifiDisplaySettings extends SettingsPreferenceFragment implem
        if (DEBUG) {
            Slog.d(TAG, "Setting listen mode to: " + enable);
        }
        mWifiP2pManager.listen(mWifiP2pChannel, enable, new ActionListener() {
        final ActionListener listener = new ActionListener() {
            @Override
            public void onSuccess() {
                if (DEBUG) {
@@ -534,7 +534,12 @@ public final class WifiDisplaySettings extends SettingsPreferenceFragment implem
                Slog.e(TAG, "Failed to " + (enable ? "entered" : "exited")
                        + " listen mode with reason " + reason + ".");
            }
        });
        };
        if (enable) {
            mWifiP2pManager.startListening(mWifiP2pChannel, listener);
        } else {
            mWifiP2pManager.stopListening(mWifiP2pChannel, listener);
        }
    }

    private void setWifiP2pChannels(final int lc, final int oc) {