Commit c40a6bca authored by Ricki Hirner's avatar Ricki Hirner 🐑

OSE fixes

parent 3129fd90
......@@ -10,6 +10,8 @@ package at.bitfire.davdroid
import android.app.Application
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.graphics.Bitmap
import android.graphics.drawable.BitmapDrawable
import android.os.Build
......
......@@ -107,7 +107,7 @@ class HttpClient private constructor(
context?.let {
if (BuildConfig.customCerts)
customCertManager(CustomCertManager(context, BuildConfig.customCertsUI, !settings.getBoolean(App.DISTRUST_SYSTEM_CERTIFICATES, false)))
customCertManager(CustomCertManager(context, true, !settings.getBoolean(App.DISTRUST_SYSTEM_CERTIFICATES, false)))
// use account settings for authentication
accountSettings?.let {
......
......@@ -56,7 +56,7 @@ class AboutActivity: AppCompatActivity() {
ComponentInfo(
null, BuildConfig.VERSION_NAME, getString(R.string.homepage_url),
"Ricki Hirner, Bernhard Stockmann (bitfire web engineering)",
null, null
R.string.about_license_info_no_warranty, "gpl-3.0-standalone.html"
), ComponentInfo(
"AmbilWarna", null, "https://github.com/yukuku/ambilwarna",
"Yuku", R.string.about_license_info_no_warranty, "apache2.html"
......
......@@ -98,11 +98,11 @@ class AppSettingsActivity: AppCompatActivity() {
// security settings
val prefDistrustSystemCerts = findPreference(App.DISTRUST_SYSTEM_CERTIFICATES)
prefDistrustSystemCerts.isVisible = BuildConfig.customCerts
prefDistrustSystemCerts.isEnabled = BuildConfig.customCertsUI
prefDistrustSystemCerts.isEnabled = true
val prefResetCertificates = findPreference("reset_certificates")
prefResetCertificates.isVisible = BuildConfig.customCerts
prefResetCertificates.isEnabled = BuildConfig.customCertsUI
prefResetCertificates.isEnabled = true
prefResetCertificates.onPreferenceClickListener = Preference.OnPreferenceClickListener {
resetCertificates()
false
......@@ -188,7 +188,7 @@ class AppSettingsActivity: AppCompatActivity() {
}
private fun resetCertificates() {
if (BuildConfig.customCertsUI && CustomCertManager.resetCertificates(activity!!))
if (CustomCertManager.resetCertificates(activity!!))
Snackbar.make(view!!, getString(R.string.app_settings_reset_certificates_success), Snackbar.LENGTH_LONG).show()
}
......
......@@ -55,7 +55,7 @@ class DefaultAccountsDrawerHandler: IAccountsDrawerHandler {
activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(activity.getString(R.string.homepage_url))
.buildUpon().appendEncodedPath("forums/").build()))
R.id.nav_donate ->
if (BuildConfig.FLAVOR != App.FLAVOR_GOOGLE_PLAY)
//if (BuildConfig.FLAVOR != App.FLAVOR_GOOGLE_PLAY)
activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(activity.getString(R.string.homepage_url))
.buildUpon().appendEncodedPath("donate/").build()))
else ->
......@@ -65,4 +65,4 @@ class DefaultAccountsDrawerHandler: IAccountsDrawerHandler {
return true
}
}
\ No newline at end of file
}
/*
* Copyright © Ricki Hirner (bitfire web engineering).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*/
package at.bitfire.davdroid.ui
import android.app.Activity
import android.view.Menu
import android.view.MenuItem
import at.bitfire.davdroid.settings.ISettings
interface IAccountsDrawerHandler {
fun onSettingsChanged(settings: ISettings?, menu: Menu)
fun onNavigationItemSelected(activity: Activity, item: MenuItem): Boolean
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment