Skip to content

Commit

Permalink
Fix IPFS gateway Android setting (#18042) (Uplift to 1.51.x) (#18450)
Browse files Browse the repository at this point in the history
Fix IPFS gateway Android setting (#18042)

Resolves brave/brave-browser#29647

Co-authored-by: cypt4 <[email protected]>
  • Loading branch information
deeppandya and cypt4 authored May 15, 2023
1 parent 7e844ab commit dbe5115
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
2 changes: 2 additions & 0 deletions android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static boolean getIPFSGatewayPref() {
if (BraveConfig.IPFS_ENABLED) {
return UserPrefs.get(Profile.getLastUsedRegularProfile())
.getInteger(BravePref.IPFS_RESOLVE_METHOD)
== IPFSResolveMethodTypes.IPFS_ASK;
!= IPFSResolveMethodTypes.IPFS_DISABLED;
} else {
return false;
}
Expand Down
16 changes: 1 addition & 15 deletions build/android/java/templates/BraveConfig.template
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit dbe5115

Please sign in to comment.