Loading core/java/android/provider/Settings.java +15 −0 Original line number Diff line number Diff line Loading @@ -5106,6 +5106,21 @@ public final class Settings { public static final String WIFI_DISPLAY_CERTIFICATION_ON = "wifi_display_certification_on"; /** * WPS Configuration method used by Wifi display, this setting only * takes effect when WIFI_DISPLAY_CERTIFICATION_ON is 1 (enabled). * * Possible values are: * * WpsInfo.INVALID: use default WPS method chosen by framework * WpsInfo.PBC : use Push button * WpsInfo.KEYPAD : use Keypad * WpsInfo.DISPLAY: use Display * @hide */ public static final String WIFI_DISPLAY_WPS_CONFIG = "wifi_display_wps_config"; /** * Whether to notify the user of open networks. * <p> Loading services/java/com/android/server/display/WifiDisplayController.java +13 −1 Original line number Diff line number Diff line Loading @@ -150,6 +150,8 @@ final class WifiDisplayController implements DumpUtils.Dump { // Certification private boolean mWifiDisplayCertMode; private int mWifiDisplayWpsConfig = WpsInfo.INVALID; private WifiP2pDevice mThisDevice; public WifiDisplayController(Context context, Handler handler, Listener listener) { Loading Loading @@ -179,6 +181,8 @@ final class WifiDisplayController implements DumpUtils.Dump { Settings.Global.WIFI_DISPLAY_ON), false, settingsObserver); resolver.registerContentObserver(Settings.Global.getUriFor( Settings.Global.WIFI_DISPLAY_CERTIFICATION_ON), false, settingsObserver); resolver.registerContentObserver(Settings.Global.getUriFor( Settings.Global.WIFI_DISPLAY_WPS_CONFIG), false, settingsObserver); updateSettings(); } Loading @@ -189,6 +193,12 @@ final class WifiDisplayController implements DumpUtils.Dump { mWifiDisplayCertMode = Settings.Global.getInt(resolver, Settings.Global.WIFI_DISPLAY_CERTIFICATION_ON, 0) != 0; mWifiDisplayWpsConfig = WpsInfo.INVALID; if (mWifiDisplayCertMode) { mWifiDisplayWpsConfig = Settings.Global.getInt(resolver, Settings.Global.WIFI_DISPLAY_WPS_CONFIG, WpsInfo.INVALID); } updateWfdEnableState(); } Loading Loading @@ -608,7 +618,9 @@ final class WifiDisplayController implements DumpUtils.Dump { mConnectingDevice = mDesiredDevice; WifiP2pConfig config = new WifiP2pConfig(); WpsInfo wps = new WpsInfo(); if (mConnectingDevice.wpsPbcSupported()) { if (mWifiDisplayWpsConfig != WpsInfo.INVALID) { wps.setup = mWifiDisplayWpsConfig; } else if (mConnectingDevice.wpsPbcSupported()) { wps.setup = WpsInfo.PBC; } else if (mConnectingDevice.wpsDisplaySupported()) { // We do keypad if peer does display Loading Loading
core/java/android/provider/Settings.java +15 −0 Original line number Diff line number Diff line Loading @@ -5106,6 +5106,21 @@ public final class Settings { public static final String WIFI_DISPLAY_CERTIFICATION_ON = "wifi_display_certification_on"; /** * WPS Configuration method used by Wifi display, this setting only * takes effect when WIFI_DISPLAY_CERTIFICATION_ON is 1 (enabled). * * Possible values are: * * WpsInfo.INVALID: use default WPS method chosen by framework * WpsInfo.PBC : use Push button * WpsInfo.KEYPAD : use Keypad * WpsInfo.DISPLAY: use Display * @hide */ public static final String WIFI_DISPLAY_WPS_CONFIG = "wifi_display_wps_config"; /** * Whether to notify the user of open networks. * <p> Loading
services/java/com/android/server/display/WifiDisplayController.java +13 −1 Original line number Diff line number Diff line Loading @@ -150,6 +150,8 @@ final class WifiDisplayController implements DumpUtils.Dump { // Certification private boolean mWifiDisplayCertMode; private int mWifiDisplayWpsConfig = WpsInfo.INVALID; private WifiP2pDevice mThisDevice; public WifiDisplayController(Context context, Handler handler, Listener listener) { Loading Loading @@ -179,6 +181,8 @@ final class WifiDisplayController implements DumpUtils.Dump { Settings.Global.WIFI_DISPLAY_ON), false, settingsObserver); resolver.registerContentObserver(Settings.Global.getUriFor( Settings.Global.WIFI_DISPLAY_CERTIFICATION_ON), false, settingsObserver); resolver.registerContentObserver(Settings.Global.getUriFor( Settings.Global.WIFI_DISPLAY_WPS_CONFIG), false, settingsObserver); updateSettings(); } Loading @@ -189,6 +193,12 @@ final class WifiDisplayController implements DumpUtils.Dump { mWifiDisplayCertMode = Settings.Global.getInt(resolver, Settings.Global.WIFI_DISPLAY_CERTIFICATION_ON, 0) != 0; mWifiDisplayWpsConfig = WpsInfo.INVALID; if (mWifiDisplayCertMode) { mWifiDisplayWpsConfig = Settings.Global.getInt(resolver, Settings.Global.WIFI_DISPLAY_WPS_CONFIG, WpsInfo.INVALID); } updateWfdEnableState(); } Loading Loading @@ -608,7 +618,9 @@ final class WifiDisplayController implements DumpUtils.Dump { mConnectingDevice = mDesiredDevice; WifiP2pConfig config = new WifiP2pConfig(); WpsInfo wps = new WpsInfo(); if (mConnectingDevice.wpsPbcSupported()) { if (mWifiDisplayWpsConfig != WpsInfo.INVALID) { wps.setup = mWifiDisplayWpsConfig; } else if (mConnectingDevice.wpsPbcSupported()) { wps.setup = WpsInfo.PBC; } else if (mConnectingDevice.wpsDisplaySupported()) { // We do keypad if peer does display Loading