Skip to content

Commit

Permalink
Rekado 4.1.3
Browse files Browse the repository at this point in the history
- Fixed: Crash on the app startup.
  • Loading branch information
MenosGrante committed Apr 19, 2021
1 parent bf7e335 commit 535c8b6
Show file tree
Hide file tree
Showing 17 changed files with 70 additions and 57 deletions.
3 changes: 1 addition & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable true
}
}

Expand Down Expand Up @@ -68,7 +68,6 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-common-java8:$androidXLifecycleVersion"
implementation "androidx.navigation:navigation-fragment-ktx:$androidXNavigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$androidXNavigationVersion"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:$androidXSwipeToRefreshLayoutVersion"

// Google: Design
implementation "com.google.android.material:material:$materialComponentsVersion"
Expand Down
Binary file modified app/libs/magta.aar
Binary file not shown.
Binary file modified app/libs/penza.aar
Binary file not shown.
32 changes: 0 additions & 32 deletions app/proguard-rules.pro

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import com.pavelrekun.magta.design.resolveColorAttribute
import com.pavelrekun.magta.design.tintNavigationBar
import com.pavelrekun.magta.design.tintTaskDescription
import com.pavelrekun.penza.base.PenzaActivity
import com.pavelrekun.penza.services.helpers.ColorsHelper
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.containers.PrimaryContainerActivity

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package com.pavelrekun.rekado.screens.about_fragment
import android.os.Bundle
import android.view.View
import com.pavelrekun.magta.services.constants.Links
import com.pavelrekun.magta.system.viewBinding
import com.pavelrekun.rekado.BuildConfig
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentAboutBinding
import com.pavelrekun.rekado.services.Constants
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.services.utils.Utils
import dev.chrisbanes.insetter.applyInsetter

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.pavelrekun.rekado.screens.instructions_fragment

import android.os.Bundle
import android.view.View
import com.pavelrekun.magta.system.viewBinding
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentInstructionsBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.pavelrekun.magta.design.tintContrast
import com.pavelrekun.magta.system.viewBinding
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentLogsBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import androidx.fragment.app.activityViewModels
import androidx.recyclerview.widget.LinearLayoutManager
import com.pavelrekun.magta.design.tintContrast
import com.pavelrekun.magta.system.extractFileName
import com.pavelrekun.magta.system.viewBinding
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentPayloadsBinding
Expand Down Expand Up @@ -166,10 +166,10 @@ class PayloadsFragment : BaseFragment(R.layout.fragment_payloads) {
}
}

@Subscribe(threadMode = ThreadMode.MAIN)
/* @Subscribe(threadMode = ThreadMode.MAIN)
fun onEvent(event: Events.UpdatePayloadsListEvent) {
updateList()
}
}*/

override fun onResume() {
super.onResume()
Expand All @@ -183,14 +183,14 @@ class PayloadsFragment : BaseFragment(R.layout.fragment_payloads) {
}
}

