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

Commit 4357f400 authored by lesl's avatar lesl
Browse files

Add documentation about permissions required for hide API.

Bug: 77228252
Test: Unit tests - atest frameworks/base/wifi/tests/
Change-Id: I1fe7a926246d26f3eefc177f052d66cd9094f79c
parent 708c4095
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -1281,7 +1281,16 @@ public class WifiP2pManager {
        c.mAsyncChannel.sendMessage(REMOVE_GROUP, 0, c.putListener(listener));
    }

    /** @hide */
    /**
     * Force p2p to enter or exit listen state
     *
     * @param c is the channel created at {@link #initialize(Context, Looper, ChannelListener)}
     * @param enable enables or disables listening
     * @param listener for callbacks on success or failure. Can be null.
     *
     * @hide
     */
    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
    public void listen(Channel c, boolean enable, ActionListener listener) {
        checkChannel(c);
        c.mAsyncChannel.sendMessage(enable ? START_LISTEN : STOP_LISTEN,