Fix IPFS gateway Android setting (#18042)

Resolves brave/brave-browser#29647
This commit is contained in:
cypt4
2023-04-20 15:06:15 +07:00
committed by GitHub
parent 6b8904a428
commit 5be6f7eea1
3 changed files with 4 additions and 16 deletions
+2
View File
@@ -3,6 +3,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at https://mozilla.org/MPL/2.0/.
import("//brave/components/ipfs/buildflags/buildflags.gni")
import("//brave/components/p3a/buildflags.gni")
import("//build/config/android/rules.gni")
@@ -23,5 +24,6 @@ java_cpp_template("brave_config_java") {
defines = [
"BRAVE_ANDROID_DEVELOPER_OPTIONS_CODE=\"$brave_android_developer_options_code\"",
"BRAVE_ANDROID_P3A_ENABLED=$brave_p3a_enabled",
"BRAVE_ANDROID_ENABLE_IPFS=$enable_ipfs",
]
}
@@ -24,7 +24,7 @@ public class BravePrivacySettingsIPFSUtils {
if (BraveConfig.IPFS_ENABLED) {
return UserPrefs.get(Profile.getLastUsedRegularProfile())
.getInteger(BravePref.IPFS_RESOLVE_METHOD)
== IPFSResolveMethodTypes.IPFS_ASK;
!= IPFSResolveMethodTypes.IPFS_DISABLED;
} else {
return false;
}
@@ -9,21 +9,7 @@ package org.chromium.chrome.browser;
* Brave configuration.
*/
public class BraveConfig {
#if defined(BRAVE_ANDROID_DEVELOPER_OPTIONS_CODE)
public static final String DEVELOPER_OPTIONS_CODE = BRAVE_ANDROID_DEVELOPER_OPTIONS_CODE;
#else
public static final String DEVELOPER_OPTIONS_CODE = "";
#endif
#if defined(BRAVE_ANDROID_P3A_ENABLED)
public static final boolean P3A_ENABLED = BRAVE_ANDROID_P3A_ENABLED;
#else
public static final boolean P3A_ENABLED = false;
#endif
#if defined(ENABLE_IPFS)
public static final boolean IPFS_ENABLED = ENABLE_IPFS;
#else
public static final boolean IPFS_ENABLED = false;
#endif
public static final boolean IPFS_ENABLED = BRAVE_ANDROID_ENABLE_IPFS;
}