Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove prepared code for "Auto update" policy #31064

Merged
merged 5 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/common/utils/gpo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
Expand Down
12 changes: 0 additions & 12 deletions src/gpo/assets/PowerToys.admx
Original file line number Diff line number Diff line change
Expand Up @@ -451,18 +451,6 @@
<decimal value="0" />
</disabledValue>
</policy>
<!-- This policy is implemented for later usage (PT v1.0 and later) and therefore inactive. (To make it working please update `src/runner/UpdateUtils.cpp`)
<policy name="DisablePeriodicUpdateCheck" class="Both" displayName="$(string.DisablePeriodicUpdateCheck)" explainText="$(string.DisablePeriodicUpdateCheckDescription)" key="Software\Policies\PowerToys" valueName="PeriodicUpdateCheckDisabled">
<parentCategory ref="InstallerUpdates" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_68_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
-->
<policy name="DoNotShowWhatsNewAfterUpdates" class="Both" displayName="$(string.DoNotShowWhatsNewAfterUpdates)" explainText="$(string.DoNotShowWhatsNewAfterUpdatesDescription)" key="Software\Policies\PowerToys" valueName="DoNotShowWhatsNewAfterUpdates">
<parentCategory ref="InstallerUpdates" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_78_0" />
Expand Down
7 changes: 0 additions & 7 deletions src/gpo/assets/en-US/PowerToys.adml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</string>
<string id="DisablePeriodicUpdateCheckDescription">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.
</string>
<string id="DoNotShowWhatsNewAfterUpdatesDescription">This policy allows you to configure if the window with the release notes is shown after updates.

Expand Down Expand Up @@ -165,7 +159,6 @@ Note: Changes require a restart of PowerToys Run.
<string id="DoNotShowWhatsNewAfterUpdates">Do not show the release notes after updates</string>
<string id="SuspendNewUpdateToast">Suspend Action Center notification for new updates</string>
<string id="DisableNewUpdateToast">Disable Action Center notification for new updates</string>
<string id="DisablePeriodicUpdateCheck">Disable automatic update checks</string>
<string id="AllowExperimentation">Allow Experimentation</string>
<string id="PowerToysRunAllPluginsEnabledState">Configure enabled state for all plugins</string>
<string id="PowerToysRunIndividualPluginEnabledState">Configure enabled state for individual plugins</string>
Expand Down
8 changes: 0 additions & 8 deletions src/runner/UpdateUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 0 additions & 2 deletions tools/BugReportTool/BugReportTool/ReportGPOValues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}
Loading