Loading build.gradle +13 −13 Original line number Diff line number Diff line Loading @@ -9,30 +9,30 @@ buildscript { ext.safeParcelVersion = '1.7.0' ext.wearableVersion = '0.1.1' ext.kotlinVersion = '1.6.10' ext.coroutineVersion = '1.5.2' ext.kotlinVersion = '1.7.10' ext.coroutineVersion = '1.6.4' ext.annotationVersion = '1.3.0' ext.appcompatVersion = '1.4.1' ext.appcompatVersion = '1.4.2' ext.biometricVersion = '1.1.0' ext.coreVersion = '1.7.0' ext.fragmentVersion = '1.4.0' ext.lifecycleVersion = '2.4.0' ext.coreVersion = '1.8.0' ext.fragmentVersion = '1.5.1' ext.lifecycleVersion = '2.5.1' ext.loaderVersion = '1.1.0' ext.mediarouterVersion = '1.2.5' ext.mediarouterVersion = '1.3.1' ext.multidexVersion = '2.0.1' ext.navigationVersion = '2.3.5' ext.preferenceVersion = '1.1.1' ext.navigationVersion = '2.5.1' ext.preferenceVersion = '1.2.0' ext.recyclerviewVersion = '1.2.0' ext.webkitVersion = '1.4.0' ext.slf4jVersion = '1.7.25' ext.slf4jVersion = '1.7.36' ext.volleyVersion = '1.2.1' ext.wireVersion = '3.2.2' ext.wireVersion = '4.4.1' ext.androidBuildGradleVersion = '7.0.4' ext.androidBuildGradleVersion = '7.2.1' ext.androidBuildVersionTools = '30.0.2' ext.androidBuildVersionTools = '33.0.0' ext.androidMinSdk = 14 ext.androidTargetSdk = 29 Loading firebase-auth-core/src/main/kotlin/org/microg/gms/firebase/auth/ReCaptchaActivity.kt +10 −8 Original line number Diff line number Diff line Loading @@ -33,12 +33,12 @@ class ReCaptchaActivity : AppCompatActivity() { get() = intent.getStringExtra(EXTRA_HOSTNAME) ?: "localhost:5000" private var finished = false @SuppressLint("SetJavaScriptEnabled", "AddJavascriptInterface") override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) openWebsite() } @SuppressLint("SetJavaScriptEnabled", "AddJavascriptInterface") private fun openWebsite() { val apiKey = intent.getStringExtra(EXTRA_API_KEY) ?: return finishResult(Activity.RESULT_CANCELED) setContentView(R.layout.activity_recaptcha) Loading @@ -51,13 +51,7 @@ class ReCaptchaActivity : AppCompatActivity() { settings.cacheMode = WebSettings.LOAD_NO_CACHE ProfileManager.ensureInitialized(this) settings.userAgentString = Build.generateWebViewUserAgentString(settings.userAgentString) view.addJavascriptInterface(object : Any() { @JavascriptInterface fun onReCaptchaToken(token: String) { Log.d(TAG, "onReCaptchaToken: $token") finishResult(Activity.RESULT_OK, token) } }, "MyCallback") view.addJavascriptInterface(ReCaptchaCallback(this), "MyCallback") val captcha = assets.open("recaptcha.html").bufferedReader().readText().replace("%apikey%", apiKey) view.loadDataWithBaseURL("https://$hostname/", captcha, null, null, "https://$hostname/") } Loading @@ -80,6 +74,14 @@ class ReCaptchaActivity : AppCompatActivity() { const val EXTRA_HOSTNAME = "hostname" const val EXTRA_RESULT_RECEIVER = "receiver" class ReCaptchaCallback(val activity: ReCaptchaActivity) { @JavascriptInterface fun onReCaptchaToken(token: String) { Log.d(TAG, "onReCaptchaToken: $token") activity.finishResult(Activity.RESULT_OK, token) } } fun isSupported(context: Context): Boolean = true suspend fun awaitToken(context: Context, apiKey: String, hostname: String? = null) = suspendCoroutine<String> { continuation -> Loading firebase-auth-core/src/main/kotlin/org/microg/gms/firebase/auth/ReCaptchaOverlay.kt +16 −11 Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ package org.microg.gms.firebase.auth import android.annotation.SuppressLint import android.app.Activity import android.content.Context import android.graphics.PixelFormat import android.provider.Settings Loading Loading @@ -32,6 +34,7 @@ class ReCaptchaOverlay(val context: Context, val apiKey: String, val hostname: S var finished = false var container: View? = null @SuppressLint("SetJavaScriptEnabled", "AddJavascriptInterface") private fun show() { val layoutParamsType = if (android.os.Build.VERSION.SDK_INT >= 26) { WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY Loading Loading @@ -83,17 +86,7 @@ class ReCaptchaOverlay(val context: Context, val apiKey: String, val hostname: S settings.cacheMode = WebSettings.LOAD_NO_CACHE ProfileManager.ensureInitialized(context) settings.userAgentString = Build.generateWebViewUserAgentString(settings.userAgentString) view.addJavascriptInterface(object : Any() { @JavascriptInterface fun onReCaptchaToken(token: String) { Log.d(TAG, "onReCaptchaToken: $token") if (!finished) { finished = true continuation.resume(token) } close() } }, "MyCallback") view.addJavascriptInterface(ReCaptchaCallback(this), "MyCallback") val captcha = context.assets.open("recaptcha.html").bufferedReader().readText().replace("%apikey%", apiKey) view.loadDataWithBaseURL("https://$hostname/", captcha, null, null, "https://$hostname/") windowManager.addView(container, params) Loading @@ -113,6 +106,18 @@ class ReCaptchaOverlay(val context: Context, val apiKey: String, val hostname: S } companion object { class ReCaptchaCallback(val overlay: ReCaptchaOverlay) { @JavascriptInterface fun onReCaptchaToken(token: String) { Log.d(TAG, "onReCaptchaToken: $token") if (!overlay.finished) { overlay.finished = true overlay.continuation.resume(token) } overlay.close() } } fun isSupported(context: Context): Boolean = android.os.Build.VERSION.SDK_INT < 23 || Settings.canDrawOverlays(context) suspend fun awaitToken(context: Context, apiKey: String, hostname: String? = null) = suspendCoroutine<String> { continuation -> Loading firebase-dynamic-links-api/gradle.propertiesdeleted 100644 → 0 +0 −34 Original line number Diff line number Diff line # # Copyright 2019 e Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # POM_NAME=Firebase Dynamic Links API POM_DESCRIPTION=Interfaces and objects for IPC between Firebase Library and microG POM_PACKAGING=aar POM_URL=https://github.com/microg/android_external_GmsApi POM_SCM_URL=https://github.com/microg/android_external_GmsApi POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git POM_LICENCE_NAME=The Apache Software License, Version 2.0 POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt POM_LICENCE_DIST=repo POM_DEVELOPER_ID=alexandruchircu POM_DEVELOPER_NAME=Alexandru Chircu gradle.properties +1 −0 Original line number Diff line number Diff line android.useAndroidX=true android.disableAutomaticComponentCreation=true Loading
build.gradle +13 −13 Original line number Diff line number Diff line Loading @@ -9,30 +9,30 @@ buildscript { ext.safeParcelVersion = '1.7.0' ext.wearableVersion = '0.1.1' ext.kotlinVersion = '1.6.10' ext.coroutineVersion = '1.5.2' ext.kotlinVersion = '1.7.10' ext.coroutineVersion = '1.6.4' ext.annotationVersion = '1.3.0' ext.appcompatVersion = '1.4.1' ext.appcompatVersion = '1.4.2' ext.biometricVersion = '1.1.0' ext.coreVersion = '1.7.0' ext.fragmentVersion = '1.4.0' ext.lifecycleVersion = '2.4.0' ext.coreVersion = '1.8.0' ext.fragmentVersion = '1.5.1' ext.lifecycleVersion = '2.5.1' ext.loaderVersion = '1.1.0' ext.mediarouterVersion = '1.2.5' ext.mediarouterVersion = '1.3.1' ext.multidexVersion = '2.0.1' ext.navigationVersion = '2.3.5' ext.preferenceVersion = '1.1.1' ext.navigationVersion = '2.5.1' ext.preferenceVersion = '1.2.0' ext.recyclerviewVersion = '1.2.0' ext.webkitVersion = '1.4.0' ext.slf4jVersion = '1.7.25' ext.slf4jVersion = '1.7.36' ext.volleyVersion = '1.2.1' ext.wireVersion = '3.2.2' ext.wireVersion = '4.4.1' ext.androidBuildGradleVersion = '7.0.4' ext.androidBuildGradleVersion = '7.2.1' ext.androidBuildVersionTools = '30.0.2' ext.androidBuildVersionTools = '33.0.0' ext.androidMinSdk = 14 ext.androidTargetSdk = 29 Loading
firebase-auth-core/src/main/kotlin/org/microg/gms/firebase/auth/ReCaptchaActivity.kt +10 −8 Original line number Diff line number Diff line Loading @@ -33,12 +33,12 @@ class ReCaptchaActivity : AppCompatActivity() { get() = intent.getStringExtra(EXTRA_HOSTNAME) ?: "localhost:5000" private var finished = false @SuppressLint("SetJavaScriptEnabled", "AddJavascriptInterface") override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) openWebsite() } @SuppressLint("SetJavaScriptEnabled", "AddJavascriptInterface") private fun openWebsite() { val apiKey = intent.getStringExtra(EXTRA_API_KEY) ?: return finishResult(Activity.RESULT_CANCELED) setContentView(R.layout.activity_recaptcha) Loading @@ -51,13 +51,7 @@ class ReCaptchaActivity : AppCompatActivity() { settings.cacheMode = WebSettings.LOAD_NO_CACHE ProfileManager.ensureInitialized(this) settings.userAgentString = Build.generateWebViewUserAgentString(settings.userAgentString) view.addJavascriptInterface(object : Any() { @JavascriptInterface fun onReCaptchaToken(token: String) { Log.d(TAG, "onReCaptchaToken: $token") finishResult(Activity.RESULT_OK, token) } }, "MyCallback") view.addJavascriptInterface(ReCaptchaCallback(this), "MyCallback") val captcha = assets.open("recaptcha.html").bufferedReader().readText().replace("%apikey%", apiKey) view.loadDataWithBaseURL("https://$hostname/", captcha, null, null, "https://$hostname/") } Loading @@ -80,6 +74,14 @@ class ReCaptchaActivity : AppCompatActivity() { const val EXTRA_HOSTNAME = "hostname" const val EXTRA_RESULT_RECEIVER = "receiver" class ReCaptchaCallback(val activity: ReCaptchaActivity) { @JavascriptInterface fun onReCaptchaToken(token: String) { Log.d(TAG, "onReCaptchaToken: $token") activity.finishResult(Activity.RESULT_OK, token) } } fun isSupported(context: Context): Boolean = true suspend fun awaitToken(context: Context, apiKey: String, hostname: String? = null) = suspendCoroutine<String> { continuation -> Loading
firebase-auth-core/src/main/kotlin/org/microg/gms/firebase/auth/ReCaptchaOverlay.kt +16 −11 Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ package org.microg.gms.firebase.auth import android.annotation.SuppressLint import android.app.Activity import android.content.Context import android.graphics.PixelFormat import android.provider.Settings Loading Loading @@ -32,6 +34,7 @@ class ReCaptchaOverlay(val context: Context, val apiKey: String, val hostname: S var finished = false var container: View? = null @SuppressLint("SetJavaScriptEnabled", "AddJavascriptInterface") private fun show() { val layoutParamsType = if (android.os.Build.VERSION.SDK_INT >= 26) { WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY Loading Loading @@ -83,17 +86,7 @@ class ReCaptchaOverlay(val context: Context, val apiKey: String, val hostname: S settings.cacheMode = WebSettings.LOAD_NO_CACHE ProfileManager.ensureInitialized(context) settings.userAgentString = Build.generateWebViewUserAgentString(settings.userAgentString) view.addJavascriptInterface(object : Any() { @JavascriptInterface fun onReCaptchaToken(token: String) { Log.d(TAG, "onReCaptchaToken: $token") if (!finished) { finished = true continuation.resume(token) } close() } }, "MyCallback") view.addJavascriptInterface(ReCaptchaCallback(this), "MyCallback") val captcha = context.assets.open("recaptcha.html").bufferedReader().readText().replace("%apikey%", apiKey) view.loadDataWithBaseURL("https://$hostname/", captcha, null, null, "https://$hostname/") windowManager.addView(container, params) Loading @@ -113,6 +106,18 @@ class ReCaptchaOverlay(val context: Context, val apiKey: String, val hostname: S } companion object { class ReCaptchaCallback(val overlay: ReCaptchaOverlay) { @JavascriptInterface fun onReCaptchaToken(token: String) { Log.d(TAG, "onReCaptchaToken: $token") if (!overlay.finished) { overlay.finished = true overlay.continuation.resume(token) } overlay.close() } } fun isSupported(context: Context): Boolean = android.os.Build.VERSION.SDK_INT < 23 || Settings.canDrawOverlays(context) suspend fun awaitToken(context: Context, apiKey: String, hostname: String? = null) = suspendCoroutine<String> { continuation -> Loading
firebase-dynamic-links-api/gradle.propertiesdeleted 100644 → 0 +0 −34 Original line number Diff line number Diff line # # Copyright 2019 e Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # POM_NAME=Firebase Dynamic Links API POM_DESCRIPTION=Interfaces and objects for IPC between Firebase Library and microG POM_PACKAGING=aar POM_URL=https://github.com/microg/android_external_GmsApi POM_SCM_URL=https://github.com/microg/android_external_GmsApi POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git POM_LICENCE_NAME=The Apache Software License, Version 2.0 POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt POM_LICENCE_DIST=repo POM_DEVELOPER_ID=alexandruchircu POM_DEVELOPER_NAME=Alexandru Chircu
gradle.properties +1 −0 Original line number Diff line number Diff line android.useAndroidX=true android.disableAutomaticComponentCreation=true