Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
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
Original file line number Diff line number Diff line change
Expand Up @@ -567,5 +567,15 @@ public void setDebugLoggingEnabled(boolean isEnabled) {
editor.putBoolean(mContext.getString(R.string.settings_key_debug_logging), isEnabled);
editor.commit();
}

public boolean isAutoplayEnabled() {
return mPrefs.getBoolean(mContext.getString(R.string.settings_key_autoplay), AUTOPLAY_ENABLED);
}

public void setAutoplayEnabled(boolean isEnabled) {
SharedPreferences.Editor editor = mPrefs.edit();
editor.putBoolean(mContext.getString(R.string.settings_key_autoplay), isEnabled);
editor.commit();
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public void setContext(Context context, Bundle aExtras) {
runtimeSettingsBuilder.displayDpiOverride(SettingsStore.getInstance(context).getDisplayDpi());
runtimeSettingsBuilder.screenSizeOverride(SettingsStore.getInstance(context).getMaxWindowWidth(),
SettingsStore.getInstance(context).getMaxWindowHeight());
runtimeSettingsBuilder.autoplayDefault(SettingsStore.getInstance(mContext).isAutoplayEnabled() ? GeckoRuntimeSettings.AUTOPLAY_DEFAULT_ALLOWED : GeckoRuntimeSettings.AUTOPLAY_DEFAULT_BLOCKED);

if (SettingsStore.getInstance(context).getTransparentBorderWidth() > 0) {
runtimeSettingsBuilder.useMaxScreenDepth(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ private void setAutoplay(boolean value, boolean doApply) {

if (doApply) {
SessionStore.get().setAutoplayEnabled(value);
SettingsStore.getInstance(getContext()).setAutoplayEnabled(value);
}
}

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/non_L10n.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<string name="settings_key_browser_world_height" translatable="false">settings_browser_world_height</string>
<string name="settings_key_notifications" translatable="false">settings_key_notifications</string>
<string name="settings_key_debug_logging" translatable="false">settings_key_debug_logging</string>
<string name="settings_key_autoplay" translatable="false">settings_key_autoplay</string>
<string name="environment_override_help_url" translatable="false">https://github.com/MozillaReality/FirefoxReality/wiki/Environments</string>
<string name="private_policy_url" translatable="false">https://www.mozilla.org/privacy/firefox/</string>
<string name="private_report_url" translatable="false">https://mixedreality.mozilla.org/fxr/report?src=browser-fxr&amp;label=browser-firefox-reality&amp;url=%1$s</string>
Expand Down