Merge pull request #189 from vector-im/feature/third_party_notice

Feature/third party notice
This commit is contained in:
Benoit Marty 2019-06-25 09:32:08 +02:00 committed by GitHub
commit ad601c7d5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 156 additions and 87 deletions

View File

@ -17,6 +17,7 @@ buildscript {
classpath "com.airbnb.okreplay:gradle-plugin:1.4.0" classpath "com.airbnb.okreplay:gradle-plugin:1.4.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2' 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 // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files

View File

@ -1,4 +1,5 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
@ -162,6 +163,9 @@ dependencies {
implementation "com.squareup.moshi:moshi-adapters:$moshi_version" implementation "com.squareup.moshi:moshi-adapters:$moshi_version"
kapt "com.squareup.moshi:moshi-kotlin-codegen:$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 // Log
implementation 'com.jakewharton.timber:timber:4.7.1' 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:rxkotlin:2.3.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'com.jakewharton.rxrelay2:rxrelay:2.1.0' implementation 'com.jakewharton.rxrelay2:rxrelay:2.1.0'
// TODO RxBindings3 exists
implementation 'com.jakewharton.rxbinding2:rxbinding:2.2.0' implementation 'com.jakewharton.rxbinding2:rxbinding:2.2.0'


implementation("com.airbnb.android:epoxy:$epoxy_version") implementation("com.airbnb.android:epoxy:$epoxy_version")
@ -181,7 +186,7 @@ dependencies {
// Work // Work
implementation "android.arch.work:work-runtime-ktx:1.0.0" implementation "android.arch.work:work-runtime-ktx:1.0.0"


// FP // Functional Programming
implementation "io.arrow-kt:arrow-core:$arrow_version" implementation "io.arrow-kt:arrow-core:$arrow_version"


// Pref // Pref

View File

@ -21,11 +21,12 @@
div { div {
padding: 4px; padding: 4px;
} }

</style> </style>
</head> </head>
<body> <body>
<div> <div>
<p>Riot Android</p> <p>RiotX Android</p>
<p>Third Party Licenses</p> <p>Third Party Licenses</p>
</div> </div>


@ -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. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</pre> </pre>


<ul>
<li>
<b>Tapadoo/Alerter</b>
<br/>
Tapadoo/Alerter is licensed under the MIT License
Copyright 2017 Tapadoo, Dublin.
</li>
</ul>
<pre>

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.

</pre>

<ul>
<li>
<b>com.github.piasy:BigImageViewer</b>
<br/>
MIT License

Copyright (c) 2018 Piasy
</li>
</ul>
<pre>
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.
</pre>

<ul>
<li>
<b>textdrawable</b>
<br/>
textdrawable is licensed under the MIT License
</li>
</ul>


<h3> <h3>
Apache License 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 Copyright (c) 2019 The Matrix.org Foundation C.I.C
</li> </li>
<li> <li>
<b>Jitsi Meet (<a <b>rxkotlin</b>
href="https://github.com/jitsi/jitsi-meet">jitsi-meet</a>)</b>
<br/> <br/>
Copyright @ 2018-present 8x8, Inc. Copyright io.reactivex.
<br/>
Copyright @ 2017-2018 Atlassian Pty Ltd
</li> </li>
<li> <li>
<b>Retrofit</b> <b>rxandroid</b>
<br/> <br/>
Copyright 2013 Square, Inc. Copyright io.reactivex.
</li> </li>
<li> <li>
<b>okhttp</b> <b>rxrelay</b>
<br/> <br/>
Copyright 2016 Square, Inc. Copyright 2014 Netflix, Inc.
Copyright 2015 Jake Wharton
</li> </li>
<li> <li>
<b>ShortcutBadger</b> <b>rxbinding</b>
<br/> <br/>
Copyright 2014 Leo Lin Copyright (C) 2015 Jake Wharton
</li>
<li>
<b>html-textview</b>
<br/>
Copyright (C) 2013-2015 Dominik Sch&uuml;rmann
<br/>
Copyright (C) 2013-2015 Juha Kuitunen
<br/>
Copyright (C) 2013 Mohammed Lakkadshaw
<br/>
Copyright (C) 2007 The Android Open Source Project
</li>
<li>
<b>anddown</b>
<br/>
Copyright (c) 2016 CommonsWare, LLC
</li>
<li>
<b>zip4j</b>
<br/>
Copyright 2010 Srikanth Reddy Lingala
</li>
<li>
<b>SwipeBack</b>
<br/>
Copyright 2015 Eric Liu
</li>
<li>
<b>Libphonenumber</b>
<br/>
Copyright 2017 Google
</li>
<li>
<b>Butter Knife</b>
<br/>
Copyright 2013 Jake Wharton
</li>
<li>
<b>FloatingActionButton</b>
<br/>
Copyright (C) 2014 Jerzy Chalupski
</li>
<li>
<b>Spanny</b>
<br/>
Copyright 2015 Pavlovsky Ivan
</li>
<li>
<b>PhotoView</b>
<br/>
Copyright 2018 Chris Banes
</li> </li>
<li> <li>
<b>Epoxy</b> <b>Epoxy</b>
@ -271,9 +275,69 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2016 Airbnb, Inc. Copyright 2016 Airbnb, Inc.
</li> </li>
<li> <li>
<b>Anko</b> <b>mvrx</b>
<br/> <br/>
Copyright 2016 JetBrains s.r.o. Copyright 2018 Airbnb, Inc.
</li>
<li>
<b>arrow-core</b>
<br/>
Copyright (C) 2017 The Λrrow Authors
</li>
<li>
<b>material</b>
<br/>
Copyright (C) 2016 Google
</li>
<li>
<b>span</b>
<br/>
Copyright 2018 Jun Gu
</li>
<li>
<b>ru.noties.markwon</b>
<br/>
Copyright 2017 Dimitry Ivanov (mail@dimitryivanov.ru)
</li>
<li>
<b>better-link-movement-method</b>
<br/>
Copyright 2018 Saket Narayan.
</li>
<li>
<b>zxcvbn</b>
<br/>
Copyright (c) 2012-2016 Dan Wheeler and Dropbox, Inc.
</li>
<li>
<b>com.otaliastudios:autocomplete</b>
<br/>
Copyright (c) 2017
</li>
<li>
<b>Butterknife</b>
<br/>
Copyright 2013 Jake Wharton
</li>
<li>
<b>seismic</b>
<br/>
Copyright 2012 Square, Inc.
</li>
<li>
<b>videocache</b>
<br/>
Copyright 2014-2017 Alexey Danilov
</li>
<li>
<b>ShortcutBadger</b>
<br/>
Copyright 2014 Leo Lin
</li>
<li>
<b>FilePicker</b>
<br/>
Copyright (c) 2018, Jaisel Rahman
</li> </li>
</ul> </ul>
<pre> <pre>
@ -453,25 +517,5 @@ Apache License
of your accepting any such warranty or additional liability. of your accepting any such warranty or additional liability.
</pre> </pre>



<ul>
<li>
<b>Tapadoo/Alerter</b>
<br/>
Tapadoo/Alerter is licensed under the MIT License
Copyright 2017 Tapadoo, Dublin.
</li>
</ul>
<pre>

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.

</pre>
</body> </body>
</html> </html>

View File

@ -20,6 +20,7 @@ package im.vector.riotredesign.core.utils


import android.content.Context import android.content.Context
import android.webkit.WebView import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog


/** /**
@ -29,6 +30,10 @@ import androidx.appcompat.app.AlertDialog
*/ */
fun Context.displayInWebView(url: String) { fun Context.displayInWebView(url: String) {
val wv = WebView(this) val wv = WebView(this)

// Set a WebViewClient to ensure redirection is handled directly in the WebView
wv.webViewClient = WebViewClient()

wv.loadUrl(url) wv.loadUrl(url)
AlertDialog.Builder(this) AlertDialog.Builder(this)
.setView(wv) .setView(wv)

View File

@ -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_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_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_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_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_CACHE_PREFERENCE_KEY = "SETTINGS_CLEAR_CACHE_PREFERENCE_KEY";
public static final String SETTINGS_CLEAR_MEDIA_CACHE_PREFERENCE_KEY = "SETTINGS_CLEAR_MEDIA_CACHE_PREFERENCE_KEY"; public static final String SETTINGS_CLEAR_MEDIA_CACHE_PREFERENCE_KEY = "SETTINGS_CLEAR_MEDIA_CACHE_PREFERENCE_KEY";

View File

@ -41,6 +41,7 @@ import androidx.core.content.ContextCompat
import androidx.core.content.edit import androidx.core.content.edit
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.preference.* import androidx.preference.*
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
import com.google.android.material.textfield.TextInputEditText import com.google.android.material.textfield.TextInputEditText
import com.google.android.material.textfield.TextInputLayout import com.google.android.material.textfield.TextInputLayout
import im.vector.matrix.android.api.Matrix import im.vector.matrix.android.api.Matrix
@ -693,6 +694,13 @@ class VectorSettingsPreferencesFragment : VectorPreferenceFragment(), SharedPref
false 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 // update keep medias period
findPreference(PreferencesManager.SETTINGS_MEDIA_SAVING_PERIOD_KEY).let { findPreference(PreferencesManager.SETTINGS_MEDIA_SAVING_PERIOD_KEY).let {
it.summary = PreferencesManager.getSelectedMediasSavingPeriodString(activity) it.summary = PreferencesManager.getSelectedMediasSavingPeriodString(activity)

View File

@ -7,5 +7,6 @@
<string name="import_e2e_keys_from_file">"Import e2e keys from file \"%1$s\"."</string> <string name="import_e2e_keys_from_file">"Import e2e keys from file \"%1$s\"."</string>


<string name="settings_sdk_version">Matrix SDK Version</string> <string name="settings_sdk_version">Matrix SDK Version</string>
<string name="settings_other_third_party_notices">Other third party notices</string>


</resources> </resources>

View File

@ -480,6 +480,10 @@
android:key="SETTINGS_THIRD_PARTY_NOTICES_PREFERENCE_KEY" android:key="SETTINGS_THIRD_PARTY_NOTICES_PREFERENCE_KEY"
android:title="@string/settings_third_party_notices" /> android:title="@string/settings_third_party_notices" />


<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_OTHER_THIRD_PARTY_NOTICES_PREFERENCE_KEY"
android:title="@string/settings_other_third_party_notices" />

<im.vector.riotredesign.core.preference.VectorPreference <im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_MEDIA_SAVING_PERIOD_KEY" android:key="SETTINGS_MEDIA_SAVING_PERIOD_KEY"
android:title="@string/settings_keep_media" /> android:title="@string/settings_keep_media" />