diff --git a/build.gradle b/build.gradle index 14d07f07..605bccbb 100644 --- a/build.gradle +++ b/build.gradle @@ -17,6 +17,7 @@ buildscript { classpath "com.airbnb.okreplay:gradle-plugin:1.4.0" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2' + classpath 'com.google.android.gms:oss-licenses-plugin:0.9.5' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/vector/build.gradle b/vector/build.gradle index 2f49297b..34e1edb0 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.application' +apply plugin: 'com.google.android.gms.oss-licenses-plugin' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' @@ -162,6 +163,9 @@ dependencies { implementation "com.squareup.moshi:moshi-adapters:$moshi_version" kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshi_version" + // OSS License + implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0' + // Log implementation 'com.jakewharton.timber:timber:4.7.1' @@ -172,6 +176,7 @@ dependencies { implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0' implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' implementation 'com.jakewharton.rxrelay2:rxrelay:2.1.0' + // TODO RxBindings3 exists implementation 'com.jakewharton.rxbinding2:rxbinding:2.2.0' implementation("com.airbnb.android:epoxy:$epoxy_version") @@ -181,7 +186,7 @@ dependencies { // Work implementation "android.arch.work:work-runtime-ktx:1.0.0" - // FP + // Functional Programming implementation "io.arrow-kt:arrow-core:$arrow_version" // Pref diff --git a/vector/src/main/assets/open_source_licenses.html b/vector/src/main/assets/open_source_licenses.html index 15d9252c..55ff8543 100755 --- a/vector/src/main/assets/open_source_licenses.html +++ b/vector/src/main/assets/open_source_licenses.html @@ -21,11 +21,12 @@ div { padding: 4px; } +
-

Riot Android

+

RiotX Android

Third Party Licenses

@@ -173,6 +174,62 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +
+
+Copyright 2017 Tapadoo, Dublin.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+ + +
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+ +

Apache License @@ -192,78 +249,25 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright (c) 2019 The Matrix.org Foundation C.I.C
  • - Jitsi Meet (jitsi-meet) + rxkotlin
    - Copyright @ 2018-present 8x8, Inc. -
    - Copyright @ 2017-2018 Atlassian Pty Ltd + Copyright io.reactivex.
  • - Retrofit + rxandroid
    - Copyright 2013 Square, Inc. + Copyright io.reactivex.
  • - okhttp + rxrelay
    - Copyright 2016 Square, Inc. + Copyright 2014 Netflix, Inc. + Copyright 2015 Jake Wharton
  • - ShortcutBadger + rxbinding
    - Copyright 2014 Leo Lin -
  • -
  • - html-textview -
    - Copyright (C) 2013-2015 Dominik Schürmann -
    - Copyright (C) 2013-2015 Juha Kuitunen -
    - Copyright (C) 2013 Mohammed Lakkadshaw -
    - Copyright (C) 2007 The Android Open Source Project -
  • -
  • - anddown -
    - Copyright (c) 2016 CommonsWare, LLC -
  • -
  • - zip4j -
    - Copyright 2010 Srikanth Reddy Lingala -
  • -
  • - SwipeBack -
    - Copyright 2015 Eric Liu -
  • -
  • - Libphonenumber -
    - Copyright 2017 Google -
  • -
  • - Butter Knife -
    - Copyright 2013 Jake Wharton -
  • -
  • - FloatingActionButton -
    - Copyright (C) 2014 Jerzy Chalupski -
  • -
  • - Spanny -
    - Copyright 2015 Pavlovsky Ivan -
  • -
  • - PhotoView -
    - Copyright 2018 Chris Banes + Copyright (C) 2015 Jake Wharton
  • Epoxy @@ -271,9 +275,69 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright 2016 Airbnb, Inc.
  • - Anko + mvrx
    - Copyright 2016 JetBrains s.r.o. + Copyright 2018 Airbnb, Inc. +
  • +
  • + arrow-core +
    + Copyright (C) 2017 The Λrrow Authors +
  • +
  • + material +
    + Copyright (C) 2016 Google +
  • +
  • + span +
    + Copyright 2018 Jun Gu +
  • +
  • + ru.noties.markwon +
    + Copyright 2017 Dimitry Ivanov (mail@dimitryivanov.ru) +
  • +
  • + better-link-movement-method +
    + Copyright 2018 Saket Narayan. +
  • +
  • + zxcvbn +
    + Copyright (c) 2012-2016 Dan Wheeler and Dropbox, Inc. +
  • +
  • + com.otaliastudios:autocomplete +
    + Copyright (c) 2017 +
  • +
  • + Butterknife +
    + Copyright 2013 Jake Wharton +
  • +
  • + seismic +
    + Copyright 2012 Square, Inc. +
  • +
  • + videocache +
    + Copyright 2014-2017 Alexey Danilov +
  • +
  • + ShortcutBadger +
    + Copyright 2014 Leo Lin +
  • +
  • + FilePicker +
    + Copyright (c) 2018, Jaisel Rahman
  • @@ -453,25 +517,5 @@ Apache License
           of your accepting any such warranty or additional liability.
     
    - - -
    -
    -Copyright 2017 Tapadoo, Dublin.
    -
    -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    -
    -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    -
    -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    -
    -
    diff --git a/vector/src/main/java/im/vector/riotredesign/core/utils/Dialogs.kt b/vector/src/main/java/im/vector/riotredesign/core/utils/Dialogs.kt index 6aa63660..2bd880a3 100644 --- a/vector/src/main/java/im/vector/riotredesign/core/utils/Dialogs.kt +++ b/vector/src/main/java/im/vector/riotredesign/core/utils/Dialogs.kt @@ -20,6 +20,7 @@ package im.vector.riotredesign.core.utils import android.content.Context import android.webkit.WebView +import android.webkit.WebViewClient import androidx.appcompat.app.AlertDialog /** @@ -29,9 +30,13 @@ import androidx.appcompat.app.AlertDialog */ fun Context.displayInWebView(url: String) { val wv = WebView(this) + + // Set a WebViewClient to ensure redirection is handled directly in the WebView + wv.webViewClient = WebViewClient() + wv.loadUrl(url) AlertDialog.Builder(this) .setView(wv) .setPositiveButton(android.R.string.ok, null) .show() -} \ No newline at end of file +} diff --git a/vector/src/main/java/im/vector/riotredesign/features/settings/PreferencesManager.java b/vector/src/main/java/im/vector/riotredesign/features/settings/PreferencesManager.java index c695d4cd..4a917592 100755 --- a/vector/src/main/java/im/vector/riotredesign/features/settings/PreferencesManager.java +++ b/vector/src/main/java/im/vector/riotredesign/features/settings/PreferencesManager.java @@ -54,6 +54,7 @@ public class PreferencesManager { public static final String SETTINGS_NOTIFICATION_TROUBLESHOOT_PREFERENCE_KEY = "SETTINGS_NOTIFICATION_TROUBLESHOOT_PREFERENCE_KEY"; public static final String SETTINGS_NOTIFICATION_ADVANCED_PREFERENCE_KEY = "SETTINGS_NOTIFICATION_ADVANCED_PREFERENCE_KEY"; public static final String SETTINGS_THIRD_PARTY_NOTICES_PREFERENCE_KEY = "SETTINGS_THIRD_PARTY_NOTICES_PREFERENCE_KEY"; + public static final String SETTINGS_OTHER_THIRD_PARTY_NOTICES_PREFERENCE_KEY = "SETTINGS_OTHER_THIRD_PARTY_NOTICES_PREFERENCE_KEY"; public static final String SETTINGS_COPYRIGHT_PREFERENCE_KEY = "SETTINGS_COPYRIGHT_PREFERENCE_KEY"; public static final String SETTINGS_CLEAR_CACHE_PREFERENCE_KEY = "SETTINGS_CLEAR_CACHE_PREFERENCE_KEY"; public static final String SETTINGS_CLEAR_MEDIA_CACHE_PREFERENCE_KEY = "SETTINGS_CLEAR_MEDIA_CACHE_PREFERENCE_KEY"; diff --git a/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsPreferencesFragment.kt b/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsPreferencesFragment.kt index e386eaa9..d821c7f7 100755 --- a/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsPreferencesFragment.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/settings/VectorSettingsPreferencesFragment.kt @@ -41,6 +41,7 @@ import androidx.core.content.ContextCompat import androidx.core.content.edit import androidx.core.view.isVisible import androidx.preference.* +import com.google.android.gms.oss.licenses.OssLicensesMenuActivity import com.google.android.material.textfield.TextInputEditText import com.google.android.material.textfield.TextInputLayout import im.vector.matrix.android.api.Matrix @@ -693,6 +694,13 @@ class VectorSettingsPreferencesFragment : VectorPreferenceFragment(), SharedPref false } + findPreference(PreferencesManager.SETTINGS_OTHER_THIRD_PARTY_NOTICES_PREFERENCE_KEY) + .onPreferenceClickListener = Preference.OnPreferenceClickListener { + // See https://developers.google.com/android/guides/opensource + startActivity(Intent(requireActivity(), OssLicensesMenuActivity::class.java)) + false + } + // update keep medias period findPreference(PreferencesManager.SETTINGS_MEDIA_SAVING_PERIOD_KEY).let { it.summary = PreferencesManager.getSelectedMediasSavingPeriodString(activity) diff --git a/vector/src/main/res/values/strings_riotX.xml b/vector/src/main/res/values/strings_riotX.xml index 3293c4cf..30a2c7ec 100644 --- a/vector/src/main/res/values/strings_riotX.xml +++ b/vector/src/main/res/values/strings_riotX.xml @@ -7,5 +7,6 @@ "Import e2e keys from file \"%1$s\"." Matrix SDK Version + Other third party notices \ No newline at end of file diff --git a/vector/src/main/res/xml/vector_settings_preferences.xml b/vector/src/main/res/xml/vector_settings_preferences.xml index e891b121..70489cff 100755 --- a/vector/src/main/res/xml/vector_settings_preferences.xml +++ b/vector/src/main/res/xml/vector_settings_preferences.xml @@ -480,6 +480,10 @@ android:key="SETTINGS_THIRD_PARTY_NOTICES_PREFERENCE_KEY" android:title="@string/settings_third_party_notices" /> + +