Merge pull request #16723 from brave/android_open_download_option_fix

[Android] Fix for 'Automatically open when possible' option
This commit is contained in:
samartnik
2023-01-19 11:01:39 -05:00
committed by GitHub
5 changed files with 63 additions and 4 deletions
@@ -1,16 +0,0 @@
/* Copyright (c) 2020 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.chromium.chrome.browser.download;
import org.chromium.base.BravePreferenceKeys;
import org.chromium.base.ContextUtils;
public class BraveMimeUtils {
public static boolean canAutoOpenMimeType(String mimeType) {
return ContextUtils.getAppSharedPreferences().getBoolean(
BravePreferenceKeys.BRAVE_DOWNLOADS_AUTOMATICALLY_OPEN_WHEN_POSSIBLE, true);
}
}