diff --git a/sharing/flags/generated/nearby_sharing_feature_flags.h b/sharing/flags/generated/nearby_sharing_feature_flags.h index 7011bbab..57015ed1 100755 --- a/sharing/flags/generated/nearby_sharing_feature_flags.h +++ b/sharing/flags/generated/nearby_sharing_feature_flags.h @@ -38,9 +38,6 @@ constexpr auto kDeleteUnexpectedReceivedFile = // Enable/disable the use of BLE as a connection medium. constexpr auto kEnableBleForTransfer = flags::Flag(kConfigPackage, "45427466", false); -// Disable/Enable BLE v2 in Nearby Sharing SDK. -constexpr auto kEnableBleV2 = - flags::Flag(kConfigPackage, "45401516", false); // Enable/disable certificates dump constexpr auto kEnableCertificatesDump = flags::Flag(kConfigPackage, "45409184", false); @@ -116,7 +113,7 @@ constexpr auto kShowAdminModeWarning = flags::Flag(kConfigPackage, "45410558", false); // Show/hide auto app start setting. constexpr auto kShowAutoAppStartSetting = - flags::Flag(kConfigPackage, "45411601", false); + flags::Flag(kConfigPackage, "45411601", true); // Enable/disable auto-update on settings page constexpr auto kShowAutoUpdateSetting = flags::Flag(kConfigPackage, "45409033", false); @@ -137,7 +134,6 @@ inline absl::btree_map&> GetBoolFlags() { return { {45627826, kDeleteUnexpectedReceivedFile}, {45427466, kEnableBleForTransfer}, - {45401516, kEnableBleV2}, {45409184, kEnableCertificatesDump}, {45412090, kEnableComponentsRefactor}, {45415713, kEnableDumpingFeatureFlags}, diff --git a/sharing/nearby_connections_manager_impl.cc b/sharing/nearby_connections_manager_impl.cc index cfcbb4ba..9b7d2b12 100644 --- a/sharing/nearby_connections_manager_impl.cc +++ b/sharing/nearby_connections_manager_impl.cc @@ -231,42 +231,16 @@ void NearbyConnectionsManagerImpl::StartAdvertising( OnBandwidthChanged(endpoint_id, medium); }; - // Check if BLE hardware supports Extended Advertising - bool extended_advertising_supported = - context_->GetBluetoothAdapter().IsExtendedAdvertisingSupported(); - Uuid fast_advertisement_service_uuid; - if (NearbyFlags::GetInstance().GetBoolFlag( - config_package_nearby::nearby_sharing_feature::kEnableBleV2)) { - NL_LOG(INFO) << __func__ - << ": Nearby Sharing flag kEnableBleV2 is enabled."; - // Uses fast advertisement when advertisement data size is less than - // kMinimumAdvertisementSize. Nearby Connections will decide whether to use - // GATT server with this information. - if (endpoint_info.size() > kMinimumAdvertisementSize) { - fast_advertisement_service_uuid = Uuid(""); - } else { - fast_advertisement_service_uuid = Uuid(kFastAdvertisementServiceUuid); - } + NL_LOG(INFO) << __func__ << ": Nearby Sharing flag kEnableBleV2 is enabled."; + // Uses fast advertisement when advertisement data size is less than + // kMinimumAdvertisementSize. Nearby Connections will decide whether to use + // GATT server with this information. + if (endpoint_info.size() > kMinimumAdvertisementSize) { + fast_advertisement_service_uuid = Uuid(""); } else { - NL_LOG(INFO) << __func__ - << ": Nearby Sharing flag kEnableBleV2 is disabled."; - // Only use Fast Advertisement if Extended Advertising is not supported - if (extended_advertising_supported) { - // Empty string to instruct Nearby Connection BLE not to use Fast - // Advertisement - fast_advertisement_service_uuid = Uuid(""); - } else { - // Handle advertisement on device without BLE advertisement extension. - if (endpoint_info.size() > kMinimumAdvertisementSize) { - // cannot use Fast Advertisement, because the endpoint info size exceeds - // the limitation of Fast Advertisement. - fast_advertisement_service_uuid = Uuid(""); - } else { - fast_advertisement_service_uuid = Uuid(kFastAdvertisementServiceUuid); - } - } + fast_advertisement_service_uuid = Uuid(kFastAdvertisementServiceUuid); } nearby_connections_service_->StartAdvertising(