mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-18 12:56:45 -06:00
Merge branch 'develop'
This commit is contained in:
commit
ef0996c80e
@ -70,9 +70,11 @@ android {
|
|||||||
sourceSets {
|
sourceSets {
|
||||||
unofficial {
|
unofficial {
|
||||||
java.srcDirs = ["src/main/java", "src/play-not/java"]
|
java.srcDirs = ["src/main/java", "src/play-not/java"]
|
||||||
|
manifest.srcFile("src/play-not/AndroidManifest.xml")
|
||||||
}
|
}
|
||||||
official {
|
official {
|
||||||
java.srcDirs = ["src/main/java", "src/play-not/java"]
|
java.srcDirs = ["src/main/java", "src/play-not/java"]
|
||||||
|
manifest.srcFile("src/play-not/AndroidManifest.xml")
|
||||||
}
|
}
|
||||||
play {
|
play {
|
||||||
java.srcDirs = ["src/main/java", "src/play/java"]
|
java.srcDirs = ["src/main/java", "src/play/java"]
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="pl.szczodrzynski.edziennik">
|
package="pl.szczodrzynski.edziennik">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<h3>Wersja 4.11.8, 2022-09-17</h3>
|
<h3>Wersja 4.12.1, 2022-09-23</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Vulcan UONET+: naprawiono działanie systemu wiadomości. @Antoni-Czaplicki</li>
|
<li>Vulcan UONET+: naprawiono działanie systemu wiadomości. @Antoni-Czaplicki</li>
|
||||||
|
<li>Vulcan UONET+: naprawiono błędy wersji 4.11.9 i starszych.</li>
|
||||||
<li>Poprawiono wyświetlanie lekcji odwołanych na stronie głównej.</li>
|
<li>Poprawiono wyświetlanie lekcji odwołanych na stronie głównej.</li>
|
||||||
<li>Dodano dostęp do Laboratorium na ekranie logowania.</li>
|
<li>Dodano dostęp do Laboratorium na ekranie logowania.</li>
|
||||||
<li>Usunięto obsługę dziennika EduDziennik. [*]</li>
|
<li>Usunięto obsługę dziennika EduDziennik. [*]</li>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
/*secret password - removed for source code publication*/
|
/*secret password - removed for source code publication*/
|
||||||
static toys AES_IV[16] = {
|
static toys AES_IV[16] = {
|
||||||
0xb2, 0x96, 0xab, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
0xdf, 0xe4, 0x2d, 0xa3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||||
|
|
||||||
unsigned char *agony(unsigned int laugh, unsigned char *box, unsigned char *heat);
|
unsigned char *agony(unsigned int laugh, unsigned char *box, unsigned char *heat);
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ const val ENDPOINT_VULCAN_WEB_LUCKY_NUMBERS = 2010
|
|||||||
const val ENDPOINT_VULCAN_HEBE_MAIN = 3000
|
const val ENDPOINT_VULCAN_HEBE_MAIN = 3000
|
||||||
const val ENDPOINT_VULCAN_HEBE_PUSH_CONFIG = 3005
|
const val ENDPOINT_VULCAN_HEBE_PUSH_CONFIG = 3005
|
||||||
const val ENDPOINT_VULCAN_HEBE_ADDRESSBOOK = 3010
|
const val ENDPOINT_VULCAN_HEBE_ADDRESSBOOK = 3010
|
||||||
const val ENDPOINT_VULCAN_HEBE_ADDRESSBOOK_2 = 3011
|
const val ENDPOINT_VULCAN_HEBE_ADDRESSBOOK_2 = 3501 // after message boxes (3500)
|
||||||
const val ENDPOINT_VULCAN_HEBE_TIMETABLE = 3020
|
const val ENDPOINT_VULCAN_HEBE_TIMETABLE = 3020
|
||||||
const val ENDPOINT_VULCAN_HEBE_EXAMS = 3030
|
const val ENDPOINT_VULCAN_HEBE_EXAMS = 3030
|
||||||
const val ENDPOINT_VULCAN_HEBE_GRADES = 3040
|
const val ENDPOINT_VULCAN_HEBE_GRADES = 3040
|
||||||
@ -87,8 +87,8 @@ val VulcanFeatures = listOf(
|
|||||||
Feature(LOGIN_TYPE_VULCAN, FEATURE_ALWAYS_NEEDED, listOf(
|
Feature(LOGIN_TYPE_VULCAN, FEATURE_ALWAYS_NEEDED, listOf(
|
||||||
ENDPOINT_VULCAN_HEBE_MAIN to LOGIN_METHOD_VULCAN_HEBE,
|
ENDPOINT_VULCAN_HEBE_MAIN to LOGIN_METHOD_VULCAN_HEBE,
|
||||||
ENDPOINT_VULCAN_HEBE_ADDRESSBOOK to LOGIN_METHOD_VULCAN_HEBE,
|
ENDPOINT_VULCAN_HEBE_ADDRESSBOOK to LOGIN_METHOD_VULCAN_HEBE,
|
||||||
ENDPOINT_VULCAN_HEBE_ADDRESSBOOK_2 to LOGIN_METHOD_VULCAN_HEBE,
|
|
||||||
ENDPOINT_VULCAN_HEBE_TEACHERS to LOGIN_METHOD_VULCAN_HEBE,
|
ENDPOINT_VULCAN_HEBE_TEACHERS to LOGIN_METHOD_VULCAN_HEBE,
|
||||||
ENDPOINT_VULCAN_HEBE_MESSAGE_BOXES to LOGIN_METHOD_VULCAN_HEBE,
|
ENDPOINT_VULCAN_HEBE_MESSAGE_BOXES to LOGIN_METHOD_VULCAN_HEBE,
|
||||||
|
ENDPOINT_VULCAN_HEBE_ADDRESSBOOK_2 to LOGIN_METHOD_VULCAN_HEBE,
|
||||||
), listOf(LOGIN_METHOD_VULCAN_HEBE))
|
), listOf(LOGIN_METHOD_VULCAN_HEBE))
|
||||||
)
|
)
|
||||||
|
@ -14,6 +14,7 @@ import pl.szczodrzynski.edziennik.data.db.entity.Teacher.Companion.TYPE_PARENT
|
|||||||
import pl.szczodrzynski.edziennik.data.db.entity.Teacher.Companion.TYPE_STUDENT
|
import pl.szczodrzynski.edziennik.data.db.entity.Teacher.Companion.TYPE_STUDENT
|
||||||
import pl.szczodrzynski.edziennik.data.db.entity.Teacher.Companion.TYPE_TEACHER
|
import pl.szczodrzynski.edziennik.data.db.entity.Teacher.Companion.TYPE_TEACHER
|
||||||
import pl.szczodrzynski.edziennik.ext.DAY
|
import pl.szczodrzynski.edziennik.ext.DAY
|
||||||
|
import pl.szczodrzynski.edziennik.ext.MINUTE
|
||||||
import pl.szczodrzynski.edziennik.ext.getString
|
import pl.szczodrzynski.edziennik.ext.getString
|
||||||
|
|
||||||
class VulcanHebeAddressbook2(
|
class VulcanHebeAddressbook2(
|
||||||
@ -25,7 +26,13 @@ class VulcanHebeAddressbook2(
|
|||||||
const val TAG = "VulcanHebeAddressbook2"
|
const val TAG = "VulcanHebeAddressbook2"
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init { let {
|
||||||
|
if (data.messageBoxKey == null) {
|
||||||
|
data.setSyncNext(ENDPOINT_VULCAN_HEBE_ADDRESSBOOK_2, 30 * MINUTE)
|
||||||
|
onSuccess(ENDPOINT_VULCAN_HEBE_ADDRESSBOOK_2)
|
||||||
|
return@let
|
||||||
|
}
|
||||||
|
|
||||||
apiGetList(
|
apiGetList(
|
||||||
TAG,
|
TAG,
|
||||||
VULCAN_HEBE_ENDPOINT_MESSAGEBOX_ADDRESSBOOK,
|
VULCAN_HEBE_ENDPOINT_MESSAGEBOX_ADDRESSBOOK,
|
||||||
@ -50,5 +57,5 @@ class VulcanHebeAddressbook2(
|
|||||||
data.setSyncNext(ENDPOINT_VULCAN_HEBE_ADDRESSBOOK_2, 2 * DAY)
|
data.setSyncNext(ENDPOINT_VULCAN_HEBE_ADDRESSBOOK_2, 2 * DAY)
|
||||||
onSuccess(ENDPOINT_VULCAN_HEBE_ADDRESSBOOK_2)
|
onSuccess(ENDPOINT_VULCAN_HEBE_ADDRESSBOOK_2)
|
||||||
}
|
}
|
||||||
}
|
}}
|
||||||
}
|
}
|
||||||
|
@ -26,16 +26,24 @@ class VulcanHebeMessageBoxes(
|
|||||||
VULCAN_HEBE_ENDPOINT_MESSAGEBOX,
|
VULCAN_HEBE_ENDPOINT_MESSAGEBOX,
|
||||||
lastSync = lastSync
|
lastSync = lastSync
|
||||||
) { list, _ ->
|
) { list, _ ->
|
||||||
|
var found = false
|
||||||
for (messageBox in list) {
|
for (messageBox in list) {
|
||||||
val name = messageBox.getString("Name") ?: continue
|
val name = messageBox.getString("Name") ?: continue
|
||||||
val studentName = profile?.studentNameLong ?: continue
|
val studentName = profile?.studentNameLong ?: continue
|
||||||
if (!name.startsWith(studentName))
|
if (!name.contains(studentName))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
data.messageBoxKey = messageBox.getString("GlobalKey")
|
data.messageBoxKey = messageBox.getString("GlobalKey")
|
||||||
data.messageBoxName = name
|
data.messageBoxName = name
|
||||||
|
found = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
if (!found && list.isNotEmpty()) {
|
||||||
|
list.firstOrNull()?.let { messageBox ->
|
||||||
|
data.messageBoxKey = messageBox.getString("GlobalKey")
|
||||||
|
data.messageBoxName = messageBox.getString("Name")
|
||||||
|
}
|
||||||
|
}
|
||||||
data.setSyncNext(ENDPOINT_VULCAN_HEBE_MESSAGE_BOXES, 7 * DAY)
|
data.setSyncNext(ENDPOINT_VULCAN_HEBE_MESSAGE_BOXES, 7 * DAY)
|
||||||
onSuccess(ENDPOINT_VULCAN_HEBE_MESSAGE_BOXES)
|
onSuccess(ENDPOINT_VULCAN_HEBE_MESSAGE_BOXES)
|
||||||
}
|
}
|
||||||
|
@ -98,9 +98,6 @@ class VulcanHebeMessages(
|
|||||||
val receivers = message.getJsonArray("Receiver")
|
val receivers = message.getJsonArray("Receiver")
|
||||||
?.asJsonObjectList()
|
?.asJsonObjectList()
|
||||||
?: return@forEach
|
?: return@forEach
|
||||||
val receiverReadDate =
|
|
||||||
if (receivers.size == 1) readDate
|
|
||||||
else -1
|
|
||||||
|
|
||||||
for (receiver in receivers) {
|
for (receiver in receivers) {
|
||||||
val recipientId = if (messageType == TYPE_SENT)
|
val recipientId = if (messageType == TYPE_SENT)
|
||||||
@ -108,6 +105,8 @@ class VulcanHebeMessages(
|
|||||||
else
|
else
|
||||||
-1
|
-1
|
||||||
|
|
||||||
|
val receiverReadDate = receiver.getLong("HasRead", -1)
|
||||||
|
|
||||||
val messageRecipientObject = MessageRecipient(
|
val messageRecipientObject = MessageRecipient(
|
||||||
profileId,
|
profileId,
|
||||||
recipientId,
|
recipientId,
|
||||||
|
@ -24,7 +24,7 @@ class VulcanHebeMessagesChangeStatus(
|
|||||||
}
|
}
|
||||||
|
|
||||||
init { let {
|
init { let {
|
||||||
val messageKey = messageObject.body?.let { data.parseMessageMeta(it) }?.get("globalKey") ?: run {
|
val messageKey = messageObject.body?.let { data.parseMessageMeta(it) }?.get("uuid") ?: run {
|
||||||
EventBus.getDefault().postSticky(MessageGetEvent(messageObject))
|
EventBus.getDefault().postSticky(MessageGetEvent(messageObject))
|
||||||
onSuccess()
|
onSuccess()
|
||||||
return@let
|
return@let
|
||||||
|
@ -46,6 +46,6 @@ object Signing {
|
|||||||
|
|
||||||
/*fun provideKey(param1: String, param2: Long): ByteArray {*/
|
/*fun provideKey(param1: String, param2: Long): ByteArray {*/
|
||||||
fun pleaseStopRightNow(param1: String, param2: Long): ByteArray {
|
fun pleaseStopRightNow(param1: String, param2: Long): ByteArray {
|
||||||
return "$param1.MTIzNDU2Nzg5MDYFZwkReL===.$param2".sha256()
|
return "$param1.MTIzNDU2Nzg5MDJgAI/q8c===.$param2".sha256()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,12 +156,12 @@ class LoginFormFragment : Fragment(), CoroutineScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (credential.qrDecoderClass != null) {
|
if (credential.qrDecoderClass != null) {
|
||||||
|
b.textLayout.endIconMode = TextInputLayout.END_ICON_CUSTOM
|
||||||
b.textLayout.endIconDrawable = IconicsDrawable(activity).apply {
|
b.textLayout.endIconDrawable = IconicsDrawable(activity).apply {
|
||||||
icon = CommunityMaterial.Icon3.cmd_qrcode
|
icon = CommunityMaterial.Icon3.cmd_qrcode
|
||||||
sizeDp = 24
|
sizeDp = 24
|
||||||
colorAttr(activity, R.attr.colorOnBackground)
|
colorAttr(activity, R.attr.colorOnBackground)
|
||||||
}
|
}
|
||||||
b.textLayout.endIconMode = TextInputLayout.END_ICON_CUSTOM
|
|
||||||
b.textLayout.setEndIconOnClickListener {
|
b.textLayout.setEndIconOnClickListener {
|
||||||
scanQrCode(credential)
|
scanQrCode(credential)
|
||||||
}
|
}
|
||||||
|
@ -409,7 +409,7 @@ class WidgetTimetableProvider : AppWidgetProvider() {
|
|||||||
// create an intent used to display the lesson details dialog
|
// create an intent used to display the lesson details dialog
|
||||||
val itemIntent = Intent(app, LessonDialogActivity::class.java)
|
val itemIntent = Intent(app, LessonDialogActivity::class.java)
|
||||||
itemIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK/* or Intent.FLAG_ACTIVITY_CLEAR_TASK*/)
|
itemIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK/* or Intent.FLAG_ACTIVITY_CLEAR_TASK*/)
|
||||||
val itemPendingIntent = PendingIntent.getActivity(app, appWidgetId, itemIntent, pendingIntentFlag())
|
val itemPendingIntent = PendingIntent.getActivity(app, appWidgetId, itemIntent, PendingIntent.FLAG_MUTABLE)
|
||||||
views.setPendingIntentTemplate(R.id.widgetTimetableListView, itemPendingIntent)
|
views.setPendingIntentTemplate(R.id.widgetTimetableListView, itemPendingIntent)
|
||||||
|
|
||||||
if (!unified)
|
if (!unified)
|
||||||
|
5
app/src/play-not/AndroidManifest.xml
Normal file
5
app/src/play-not/AndroidManifest.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||||
|
</manifest>
|
@ -5,8 +5,8 @@ buildscript {
|
|||||||
kotlin_version = '1.6.10'
|
kotlin_version = '1.6.10'
|
||||||
|
|
||||||
release = [
|
release = [
|
||||||
versionName: "4.11.8",
|
versionName: "4.12.1",
|
||||||
versionCode: 4110899
|
versionCode: 4120199
|
||||||
]
|
]
|
||||||
|
|
||||||
setup = [
|
setup = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user