Created
August 16, 2018 17:48
-
-
Save mstange/1a335b477254ae079cd21bd57f3e55f1 to your computer and use it in GitHub Desktop.
Patch to focus that makes it use a recent GeckoView from mozilla-central
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/build.gradle b/app/build.gradle | |
index f3c9954f..fd84f565 100644 | |
--- a/app/build.gradle | |
+++ b/app/build.gradle | |
@@ -144,17 +144,17 @@ repositories { | |
// Remember the version of the artifacts. In the example above that's: 61.0.20180611134439 | |
// ARM GeckoView builds | |
- url "https://index.taskcluster.net/v1/task/gecko.v2.mozilla-beta.revision" + | |
+ url "https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.revision" + | |
".${geckoview_revision}.mobile.android-api-16-opt/artifacts/public/android/maven" | |
} | |
maven { | |
// x86 GeckoView builds | |
- url "https://index.taskcluster.net/v1/task/gecko.v2.mozilla-beta.revision" + | |
+ url "https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.revision" + | |
".${geckoview_revision}.mobile.android-x86-opt/artifacts/public/android/maven" | |
} | |
maven { | |
// aarch64 builds | |
- url "https://index.taskcluster.net/v1/task/gecko.v2.mozilla-beta.revision" + | |
+ url "https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.revision" + | |
".${geckoview_revision}.mobile.android-aarch64-opt/artifacts/public/android/maven" | |
} | |
} | |
@@ -190,9 +190,9 @@ dependencies { | |
focusImplementation 'com.adjust.sdk:adjust-android:4.11.4' | |
focusImplementation 'com.android.installreferrer:installreferrer:1.0' // Required by Adjust | |
- armImplementation "org.mozilla:geckoview-beta-armeabi-v7a:${geckoview_version}" | |
- x86Implementation "org.mozilla:geckoview-beta-x86:${geckoview_version}" | |
- aarch64Implementation "org.mozilla:geckoview-beta-arm64-v8a:${geckoview_version}" | |
+ armImplementation "org.mozilla:geckoview-default-armeabi-v7a:${geckoview_version}" | |
+ x86Implementation "org.mozilla:geckoview-default-x86:${geckoview_version}" | |
+ aarch64Implementation "org.mozilla:geckoview-default-arm64-v8a:${geckoview_version}" | |
testImplementation 'junit:junit:4.12' | |
testImplementation "org.robolectric:robolectric:4.0-alpha-3" // required to support api level 28 | |
diff --git a/app/src/main/java/org/mozilla/focus/web/GeckoWebViewProvider.kt b/app/src/main/java/org/mozilla/focus/web/GeckoWebViewProvider.kt | |
index b4d3f3e3..b2bfecea 100644 | |
--- a/app/src/main/java/org/mozilla/focus/web/GeckoWebViewProvider.kt | |
+++ b/app/src/main/java/org/mozilla/focus/web/GeckoWebViewProvider.kt | |
@@ -442,6 +442,10 @@ class GeckoWebViewProvider : IWebViewProvider { | |
throw IllegalStateException() | |
} | |
+ override fun onLoadError(session: GeckoSession?, uri: String?, category: Int, error: Int) { | |
+ // TODO("not implemented") | |
+ } | |
+ | |
override fun onLocationChange(session: GeckoSession, url: String) { | |
var desiredUrl = url | |
// Save internal data: urls we should override to present focus:about, focus:rights | |
@@ -574,7 +578,7 @@ class GeckoWebViewProvider : IWebViewProvider { | |
encoding: String, | |
historyURL: String | |
) { | |
- geckoSession.loadData(data.toByteArray(Charsets.UTF_8), mimeType, baseURL) | |
+ geckoSession.loadData(data.toByteArray(Charsets.UTF_8), mimeType) | |
currentUrl = baseURL | |
isLoadingInternalUrl = currentUrl == LocalizedContent.URL_RIGHTS || currentUrl == | |
LocalizedContent.URL_ABOUT | |
diff --git a/build.gradle b/build.gradle | |
index f73927a2..e35a4744 100644 | |
--- a/build.gradle | |
+++ b/build.gradle | |
@@ -5,8 +5,8 @@ buildscript { | |
ext.support_libraries_version = '28.0.0-beta01' | |
ext.espresso_version = '3.0.1' | |
ext.kotlin_version = '1.2.60' | |
- ext.geckoview_revision = '31a3bae15c00308fc30cd4b5e7bd01c37b23f33f' | |
- ext.geckoview_version = '62.0.20180813190114' // 62.0b17 | |
+ ext.geckoview_revision = '161817e6d127e4a1fdc0ba9f041c709e09096dcb' | |
+ ext.geckoview_version = '63.0.20180816092515' // 62.0b17 | |
ext.spotbugs_version = '3.1.2' | |
ext.mozilla_components_version = '0.17' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment