From 94ee9519175c223c0e4de1886df5db7d2911cb1d Mon Sep 17 00:00:00 2001 From: Heiko <61519853+htcfreek@users.noreply.github.com> Date: Mon, 22 Jan 2024 17:50:01 +0100 Subject: [PATCH] [Dev]Remove prepared code for "Auto update" policy (#31064) * Update PowerToys.admx * Update PowerToys.adml * Update UpdateUtils.cpp * Update gpo.h * Update ReportGPOValues.cpp --- src/common/utils/gpo.h | 6 ------ src/gpo/assets/PowerToys.admx | 12 ------------ src/gpo/assets/en-US/PowerToys.adml | 7 ------- src/runner/UpdateUtils.cpp | 8 -------- .../BugReportTool/BugReportTool/ReportGPOValues.cpp | 2 -- 5 files changed, 35 deletions(-) diff --git a/src/common/utils/gpo.h b/src/common/utils/gpo.h index 66fe34a10a..d1ded85f64 100644 --- a/src/common/utils/gpo.h +++ b/src/common/utils/gpo.h @@ -65,7 +65,6 @@ namespace powertoys_gpo { const std::wstring POLICY_DISABLE_AUTOMATIC_UPDATE_DOWNLOAD = L"AutomaticUpdateDownloadDisabled"; const std::wstring POLICY_SUSPEND_NEW_UPDATE_TOAST = L"SuspendNewUpdateAvailableToast"; const std::wstring POLICY_DISABLE_NEW_UPDATE_TOAST = L"DisableNewUpdateAvailableToast"; - const std::wstring POLICY_DISABLE_PERIODIC_UPDATE_CHECK = L"PeriodicUpdateCheckDisabled"; const std::wstring POLICY_DISABLE_SHOW_WHATS_NEW_AFTER_UPDATES = L"DoNotShowWhatsNewAfterUpdates"; // The registry value names for other PowerToys policies. @@ -412,11 +411,6 @@ namespace powertoys_gpo { return getConfiguredValue(POLICY_DISABLE_NEW_UPDATE_TOAST); } - inline gpo_rule_configured_t getDisablePeriodicUpdateCheckValue() - { - return getConfiguredValue(POLICY_DISABLE_PERIODIC_UPDATE_CHECK); - } - inline gpo_rule_configured_t getDisableShowWhatsNewAfterUpdatesValue() { return getConfiguredValue(POLICY_DISABLE_SHOW_WHATS_NEW_AFTER_UPDATES); diff --git a/src/gpo/assets/PowerToys.admx b/src/gpo/assets/PowerToys.admx index 06757271a0..fef8e1021d 100644 --- a/src/gpo/assets/PowerToys.admx +++ b/src/gpo/assets/PowerToys.admx @@ -451,18 +451,6 @@ - diff --git a/src/gpo/assets/en-US/PowerToys.adml b/src/gpo/assets/en-US/PowerToys.adml index 0fb97927af..53d5eca86c 100644 --- a/src/gpo/assets/en-US/PowerToys.adml +++ b/src/gpo/assets/en-US/PowerToys.adml @@ -80,12 +80,6 @@ This policy has no effect if the update notification is disabled by the policy " If enabled, the notification is disabled. If disabled or not configured, the user can control if the notification is shown or not. - - This policy allows you to disable automatic update checks running in the background. (The manual check in PT Settings is not affected by this policy.) - -If enabled, the automatic update checks are disabled. - -If disabled or not configured, the automatic update checks are enabled. This policy allows you to configure if the window with the release notes is shown after updates. @@ -165,7 +159,6 @@ Note: Changes require a restart of PowerToys Run. Do not show the release notes after updates Suspend Action Center notification for new updates Disable Action Center notification for new updates - Disable automatic update checks Allow Experimentation Configure enabled state for all plugins Configure enabled state for individual plugins diff --git a/src/runner/UpdateUtils.cpp b/src/runner/UpdateUtils.cpp index c2297e630d..4558b37cb3 100644 --- a/src/runner/UpdateUtils.cpp +++ b/src/runner/UpdateUtils.cpp @@ -200,14 +200,6 @@ void ProcessNewVersionInfo(const github_version_info& version_info, void PeriodicUpdateWorker() { - // Check if periodic update check is disabled by GPO. - // This policy code is implemented but not active. It is for later usage in PT version after 1.0 release. - //if (powertoys_gpo::getDisablePeriodicUpdateCheckValue() == powertoys_gpo::gpo_rule_configured_enabled) - //{ - // Logger::info(L"Initialization of periodic update checks stopped. Periodic update checks are disabled by GPO."); - // return; - //} - for (;;) { auto state = UpdateState::read(); diff --git a/tools/BugReportTool/BugReportTool/ReportGPOValues.cpp b/tools/BugReportTool/BugReportTool/ReportGPOValues.cpp index 5ca46b1b26..8209a28de4 100644 --- a/tools/BugReportTool/BugReportTool/ReportGPOValues.cpp +++ b/tools/BugReportTool/BugReportTool/ReportGPOValues.cpp @@ -62,9 +62,7 @@ void ReportGPOValues(const std::filesystem::path& tmpDir) report << "getConfiguredVideoConferenceMuteEnabledValue: " << gpo_rule_configured_to_string(powertoys_gpo::getConfiguredVideoConferenceMuteEnabledValue()) << std::endl; report << "getDisableAutomaticUpdateDownloadValue: " << gpo_rule_configured_to_string(powertoys_gpo::getDisableAutomaticUpdateDownloadValue()) << std::endl; report << "getSuspendNewUpdateToastValue: " << gpo_rule_configured_to_string(powertoys_gpo::getSuspendNewUpdateToastValue()) << std::endl; - report << "getDisablePeriodicUpdateCheckValue: " << gpo_rule_configured_to_string(powertoys_gpo::getDisablePeriodicUpdateCheckValue()) << std::endl; report << "getAllowExperimentationValue: " << gpo_rule_configured_to_string(powertoys_gpo::getAllowExperimentationValue()) << std::endl; report << "getConfiguredQoiPreviewEnabledValue: " << gpo_rule_configured_to_string(powertoys_gpo::getConfiguredQoiPreviewEnabledValue()) << std::endl; report << "getConfiguredQoiThumbnailsEnabledValue: " << gpo_rule_configured_to_string(powertoys_gpo::getConfiguredQoiThumbnailsEnabledValue()) << std::endl; - }