remove obsolete analytics functions

PiperOrigin-RevId: 647404733
This commit is contained in:
Anay Wadhera
2024-06-27 12:18:10 -07:00
committed by Copybara-Service
parent 32cee3439b
commit 1f5654089f
5 changed files with 0 additions and 97 deletions
-29
View File
@@ -990,35 +990,6 @@ void AnalyticsRecorder::NewVerifyAPKStatus(
LogEvent(*sharing_log);
}
void AnalyticsRecorder::NewSendDesktopNotification(DesktopNotification event) {
std::unique_ptr<SharingLog> sharing_log = CreateSharingLog(
EventCategory::SETTINGS_EVENT, EventType::SEND_DESKTOP_NOTIFICATION);
auto send_desktop_notification =
analytics::proto::SharingLog::SendDesktopNotification::default_instance()
.New();
send_desktop_notification->set_event(event);
sharing_log->set_allocated_send_desktop_notification(
send_desktop_notification);
LogEvent(*sharing_log);
}
void AnalyticsRecorder::NewSendDesktopTransferEvent(
DesktopTransferEventType event) {
std::unique_ptr<SharingLog> sharing_log = CreateSharingLog(
EventCategory::SETTINGS_EVENT, EventType::SEND_DESKTOP_TRANSFER_EVENT);
auto send_desktop_transfer_event =
analytics::proto::SharingLog::SendDesktopTransferEvent::default_instance()
.New();
send_desktop_transfer_event->set_event(event);
sharing_log->set_allocated_send_desktop_transfer_event(
send_desktop_transfer_event);
LogEvent(*sharing_log);
}
// Start private methods.
std::unique_ptr<SharingLog> AnalyticsRecorder::CreateSharingLog(
-6
View File
@@ -194,12 +194,6 @@ class AnalyticsRecorder {
location::nearby::proto::sharing::VerifyAPKStatus status,
location::nearby::proto::sharing::ApkSource source);
void NewSendDesktopNotification(
location::nearby::proto::sharing::DesktopNotification event);
void NewSendDesktopTransferEvent(
location::nearby::proto::sharing::DesktopTransferEventType event);
// Generates a random number for session ID or flow ID.
int64_t GenerateNextId();
-14
View File
@@ -574,20 +574,6 @@ void NearbyShareSettings::SetIsAllContactsEnabled(
}
}
void NearbyShareSettings::SendDesktopNotification(
DesktopNotification event) const {
if (analytics_recorder_ != nullptr) {
analytics_recorder_->NewSendDesktopNotification(event);
}
}
void NearbyShareSettings::SendDesktopTransferEvent(
DesktopTransferEventType event) const {
if (analytics_recorder_ != nullptr) {
analytics_recorder_->NewSendDesktopTransferEvent(event);
}
}
bool NearbyShareSettings::is_fast_initiation_hardware_supported() {
MutexLock lock(&mutex_);
return is_fast_initiation_hardware_supported_;
-6
View File
@@ -234,12 +234,6 @@ class NearbyShareSettings
bool did_full_name_change,
bool did_icon_url_change) override;
void SendDesktopNotification(
::location::nearby::proto::sharing::DesktopNotification event) const;
void SendDesktopTransferEvent(
::location::nearby::proto::sharing::DesktopTransferEventType event) const;
std::string Dump() const;
private:
-42
View File
@@ -517,48 +517,6 @@ TEST_F(NearbyShareSettingsTest, GetAndSetAllowedContacts) {
EXPECT_EQ(allowed_contacts.size(), 0u);
}
TEST_F(NearbyShareSettingsTest, SendDesktopNotification) {
settings()->SendDesktopNotification(
DesktopNotification::DESKTOP_NOTIFICATION_UNKNOWN);
settings()->SendDesktopNotification(
DesktopNotification::DESKTOP_NOTIFICATION_CONNECTING);
settings()->SendDesktopNotification(
DesktopNotification::DESKTOP_NOTIFICATION_PROGRESS);
settings()->SendDesktopNotification(
DesktopNotification::DESKTOP_NOTIFICATION_ACCEPT);
settings()->SendDesktopNotification(
DesktopNotification::DESKTOP_NOTIFICATION_RECEIVED);
settings()->SendDesktopNotification(
DesktopNotification::DESKTOP_NOTIFICATION_ERROR);
}
TEST_F(NearbyShareSettingsTest, ReceiveDesktopTransferEvent) {
settings()->SendDesktopTransferEvent(
DesktopTransferEventType::DESKTOP_TRANSFER_EVENT_TYPE_UNKNOWN);
settings()->SendDesktopTransferEvent(
DesktopTransferEventType::DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_ACCEPT);
settings()->SendDesktopTransferEvent(
DesktopTransferEventType::DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_PROGRESS);
settings()->SendDesktopTransferEvent(
DesktopTransferEventType::DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_RECEIVED);
settings()->SendDesktopTransferEvent(
DesktopTransferEventType::DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_ERROR);
}
TEST_F(NearbyShareSettingsTest, SendDesktopTransferEvent) {
settings()->SendDesktopTransferEvent(
DesktopTransferEventType::DESKTOP_TRANSFER_EVENT_TYPE_UNKNOWN);
settings()->SendDesktopTransferEvent(
DesktopTransferEventType::DESKTOP_TRANSFER_EVENT_SEND_TYPE_START);
settings()->SendDesktopTransferEvent(
DesktopTransferEventType::
DESKTOP_TRANSFER_EVENT_SEND_TYPE_SELECT_A_DEVICE);
settings()->SendDesktopTransferEvent(
DesktopTransferEventType::DESKTOP_TRANSFER_EVENT_SEND_TYPE_PROGRESS);
settings()->SendDesktopTransferEvent(
DesktopTransferEventType::DESKTOP_TRANSFER_EVENT_SEND_TYPE_SENT);
}
} // namespace
} // namespace sharing
} // namespace nearby