mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Remove auto app start flag from settings.
PiperOrigin-RevId: 637027668
This commit is contained in:
committed by
Copybara-Service
parent
a46531153d
commit
9c6cde0770
@@ -100,8 +100,6 @@ ABSL_CONST_INIT const char kNearbySharingIsAnalyticsEnabledName[] =
|
||||
"nearby_sharing.is_analytics_enabled";
|
||||
ABSL_CONST_INIT const char kNearbySharingIsAllContactsEnabledName[] =
|
||||
"nearby_sharing.is_all_contacts_enabled";
|
||||
ABSL_CONST_INIT const char kNearbySharingAutoAppStartEnabledName[] =
|
||||
"nearby_sharing.auto_app_start_enabled";
|
||||
|
||||
void RegisterNearbySharingPrefs(PreferenceManager& preference_manager,
|
||||
bool skip_persistent_ones) {
|
||||
@@ -169,7 +167,6 @@ void RegisterNearbySharingPrefs(PreferenceManager& preference_manager,
|
||||
|
||||
preference_manager.SetBoolean(kNearbySharingIsAnalyticsEnabledName, false);
|
||||
preference_manager.SetBoolean(kNearbySharingIsAllContactsEnabledName, true);
|
||||
preference_manager.SetBoolean(kNearbySharingAutoAppStartEnabledName, true);
|
||||
}
|
||||
|
||||
void ResetSchedulers(PreferenceManager& preference_manager) {
|
||||
|
||||
@@ -589,18 +589,6 @@ void NearbyShareSettings::SetIsAllContactsEnabled(
|
||||
}
|
||||
}
|
||||
|
||||
bool NearbyShareSettings::GetAutoAppStartEnabled() const {
|
||||
MutexLock lock(&mutex_);
|
||||
return preference_manager_.GetBoolean(
|
||||
prefs::kNearbySharingAutoAppStartEnabledName, true);
|
||||
}
|
||||
|
||||
void NearbyShareSettings::SetAutoAppStartEnabled(bool is_auto_app_start) const {
|
||||
MutexLock lock(&mutex_);
|
||||
preference_manager_.SetBoolean(prefs::kNearbySharingAutoAppStartEnabledName,
|
||||
is_auto_app_start);
|
||||
}
|
||||
|
||||
void NearbyShareSettings::SendDesktopNotification(
|
||||
DesktopNotification event) const {
|
||||
analytics_recorder_->NewSendDesktopNotification(event);
|
||||
|
||||
@@ -228,9 +228,6 @@ class NearbyShareSettings
|
||||
void SetCustomSavePathAsync(absl::string_view save_path,
|
||||
const std::function<void()>& callback);
|
||||
|
||||
bool GetAutoAppStartEnabled() const;
|
||||
void SetAutoAppStartEnabled(bool is_auto_app_start) const;
|
||||
|
||||
// NearbyShareLocalDeviceDataManager::Observer:
|
||||
void OnLocalDeviceDataChanged(bool did_device_name_change,
|
||||
bool did_full_name_change,
|
||||
|
||||
@@ -520,16 +520,6 @@ TEST_F(NearbyShareSettingsTest, GetAndSetAllowedContacts) {
|
||||
EXPECT_EQ(allowed_contacts.size(), 0u);
|
||||
}
|
||||
|
||||
TEST_F(NearbyShareSettingsTest, GetAndSetAutoAppStartEnabled) {
|
||||
bool is_auto_app_start_enabled = settings()->GetAutoAppStartEnabled();
|
||||
EXPECT_TRUE(is_auto_app_start_enabled);
|
||||
|
||||
settings()->SetAutoAppStartEnabled(false);
|
||||
Flush();
|
||||
is_auto_app_start_enabled = settings()->GetAutoAppStartEnabled();
|
||||
EXPECT_FALSE(is_auto_app_start_enabled);
|
||||
}
|
||||
|
||||
TEST_F(NearbyShareSettingsTest, SendDesktopNotification) {
|
||||
settings()->SendDesktopNotification(
|
||||
DesktopNotification::DESKTOP_NOTIFICATION_UNKNOWN);
|
||||
|
||||
Reference in New Issue
Block a user