mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-06-14 22:50:17 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
f8ac9e793a | |||
148597e578 | |||
6c50a80b42 | |||
1bf0679e92 | |||
5b5dc5cade | |||
98a89b1ca1 | |||
6d1e18cce2 | |||
8fe0f88be4 | |||
aeed735521 |
@ -41,6 +41,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
getIsDefault().set(true)
|
||||
minifyEnabled = false
|
||||
manifestPlaceholders = [
|
||||
buildTimestamp: 0
|
||||
@ -55,7 +56,8 @@ android {
|
||||
}
|
||||
flavorDimensions "platform"
|
||||
productFlavors {
|
||||
main {
|
||||
unofficial {
|
||||
getIsDefault().set(true)
|
||||
versionName "${release.versionName}-${gitInfo.versionSuffix}"
|
||||
}
|
||||
official {}
|
||||
@ -63,7 +65,18 @@ android {
|
||||
}
|
||||
variantFilter { variant ->
|
||||
def flavors = variant.flavors*.name
|
||||
setIgnore(variant.buildType.name == "debug" && !flavors.contains("main"))
|
||||
setIgnore(variant.buildType.name == "debug" && !flavors.contains("unofficial") || flavors.contains("main"))
|
||||
}
|
||||
sourceSets {
|
||||
unofficial {
|
||||
java.srcDirs = ["src/main/java", "src/play-not/java"]
|
||||
}
|
||||
official {
|
||||
java.srcDirs = ["src/main/java", "src/play-not/java"]
|
||||
}
|
||||
play {
|
||||
java.srcDirs = ["src/main/java", "src/play/java"]
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
@ -170,7 +183,8 @@ dependencies {
|
||||
implementation "eu.szkolny:mhttp:af4b62e6e9"
|
||||
implementation "eu.szkolny:nachos:0e5dfcaceb"
|
||||
implementation "eu.szkolny.selective-dao:annotation:27f8f3f194"
|
||||
implementation "eu.szkolny:ssl-provider:1.0.0"
|
||||
officialImplementation "eu.szkolny:ssl-provider:1.0.0"
|
||||
unofficialImplementation "eu.szkolny:ssl-provider:1.0.0"
|
||||
implementation "pl.szczodrzynski:navlib:0.8.0"
|
||||
implementation "pl.szczodrzynski:numberslidingpicker:2921225f76"
|
||||
implementation "pl.szczodrzynski:recyclertablayout:700f980584"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<h3>Wersja 4.11.1, 2022-01-14</h3>
|
||||
<h3>Wersja 4.11.3, 2022-02-21</h3>
|
||||
<ul>
|
||||
<li>Poprawiono działanie planu lekcji. @BxOxSxS</li>
|
||||
<li>Naprawiono odświeżanie planu lekcji po pobraniu wybranego tygodnia.</li>
|
||||
</ul>
|
||||
<br>
|
||||
<br>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
/*secret password - removed for source code publication*/
|
||||
static toys AES_IV[16] = {
|
||||
0x9a, 0x00, 0xd6, 0xc9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
0x90, 0xe9, 0x2f, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
|
||||
unsigned char *agony(unsigned int laugh, unsigned char *box, unsigned char *heat);
|
||||
|
||||
|
@ -26,8 +26,6 @@ import com.google.firebase.messaging.FirebaseMessaging
|
||||
import com.google.gson.Gson
|
||||
import com.hypertrack.hyperlog.HyperLog
|
||||
import com.mikepenz.iconics.Iconics
|
||||
import eu.szkolny.sslprovider.SSLProvider
|
||||
import eu.szkolny.sslprovider.enableSupportedTls
|
||||
import im.wangchao.mhttp.MHttp
|
||||
import kotlinx.coroutines.*
|
||||
import me.leolin.shortcutbadger.ShortcutBadger
|
||||
@ -42,6 +40,7 @@ import pl.szczodrzynski.edziennik.data.db.entity.Profile
|
||||
import pl.szczodrzynski.edziennik.ext.DAY
|
||||
import pl.szczodrzynski.edziennik.ext.MS
|
||||
import pl.szczodrzynski.edziennik.ext.setLanguage
|
||||
import pl.szczodrzynski.edziennik.network.SSLProviderInstaller
|
||||
import pl.szczodrzynski.edziennik.network.cookie.DumbCookieJar
|
||||
import pl.szczodrzynski.edziennik.sync.SyncWorker
|
||||
import pl.szczodrzynski.edziennik.sync.UpdateWorker
|
||||
@ -49,7 +48,6 @@ import pl.szczodrzynski.edziennik.ui.base.CrashActivity
|
||||
import pl.szczodrzynski.edziennik.utils.*
|
||||
import pl.szczodrzynski.edziennik.utils.Utils.d
|
||||
import pl.szczodrzynski.edziennik.utils.managers.*
|
||||
import timber.log.Timber
|
||||
import java.util.concurrent.TimeUnit
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
@ -119,7 +117,8 @@ class App : MultiDexApplication(), Configuration.Provider, CoroutineScope {
|
||||
.connectTimeout(15, TimeUnit.SECONDS)
|
||||
.writeTimeout(10, TimeUnit.SECONDS)
|
||||
.readTimeout(30, TimeUnit.SECONDS)
|
||||
.enableSupportedTls(enableCleartext = true)
|
||||
|
||||
SSLProviderInstaller.enableSupportedTls(builder, enableCleartext = true)
|
||||
|
||||
if (devMode) {
|
||||
HyperLog.initialize(this)
|
||||
@ -203,18 +202,7 @@ class App : MultiDexApplication(), Configuration.Provider, CoroutineScope {
|
||||
withContext(Dispatchers.Default) {
|
||||
config.migrate(this@App)
|
||||
|
||||
SSLProvider.install(
|
||||
applicationContext,
|
||||
downloadIfNeeded = true,
|
||||
supportTls13 = false,
|
||||
onFinish = {
|
||||
buildHttp()
|
||||
},
|
||||
onError = {
|
||||
Timber.e("Failed to install SSLProvider: $it")
|
||||
it.printStackTrace()
|
||||
}
|
||||
)
|
||||
SSLProviderInstaller.install(applicationContext, this@App::buildHttp)
|
||||
|
||||
if (config.devModePassword != null)
|
||||
checkDevModePassword()
|
||||
|
@ -7,10 +7,12 @@ package pl.szczodrzynski.edziennik.data.api.edziennik.mobidziennik
|
||||
import android.util.LongSparseArray
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.data.api.LOGIN_METHOD_MOBIDZIENNIK_WEB
|
||||
import pl.szczodrzynski.edziennik.data.api.Regexes
|
||||
import pl.szczodrzynski.edziennik.data.api.models.Data
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.LoginStore
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Profile
|
||||
import pl.szczodrzynski.edziennik.ext.currentTimeUnix
|
||||
import pl.szczodrzynski.edziennik.ext.get
|
||||
import pl.szczodrzynski.edziennik.ext.isNotNullNorEmpty
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
import pl.szczodrzynski.edziennik.utils.models.Time
|
||||
@ -35,6 +37,31 @@ class DataMobidziennik(app: App, profile: Profile?, loginStore: LoginStore) : Da
|
||||
|
||||
override fun generateUserCode() = "$loginServerName:$loginUsername:$studentId"
|
||||
|
||||
fun parseDateTime(dateStr: String): Pair<Date, Time> {
|
||||
// pt, 4 lut, 09:11
|
||||
val dateParts = dateStr.split(',', ' ').filter { it.isNotEmpty() }
|
||||
// [pt], [4], [lut], [09:11]
|
||||
val date = Date.getToday()
|
||||
date.day = dateParts[1].toIntOrNull() ?: 1
|
||||
date.month = when (dateParts[2]) {
|
||||
"sty" -> 1
|
||||
"lut" -> 2
|
||||
"mar" -> 3
|
||||
"kwi" -> 4
|
||||
"maj" -> 5
|
||||
"cze" -> 6
|
||||
"lip" -> 7
|
||||
"sie" -> 8
|
||||
"wrz" -> 9
|
||||
"paź" -> 10
|
||||
"lis" -> 11
|
||||
"gru" -> 12
|
||||
else -> 1
|
||||
}
|
||||
val time = Time.fromH_m(dateParts[3])
|
||||
return date to time
|
||||
}
|
||||
|
||||
val teachersMap = LongSparseArray<String>()
|
||||
val subjectsMap = LongSparseArray<String>()
|
||||
|
||||
|
@ -36,6 +36,10 @@ class MobidziennikWebMessagesInbox(override val data: DataMobidziennik,
|
||||
|
||||
val doc = Jsoup.parse(text)
|
||||
|
||||
val today = Date.getToday()
|
||||
var currentYear = today.year
|
||||
var currentMonth = today.month
|
||||
|
||||
val list = doc.getElementsByClass("spis").first()?.getElementsByClass("podswietl")
|
||||
list?.forEach { item ->
|
||||
val id = item.attr("rel").toLongOrNull() ?: return@forEach
|
||||
@ -47,15 +51,20 @@ class MobidziennikWebMessagesInbox(override val data: DataMobidziennik,
|
||||
}
|
||||
val subject = subjectEl?.ownText() ?: ""
|
||||
|
||||
val addedDateEl = item.select("td:eq(1) small").first()
|
||||
val addedDate = Date.fromIsoHm(addedDateEl?.text())
|
||||
val addedDateEl = item.select("td:eq(4)").first()
|
||||
val (date, time) = data.parseDateTime(addedDateEl?.text()?.trim() ?: "")
|
||||
if (date.month > currentMonth) {
|
||||
currentYear--
|
||||
}
|
||||
currentMonth = date.month
|
||||
date.year = currentYear
|
||||
|
||||
val senderEl = item.select("td:eq(2)").first()
|
||||
val senderEl = item.select("td:eq(3)").first()
|
||||
val senderName = senderEl?.ownText().fixName()
|
||||
val senderId = data.teacherList.singleOrNull { it.fullNameLastFirst == senderName }?.id
|
||||
data.messageRecipientIgnoreList.add(MessageRecipient(profileId, -1, id))
|
||||
|
||||
val isRead = item.select("td:eq(3) span").first()?.hasClass("wiadomosc_przeczytana") == true
|
||||
val isRead = item.select("td:eq(5) span").first()?.hasClass("wiadomosc_przeczytana") == true
|
||||
|
||||
val message = Message(
|
||||
profileId = profileId,
|
||||
@ -64,7 +73,7 @@ class MobidziennikWebMessagesInbox(override val data: DataMobidziennik,
|
||||
subject = subject,
|
||||
body = null,
|
||||
senderId = senderId,
|
||||
addedDate = addedDate
|
||||
addedDate = date.combineWith(time)
|
||||
)
|
||||
|
||||
if (hasAttachments)
|
||||
|
@ -40,23 +40,29 @@ class MobidziennikWebMessagesSent(override val data: DataMobidziennik,
|
||||
|
||||
val doc = Jsoup.parse(text)
|
||||
|
||||
val today = Date.getToday()
|
||||
var currentYear = today.year
|
||||
var currentMonth = today.month
|
||||
|
||||
val list = doc.getElementsByClass("spis").first()?.getElementsByClass("podswietl")
|
||||
list?.forEach { item ->
|
||||
val id = item.attr("rel").toLongOrNull() ?: return@forEach
|
||||
|
||||
val subjectEl = item.select("td:eq(0)").first()
|
||||
var hasAttachments = false
|
||||
if (subjectEl?.getElementsByTag("a")?.size ?: 0 > 0) {
|
||||
hasAttachments = true
|
||||
}
|
||||
val subject = subjectEl?.ownText() ?: ""
|
||||
|
||||
val readByString = item.select("td:eq(2)").first()?.text() ?: ""
|
||||
val attachmentsEl = item.select("td:eq(1)").first()
|
||||
var hasAttachments = false
|
||||
if (attachmentsEl?.getElementsByTag("a")?.size ?: 0 > 0) {
|
||||
hasAttachments = true
|
||||
}
|
||||
|
||||
val readByString = item.select("td:eq(4)").first()?.text() ?: ""
|
||||
val (readBy, sentTo) = Regexes.MOBIDZIENNIK_MESSAGE_SENT_READ_BY.find(readByString).let {
|
||||
(it?.get(1)?.toIntOrNull() ?: 0) to (it?.get(2)?.toIntOrNull() ?: 0)
|
||||
}
|
||||
|
||||
val recipientEl = item.select("td:eq(1) a span").first()
|
||||
val recipientEl = item.select("td:eq(2) a span").first()
|
||||
val recipientNames = recipientEl?.ownText()?.split(", ")
|
||||
val readState = when (readBy) {
|
||||
0 -> 0
|
||||
@ -69,8 +75,13 @@ class MobidziennikWebMessagesSent(override val data: DataMobidziennik,
|
||||
data.messageRecipientIgnoreList.add(MessageRecipient(profileId, recipientId, -1, readState, id))
|
||||
}
|
||||
|
||||
val addedDateEl = item.select("td:eq(3) small").first()
|
||||
val addedDate = Date.fromIsoHm(addedDateEl?.text())
|
||||
val addedDateEl = item.select("td:eq(3)").first()
|
||||
val (date, time) = data.parseDateTime(addedDateEl?.text()?.trim() ?: "")
|
||||
if (date.month > currentMonth) {
|
||||
currentYear--
|
||||
}
|
||||
currentMonth = date.month
|
||||
date.year = currentYear
|
||||
|
||||
val message = Message(
|
||||
profileId = profileId,
|
||||
@ -79,7 +90,7 @@ class MobidziennikWebMessagesSent(override val data: DataMobidziennik,
|
||||
subject = subject,
|
||||
body = null,
|
||||
senderId = null,
|
||||
addedDate = addedDate
|
||||
addedDate = date.combineWith(time)
|
||||
)
|
||||
|
||||
if (hasAttachments)
|
||||
|
@ -46,6 +46,6 @@ object Signing {
|
||||
|
||||
/*fun provideKey(param1: String, param2: Long): ByteArray {*/
|
||||
fun pleaseStopRightNow(param1: String, param2: Long): ByteArray {
|
||||
return "$param1.MTIzNDU2Nzg5MD+gUJU5oz===.$param2".sha256()
|
||||
return "$param1.MTIzNDU2Nzg5MDw/KY+My+===.$param2".sha256()
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,8 @@ class TimetableDayFragment : LazyFragment(), CoroutineScope {
|
||||
private var firstEventMinute = 24 * 60
|
||||
private var paddingTop = 0
|
||||
|
||||
private var viewsRemoved = false
|
||||
|
||||
private val manager
|
||||
get() = app.timetableManager
|
||||
private val attendanceManager
|
||||
@ -127,6 +129,7 @@ class TimetableDayFragment : LazyFragment(), CoroutineScope {
|
||||
inflater.inflate(R.layout.timetable_no_timetable, b.root) { view, _, _ ->
|
||||
b.root.removeAllViews()
|
||||
b.root.addView(view)
|
||||
viewsRemoved = true
|
||||
|
||||
val b = TimetableNoTimetableBinding.bind(view)
|
||||
val weekStart = date.weekStart.stringY_m_d
|
||||
@ -151,6 +154,7 @@ class TimetableDayFragment : LazyFragment(), CoroutineScope {
|
||||
inflater.inflate(R.layout.timetable_no_lessons, b.root) { view, _, _ ->
|
||||
b.root.removeAllViews()
|
||||
b.root.addView(view)
|
||||
viewsRemoved = true
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -162,6 +166,13 @@ class TimetableDayFragment : LazyFragment(), CoroutineScope {
|
||||
return
|
||||
}
|
||||
|
||||
// the timetable was not synced (the day layout views are removed) and is now available
|
||||
if (viewsRemoved) {
|
||||
viewsRemoved = false
|
||||
activity.sendBroadcast(Intent(TimetableFragment.ACTION_RELOAD_PAGES))
|
||||
return
|
||||
}
|
||||
|
||||
b.scrollView.isVisible = true
|
||||
b.dayFrame.removeView(dayView)
|
||||
b.dayFrame.addView(dayView, 0)
|
||||
|
@ -36,6 +36,7 @@ class TimetableFragment : Fragment(), CoroutineScope {
|
||||
companion object {
|
||||
private const val TAG = "TimetableFragment"
|
||||
const val ACTION_SCROLL_TO_DATE = "pl.szczodrzynski.edziennik.timetable.SCROLL_TO_DATE"
|
||||
const val ACTION_RELOAD_PAGES = "pl.szczodrzynski.edziennik.timetable.RELOAD_PAGES"
|
||||
const val DEFAULT_START_HOUR = 6
|
||||
const val DEFAULT_END_HOUR = 19
|
||||
var pageSelection: Date? = null
|
||||
@ -66,14 +67,22 @@ class TimetableFragment : Fragment(), CoroutineScope {
|
||||
override fun onReceive(context: Context, i: Intent) {
|
||||
if (!isAdded)
|
||||
return
|
||||
val dateStr = i.extras?.getString("timetableDate", null) ?: return
|
||||
val date = Date.fromY_m_d(dateStr)
|
||||
b.viewPager.setCurrentItem(items.indexOf(date), true)
|
||||
when (i.action) {
|
||||
ACTION_SCROLL_TO_DATE -> {
|
||||
val dateStr = i.extras?.getString("timetableDate", null) ?: return
|
||||
val date = Date.fromY_m_d(dateStr)
|
||||
b.viewPager.setCurrentItem(items.indexOf(date), true)
|
||||
}
|
||||
ACTION_RELOAD_PAGES -> {
|
||||
b.viewPager.adapter?.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
activity.registerReceiver(broadcastReceiver, IntentFilter(ACTION_SCROLL_TO_DATE))
|
||||
activity.registerReceiver(broadcastReceiver, IntentFilter(ACTION_RELOAD_PAGES))
|
||||
}
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
|
@ -47,4 +47,8 @@ class TimetablePagerAdapter(
|
||||
}
|
||||
return pageTitle
|
||||
}
|
||||
|
||||
override fun getItemPosition(`object`: Any): Int {
|
||||
return POSITION_NONE
|
||||
}
|
||||
}
|
||||
|
@ -72,6 +72,9 @@ class MessageManager(private val app: App) {
|
||||
if (sentDate > 0L) {
|
||||
it.addedDate = sentDate
|
||||
}
|
||||
withContext(Dispatchers.IO) {
|
||||
it.recipients = app.db.messageRecipientDao().getAllByMessageId(profileId, it.id)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
withContext(Dispatchers.IO) {
|
||||
|
@ -857,7 +857,7 @@
|
||||
<string name="settings_about_licenses_text">Open-Source-Lizenzen</string>
|
||||
<string name="settings_about_privacy_policy_text">Datenschutzrichtlinie</string>
|
||||
<string name="settings_card_register_title">E-Klassenbuch</string>
|
||||
<string name="settings_about_title_subtext">© Kuba Szczodrzyński && Kacper Ziubryniewicz\nSeptember 2018 - Oktober 2021</string>
|
||||
<string name="settings_about_title_subtext">© Kuba Szczodrzyński && Kacper Ziubryniewicz\nSeptember 2018 - 2022</string>
|
||||
<string name="settings_about_update_subtext">Klicken Sie hier, um nach Aktualisierungen zu suchen</string>
|
||||
<string name="settings_about_update_text">Aktualisierung</string>
|
||||
<string name="settings_about_version_text">Version</string>
|
||||
|
@ -348,7 +348,7 @@
|
||||
<string name="event_information">information</string>
|
||||
<string name="event_list_added_by_format">Added %1$s by %2$s%3$s</string>
|
||||
<string name="event_list_added_by_self_format">Added %1$s by you%3$s</string>
|
||||
<string name="event_list_added_by_unknown_format">Adde %1$s%3$s</string>
|
||||
<string name="event_list_added_by_unknown_format">Added %1$s%3$s</string>
|
||||
<string name="event_list_shared_by_format">{cmd-share-variant} %1$s by %2$s%3$s</string>
|
||||
<string name="event_list_shared_by_self_format">{cmd-share-variant} %1$s by you%3$s</string>
|
||||
<string name="event_manual_remove">Removing event…</string>
|
||||
@ -859,7 +859,7 @@
|
||||
<string name="settings_about_licenses_text">Open-source licenses</string>
|
||||
<string name="settings_about_privacy_policy_text">Privacy policy</string>
|
||||
<string name="settings_card_register_title">E-register</string>
|
||||
<string name="settings_about_title_subtext">© Kuba Szczodrzyński && Kacper Ziubryniewicz\nSeptember 2018 - October 2021</string>
|
||||
<string name="settings_about_title_subtext">© Kuba Szczodrzyński && Kacper Ziubryniewicz\nSeptember 2018 - 2022</string>
|
||||
<string name="settings_about_update_subtext">Click to check for updates</string>
|
||||
<string name="settings_about_update_text">Update</string>
|
||||
<string name="settings_about_version_text">Version</string>
|
||||
|
@ -926,7 +926,7 @@
|
||||
<string name="settings_about_licenses_text">Licencje open-source</string>
|
||||
<string name="settings_about_privacy_policy_text">Polityka prywatności</string>
|
||||
<string name="settings_card_register_title">E-dziennik</string>
|
||||
<string name="settings_about_title_subtext">© Kuba Szczodrzyński && Kacper Ziubryniewicz\nwrzesień 2018 - październik 2021</string>
|
||||
<string name="settings_about_title_subtext">© Kuba Szczodrzyński && Kacper Ziubryniewicz\nwrzesień 2018 - 2022</string>
|
||||
<string name="settings_about_update_subtext">Kliknij, aby sprawdzić aktualizacje</string>
|
||||
<string name="settings_about_update_text">Aktualizacja</string>
|
||||
<string name="settings_about_version_text">Wersja</string>
|
||||
|
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) Kuba Szczodrzyński 2022-2-21.
|
||||
*/
|
||||
|
||||
package pl.szczodrzynski.edziennik.network
|
||||
|
||||
import android.content.Context
|
||||
import eu.szkolny.sslprovider.SSLProvider
|
||||
import eu.szkolny.sslprovider.enableSupportedTls
|
||||
import okhttp3.OkHttpClient
|
||||
import timber.log.Timber
|
||||
|
||||
object SSLProviderInstaller {
|
||||
|
||||
fun install(applicationContext: Context, rebuildCallback: () -> Unit) {
|
||||
SSLProvider.install(
|
||||
applicationContext,
|
||||
downloadIfNeeded = true,
|
||||
supportTls13 = false,
|
||||
onFinish = {
|
||||
rebuildCallback()
|
||||
},
|
||||
onError = {
|
||||
Timber.e("Failed to install SSLProvider: $it")
|
||||
it.printStackTrace()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun enableSupportedTls(builder: OkHttpClient.Builder, enableCleartext: Boolean = true) {
|
||||
builder.enableSupportedTls(enableCleartext)
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (c) Kuba Szczodrzyński 2022-2-21.
|
||||
*/
|
||||
|
||||
package pl.szczodrzynski.edziennik.network
|
||||
|
||||
import android.content.Context
|
||||
import okhttp3.OkHttpClient
|
||||
|
||||
object SSLProviderInstaller {
|
||||
|
||||
fun install(applicationContext: Context, rebuildCallback: () -> Unit) {
|
||||
|
||||
}
|
||||
|
||||
fun enableSupportedTls(builder: OkHttpClient.Builder, enableCleartext: Boolean = true) {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) Kuba Szczodrzyński 2022-2-21.
|
||||
*/
|
||||
|
||||
package pl.szczodrzynski.edziennik.sync
|
||||
|
||||
import android.app.IntentService
|
||||
import android.content.Intent
|
||||
import android.widget.Toast
|
||||
import pl.szczodrzynski.edziennik.utils.Utils
|
||||
|
||||
class UpdateDownloaderService : IntentService(UpdateDownloaderService::class.java.simpleName) {
|
||||
|
||||
override fun onHandleIntent(intent: Intent?) {
|
||||
try {
|
||||
Utils.openGooglePlay(this, application.packageName)
|
||||
}
|
||||
catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
Toast.makeText(this, "Nie znaleziono Google Play. Pobierz aktualizację ręcznie.", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
@ -5,8 +5,8 @@ buildscript {
|
||||
kotlin_version = '1.5.30'
|
||||
|
||||
release = [
|
||||
versionName: "4.11.1",
|
||||
versionCode: 4110199
|
||||
versionName: "4.11.3",
|
||||
versionCode: 4110399
|
||||
]
|
||||
|
||||
setup = [
|
||||
|
Reference in New Issue
Block a user