override fun onStart() {
/* override fun onStart() {
super.onStart()
EventBus.getDefault().register(this)
}
override fun onStop() {
super.onStop()
EventBus.getDefault().unregister(this)
}
}*/

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import android.widget.Toast
import com.google.zxing.integration.android.IntentIntegrator
import com.pavelrekun.magta.design.getString
import com.pavelrekun.magta.design.isEmpty
import com.pavelrekun.magta.system.viewBinding
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentSerialCheckerBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.pavelrekun.rekado.screens.tools_fragment

import android.os.Bundle
import android.view.View
import com.pavelrekun.magta.system.viewBinding
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentToolsBinding
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package com.pavelrekun.rekado.services.extensions

import android.view.View
import androidx.fragment.app.Fragment
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.Observer
import androidx.viewbinding.ViewBinding
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty

class FragmentViewBindingDelegate<T : ViewBinding>(
val fragment: Fragment,
val viewBindingFactory: (View) -> T
) : ReadOnlyProperty<Fragment, T> {
private var binding: T? = null

init {
fragment.lifecycle.addObserver(object : DefaultLifecycleObserver {
override fun onCreate(owner: LifecycleOwner) {
fragment.viewLifecycleOwnerLiveData.observe(fragment, Observer {
it.lifecycle.addObserver(object : DefaultLifecycleObserver {
override fun onDestroy(owner: LifecycleOwner) {
binding = null
}
})
})
}
})
}

override fun getValue(thisRef: Fragment, property: KProperty<*>): T {
val binding = binding
if (binding != null) {
return binding
}

val lifecycle = fragment.viewLifecycleOwner.lifecycle
if (!lifecycle.currentState.isAtLeast(Lifecycle.State.INITIALIZED)) {
throw IllegalStateException("Should not attempt to get bindings when Fragment views are destroyed.")
}

return viewBindingFactory(thisRef.requireView()).also { this@FragmentViewBindingDelegate.binding = it }
}
}

fun <T : ViewBinding> Fragment.viewBinding(viewBindingFactory: (View) -> T) =
FragmentViewBindingDelegate(this, viewBindingFactory)
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class USBReceiver : BaseActivity() {
finishReceiver()
}

@Subscribe(threadMode = ThreadMode.MAIN)
/* @Subscribe(threadMode = ThreadMode.MAIN)
fun onEvent(event: Events.PayloadSelected) {
injectPayload()
}
Expand All @@ -77,7 +77,7 @@ class USBReceiver : BaseActivity() {
override fun onStop() {
EventBus.getDefault().unregister(this)
super.onStop()
}
}*/

private fun finishReceiver() {
if (this::payloadChooserDialog.isInitialized && payloadChooserDialog.isShowing) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<string name="instructions_category_cable">Câble</string>
<string name="instructions_category_cable_description">Pour commencer, vous devez avoir un câble pour connecter votre appareil à la Switch. Pour un bon fonctionnement, le câble doit permettre la transmission de données, pas seulement charger la batterie.\n\nIl est conseillé d\'utiliser un câble USB type A vers type C et un adaptateur USB OTG.</string>
<string name="instructions_category_payload">Payload</string>
<string name="instructions_category_payload_description">Dans la cat\u00e9gorie \"Payloads\", cliquez sur le bouton \"+\" pour s\u00e9lectionner un payload depuis le stockage de votre t\u00e9l\u00e9phone. Ou bien mettez simplement votre payload dans le dossier Rekado de votre t\u00e9l\u00e9phone (/sdcard/Android/data/com.pavelrekun.rekado/files/).\n\nOu vous pouvez utiliser les payloads int\u00e9gr\u00e9s (Hekate/ReiNX/Fusee Primary)</string>
<string name="instructions_category_payload_description">Dans la cat\u00e9gorie \"Payloads\", cliquez sur le bouton \"+\" pour s\u00e9lectionner un payload depuis le stockage de votre t\u00e9l\u00e9phone. Ou bien mettez simplement votre payload dans le dossier Rekado de votre t\u00e9l\u00e9phone (/sdcard/Android/data/com.pavelrekun.rekado/files/).\n\nOu vous pouvez utiliser les payloads int\u00e9gr\u00e9s (Hekate/Fusee Primary/ReiNX)</string>
<string name="instructions_category_rcm_description">Mettez votre Switch en mode RCM par la méthode de votre choix. \n\nVotre Switch démarrera automatiquement lorsque vous brancherez le câble, veuillez vous assurer que vous appuyez sur le bouton VOLUME + de la Switch avant le branchement.</string>
<string name="instructions_category_final">Finalement</string>
<string name="instructions_category_final_description">Connectez votre appareil à la Switch et autorisez la permission pour l\'accès USB si nécessaire. Attendez que l\'application ouvre le menu de choix de payload et sélectionner celui que vous voulez injecter.</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<string name="instructions_category_cable">Кабель</string>
<string name="instructions_category_cable_description">Во-первых, вам нужно найти кабель для подключения вашего устройства к Nintendo Switch. Для правильной работы это должен быть кабель, предназначенный для передачи данных, а не только для зарядки.\n\nРекомендуется использовать кабель A-to-C и адаптер USB OTG.</string>
<string name="instructions_category_payload">Загрузчик</string>
<string name="instructions_category_payload_description">\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 (\u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab+\u00bb), \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e \u043f\u0440\u044f\u043c\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435 (\u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u0441\u043e \u0437\u043d\u0430\u0447\u043a\u043e\u043c \u00ab\u043e\u0431\u043b\u0430\u043a\u0430\u00bb) \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u00ab\u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0438\u00bb \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 Rekado (/sdcard/Android/data/com.pavelrekun.rekado/files/).\n\n\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432 (Hekate/ReiNX/Fusee Primary).</string>
<string name="instructions_category_payload_description">\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 (\u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab+\u00bb), \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e \u043f\u0440\u044f\u043c\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435 (\u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u0441\u043e \u0437\u043d\u0430\u0447\u043a\u043e\u043c \u00ab\u043e\u0431\u043b\u0430\u043a\u0430\u00bb) \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u00ab\u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0438\u00bb \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 Rekado (/sdcard/Android/data/com.pavelrekun.rekado/files/).\n\n\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432 (Hekate/Fusee Primary/ReiNX).</string>
<string name="instructions_category_rcm_description">Введите ваш Nintendo Switch в режим RCM любым удобным способом.\n\nВаш Nintendo Switch включается сам по себе, когда он подключен, обязательно удерживайте «VOLUME +».</string>
<string name="instructions_category_final">Заключение</string>
<string name="instructions_category_final_description">Подключите устройство к Nintendo Switch и при необходимости разрешите доступ к USB. Откроется диалоговое окно «Выбор загрузчика» и выберите, какой из них вы хотите загрузить.</string>
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ buildscript {
ext {

// Version
appVersionCode = 75
appVersionName = "4.1.2"
appVersionCode = 76
appVersionName = "4.1.3"

currentSDKVersion = 30
minimumSDKVersion = 21
Expand All @@ -20,11 +20,11 @@ buildscript {
androidXCoreVersion = '1.3.2'
androidXCompatVersion = '1.2.0'
androidXBrowserVersion = '1.3.0'
androidXRecyclerViewVersion = '1.1.0'
androidXRecyclerViewVersion = '1.2.0'
androidXPreferencesVersion = '1.1.1'
androidXConstraintLayoutVersion = '2.0.4'
androidXLifecycleVersion = '2.3.1'
androidXNavigationVersion = '2.3.4'
androidXNavigationVersion = '2.3.5'
androidXSwipeToRefreshLayoutVersion = '1.1.0'

// Google: Design
Expand Down
6 changes: 2 additions & 4 deletions gradle/updates.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ apply plugin: "com.github.ben-manes.versions"
dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'cr', 'm', 'M1'].any { qualifier ->
if (!allowed) {
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'M1'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}

if (rejected) {
Expand Down

0 comments on commit 535c8b6

Please sign in to comment.