Skip to content

Commit

Permalink
Rekado 4.0.1
Browse files Browse the repository at this point in the history
- Fixed: Can't add payloads from internal storage.
- Updated: All bundled payloads to the latest versions.
  • Loading branch information
MenosGrante committed May 8, 2020
1 parent 39db7ba commit 26f68a6
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 33 deletions.
34 changes: 6 additions & 28 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@ proguard/
captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
.idea

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
Expand Down Expand Up @@ -117,25 +110,6 @@ obj/
*.iws
/out/

# User-specific configurations
.idea/caches/
.idea/libraries/
.idea/shelf/
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

# OS-specific files
.DS_Store
.DS_Store?
Expand Down Expand Up @@ -180,4 +154,8 @@ fabric.properties

### AndroidStudio Patch ###

!/gradle/wrapper/gradle-wrapper.jar
!/gradle/wrapper/gradle-wrapper.jar


# NDK
app/.cxx
19 changes: 19 additions & 0 deletions Rekado.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="Rekado" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "com.pavelrekun.rekado"
minSdkVersion minimumSDKVersion
targetSdkVersion currentSDKVersion
versionCode 70
versionName "4.0"
versionCode 71
versionName "4.0.1"

archivesBaseName = "[$versionName] Rekado [${versionCode}]"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.pavelrekun.rekado.screens.payload_fragment

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.view.View
Expand All @@ -15,6 +16,7 @@ import com.pavelrekun.rekado.services.Constants
import com.pavelrekun.rekado.services.Events
import com.pavelrekun.rekado.services.utils.LoginUtils
import com.pavelrekun.rekado.services.dialogs.DialogsShower
import com.pavelrekun.rekado.services.extensions.extractFileName
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.services.payloads.PayloadDownloadHelper
import com.pavelrekun.rekado.services.payloads.PayloadHelper
Expand Down Expand Up @@ -81,6 +83,33 @@ class PayloadsFragment : BaseFragment(R.layout.fragment_payloads) {
})
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)

if (requestCode == Constants.KEY_OPEN_PAYLOAD) {
when (resultCode) {
Activity.RESULT_OK -> data?.data?.let {
val name = it.extractFileName()
if (name != null) {
val inputStream = getBaseActivity().contentResolver.openInputStream(it)

if (inputStream != null) {
MemoryUtils.copyPayload(inputStream, name)
EventBus.getDefault().post(Events.UpdatePayloadsListEvent())
LoginUtils.info("Added new payload: $name")
} else {
Toast.makeText(requireContext(), R.string.helper_error_adding_payload, Toast.LENGTH_SHORT).show()
LoginUtils.error("Failed to add payload: $name")
}
} else {
Toast.makeText(requireContext(), R.string.helper_error_adding_payload, Toast.LENGTH_SHORT).show()
LoginUtils.error("Failed to add selected payload!")
}
}
}
}
}

private fun initList() {
MemoryUtils.parseBundledSchema()

Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/raw/bundled_payloads.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"timestamp":1586248849,
"timestamp": 1588755094,
"type": 0,
"payloads":[
{
Expand All @@ -10,12 +10,12 @@
{
"title":"hekate.bin",
"downloadUrl": "https://pavelrekun.dev/payloads/hekate.bin",
"version":"5.1.3"
"version":"5.2.1"
},
{
"title":"fusee_primary.bin",
"downloadUrl": "https://pavelrekun.dev/payloads/fusee_primary.bin",
"version":"0.10.5"
"version":"0.12.0"
}
]
}
Binary file modified app/src/main/res/raw/hekate.bin
Binary file not shown.

0 comments on commit 26f68a6

Please sign in to comment.