Bug 1888263 - Disable Firefox launch on login for MSIX builds r=nrishel,settings-reviewers,mconley,omc-reviewers,aminomancer

Differential Revision: https://phabricator.services.mozilla.com/D207595
This commit is contained in:
Nipun Shukla
2024-04-23 14:08:52 +00:00
parent e8912d2d24
commit 87498965b0
6 changed files with 54 additions and 9 deletions

View File

@@ -847,6 +847,19 @@ const TargetingGetters = {
return lazy.WindowsLaunchOnLogin.getLaunchOnLoginEnabled();
},
get isMSIX() {
if (AppConstants.platform !== "win") {
return false;
}
// While we can write registry keys using external programs, we have no
// way of cleanup on uninstall. If we are on an MSIX build
// launch on login should never be enabled.
// Default to false so that the feature isn't unnecessarily
// disabled.
// See Bug 1888263.
return Services.sysinfo.getProperty("hasWinPackageId", false);
},
/**
* Is this invocation running in background task mode?
*

View File

@@ -987,7 +987,7 @@ const BASE_MESSAGES = () => [
targeting: `source == 'newtab'
&& 'browser.startup.windowsLaunchOnLogin.disableLaunchOnLoginPrompt'|preferenceValue == false
&& 'browser.startup.windowsLaunchOnLogin.enabled'|preferenceValue == true && isDefaultBrowser && !activeNotifications
&& !launchOnLoginEnabled`,
&& !launchOnLoginEnabled && !isMSIX`,
},
{
id: "INFOBAR_LAUNCH_ON_LOGIN_FINAL",
@@ -1055,7 +1055,7 @@ const BASE_MESSAGES = () => [
&& messageImpressions.INFOBAR_LAUNCH_ON_LOGIN[messageImpressions.INFOBAR_LAUNCH_ON_LOGIN | length - 1]
&& messageImpressions.INFOBAR_LAUNCH_ON_LOGIN[messageImpressions.INFOBAR_LAUNCH_ON_LOGIN | length - 1] <
currentDate|date - ${FOURTEEN_DAYS_IN_MS}
&& !launchOnLoginEnabled`,
&& !launchOnLoginEnabled && !isMSIX`,
},
{
id: "FOX_DOODLE_SET_DEFAULT",