Commit Graph
96 Commits
Author SHA1 Message Date
John Carroll a3f5d108f5 Added a feature flag to control whether we are allowed to set the bluetooth adapter state or not on windows.
PiperOrigin-RevId: 479589889
2022-10-07 08:49:24 -07:00
Guogang Li 2fff61b312 Separated BLE permission API into mediums manager
PiperOrigin-RevId: 478640491
2022-10-03 16:57:24 -07:00
Eiden Kim 7350643c36 Update Prng usage so that it can generate random values on different threads.
PiperOrigin-RevId: 478025630
2022-09-30 10:31:27 -07:00
John Carroll 646c3e5020 Move the increment rename tag (x) from before the first dot to before the last dot.
PiperOrigin-RevId: 477849732
2022-09-29 16:26:36 -07:00
hai007 ad93e1f47b Retry the Hotspot IP address query procedure
PiperOrigin-RevId: 477592843
2022-09-28 17:26:17 -07:00
hai007 f65e32ad32 Catch exceptions when retrieve Hotspot IP address
PiperOrigin-RevId: 477363744
2022-09-27 23:11:03 -07:00
Guogang Li d55d41e263 Fixed a crash in Bluetooth classic medium
PiperOrigin-RevId: 477027985
2022-09-26 17:12:12 -07:00
Guogang Li 086ad175a8 Fixed the issue to transfer file name in utf8
PiperOrigin-RevId: 476959117
2022-09-26 12:17:17 -07:00
Guogang Li 2ca7d43f1a Fixed the BLE start/stop issues
PiperOrigin-RevId: 475915082
2022-09-21 13:53:37 -07:00
Guogang Li 9f9b3d26d1 Fixed the log issue for advertisement data
PiperOrigin-RevId: 474897767
2022-09-16 14:09:45 -07:00
John Carroll 0b57cd5c5f Fixed unit tests. Unit tests were failing locally, mostly just type mismatches, but there was an error in the GetDownloadPath for the test utilities.
PiperOrigin-RevId: 474358069
2022-09-14 12:17:35 -07:00
hai007 6b5251f8d2 Don't add WIFI_LAN device if it's device info is incomplete or has error
PiperOrigin-RevId: 474162548
2022-09-13 17:16:53 -07:00
John Carroll fa062b70c9 The order of includes was messed up in bluetooth_adapter.cc
PiperOrigin-RevId: 473854940
2022-09-12 15:07:54 -07:00
John Carroll 55c4714b99 Cleanup the code. Change inputs on ImplementationPlatform::GetDownloadPath from std::string& to absl::string_view.
PiperOrigin-RevId: 472770249
2022-09-07 11:22:24 -07:00
Hai Shang da54ba3422 Add async operations to ble_v2
PiperOrigin-RevId: 472611661
2022-09-06 19:08:22 -07:00
Guogang Li 851f5ec0dd Fixed the crash when connecting a remote target from Win to Phone
PiperOrigin-RevId: 472502070
2022-09-06 10:50:21 -07:00
hai007 a7c967a034 Add null check before passing a char* to std::string::string()
PiperOrigin-RevId: 470812873
2022-08-29 14:19:12 -07:00
hai007 01a4daffd2 Check the WiFiDirect support with Win32 API
Close the WiFi Handle after open it

PiperOrigin-RevId: 469602395
2022-08-23 18:02:15 -07:00
hai007 fa92234b7c Restore the previous WIFI connection for client after disconnect from Hotspot.
PiperOrigin-RevId: 467009808
2022-08-11 11:42:28 -07:00
hai007 2d979fd86c Create a Device Object for Hotspot Client to avoid being disconnected by Hotspot.
Without creating a Device Object for the connection from a Hotspot Client, [Microsoft-Windows-WLAN-AutoConfig] may think it is a malign device and will disconnect it after 2 minutes, which will also causes Hotspot being deleted eventually.

