File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
services/java/com/android/server/display Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 3030import android .media .RemoteDisplay ;
3131import android .net .NetworkInfo ;
3232import android .net .Uri ;
33+ import android .net .wifi .WpsInfo ;
3334import android .net .wifi .p2p .WifiP2pConfig ;
3435import android .net .wifi .p2p .WifiP2pDevice ;
3536import android .net .wifi .p2p .WifiP2pDeviceList ;
@@ -572,6 +573,16 @@ private void next() {
572573
573574 mConnectingDevice = mDesiredDevice ;
574575 WifiP2pConfig config = new WifiP2pConfig ();
576+ WpsInfo wps = new WpsInfo ();
577+ if (mConnectingDevice .wpsPbcSupported ()) {
578+ wps .setup = WpsInfo .PBC ;
579+ } else if (mConnectingDevice .wpsDisplaySupported ()) {
580+ // We do keypad if peer does display
581+ wps .setup = WpsInfo .KEYPAD ;
582+ } else {
583+ wps .setup = WpsInfo .DISPLAY ;
584+ }
585+ config .wps = wps ;
575586 config .deviceAddress = mConnectingDevice .deviceAddress ;
576587 // Helps with STA & P2P concurrency
577588 config .groupOwnerIntent = WifiP2pConfig .MIN_GROUP_OWNER_INTENT ;
You can’t perform that action at this time.
0 commit comments