PiperOrigin-RevId: 466395817
2022-08-09 10:18:50 -07:00
guogang 5df9ef5eca Removed API mutex from platform implementation.
PiperOrigin-RevId: 465635705
2022-08-05 13:31:05 -07:00
suetfei 4bf31d18da Internal Flow change
PiperOrigin-RevId: 465623255
2022-08-05 12:30:23 -07:00
jfcarroll d09223d435 Prevent escaping the users Downloads folder by removing all occurances of /.. from the path passed in.
PiperOrigin-RevId: 465450615
2022-08-04 18:13:29 -07:00
jfcarroll 778c77eacd Persist the original radio name, and restore it on app start if the radio name is our radio name.
PiperOrigin-RevId: 464148898
2022-07-29 13:43:35 -07:00
hai007 bbf6de9d12 Remove a check from a Windows test.
PiperOrigin-RevId: 461245680
2022-07-15 14:55:08 -07:00
guogang 591ef0922e Caught all exceptions in BLE scanning and advertising
PiperOrigin-RevId: 460760683
2022-07-13 11:16:03 -07:00
guogang bff4051015 Fixed the deadlock in BluetoothServerSocket
PiperOrigin-RevId: 460724338
2022-07-13 08:41:13 -07:00
guogang dcbcbb53cc Avoided to set Bluetooth radio status when new state is same as old
PiperOrigin-RevId: 458545342
2022-07-01 14:37:27 -07:00
aaronyujiaze ff9a986595 Reduce the frequency of redundant Bluetooth Classic operations
PiperOrigin-RevId: 458057650
2022-06-29 14:05:41 -07:00
aaronyujiaze abc0ae34df Ensure bluetooth adapter is enabled before BLE operations
PiperOrigin-RevId: 458011940
2022-06-29 10:47:25 -07:00
jfcarroll bd9d01ec29 Fix for outgoing file names being truncated, and renaming input files should not occur, only output files.
PiperOrigin-RevId: 457857046
2022-06-28 17:41:29 -07:00
guogang 698b04184a Fixed a few issues found during test
PiperOrigin-RevId: 457604581
2022-06-27 17:30:37 -07:00
jfcarroll 87c76ea235 The file was overwritten when transferring a file that already existed in the downloads folder. With this change we now add " (x)", where x is an incrementing number, starting at 1, using the next non-existing number, to the file name, just before the first dot, or at the end if no dot. This has been applied to the GetDownloadPath method in the platform api.
PiperOrigin-RevId: 457530287
2022-06-27 11:44:15 -07:00
aaronyujiaze 75aa59d57e Fix BluetoothAdapter bug to enable Bluetooth Classic Advertising
PiperOrigin-RevId: 456609115
2022-06-22 14:28:52 -07:00
aaronyujiaze 064a482e7d Add unit tests for BluetoothAdapter
PiperOrigin-RevId: 455673471
2022-06-17 12:36:02 -07:00
aaronyujiaze 6bd1a78eeb Add size limit check for Bluetooth Classic SetName
PiperOrigin-RevId: 455442872
2022-06-16 12:34:35 -07:00
aaronyujiaze cf85146096 Add the comprehensive set of BluetoothError Enums
PiperOrigin-RevId: 455239120
2022-06-15 15:54:27 -07:00
hai007 2d4cc75dfa Fix miscellaneous typos in the comments or logging.
PiperOrigin-RevId: 454649199
2022-06-13 10:55:57 -07:00
xlythe 62fc7e1e24 [Connections] Fix typo in log
PiperOrigin-RevId: 453992571
2022-06-09 13:00:55 -07:00
hai007 1aeb1093a9 Delete temporary Hotspot profiles after the session is done.
Reduce max rescan from 3 to 2 times. Experiment shows if second time scan fail, it always fail to find the Hotspot.

PiperOrigin-RevId: 453729656
2022-06-08 11:39:32 -07:00
aaronyujiaze 199bbc9cd1 Add null checkers to Bluetooth Classic medium ConnectToService
PiperOrigin-RevId: 453542256
2022-06-07 15:44:41 -07:00
aaronyujiaze ccca7bef6f Mute logging of BLE advertisement discovery for release builds
PiperOrigin-RevId: 453493406
2022-06-07 12:06:31 -07:00
aaronyujiaze 5566832a00 Enhance stability of bluetooth classic medium
PiperOrigin-RevId: 453239216
2022-06-06 11:09:57 -07:00
aaronyujiaze 71974b2c0b Fix BlePeripheral pointer protection bug
PiperOrigin-RevId: 452884820
2022-06-03 19:08:15 -07:00
aaronyujiaze bc6c726970 Fix bugs in Windows' BluetoothAdapter
PiperOrigin-RevId: 452808916
2022-06-03 11:38:33 -07:00
aaronyujiaze 4045af569f Add Extended Advertising support for BlePeripheral discovery
PiperOrigin-RevId: 452801874
2022-06-03 11:06:43 -07:00
aaronyujiaze 45386948be Add dual-mode Bluetooth Classic Device to support RequestConnection over BLE Fast Advertisement
PiperOrigin-RevId: 452782174
2022-06-03 09:33:59 -07:00
aaronyujiaze c94981c880 Convert logging of advertisement bytes to hex string format
PiperOrigin-RevId: 452610643
2022-06-02 13:35:52 -07:00
aaronyujiaze 926dcc28d4 Add BlePeripheral discovery logic implementation
PiperOrigin-RevId: 452609641
2022-06-02 13:31:25 -07:00
jfcarroll 28da839987 Latest update for winrt
PiperOrigin-RevId: 452591835
2022-06-02 12:05:19 -07:00