Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
RohitVerma882 committed Jul 14, 2023
1 parent 47d0934 commit b2b0de0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
9 changes: 4 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ android {
applicationId "dev.rohitverma882.heimdoo"
minSdk 24
targetSdk 34
versionCode 11
versionName "1.6"

versionCode 12
versionName "1.7"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resValue 'string', 'app_version', versionName + ' (' + versionCode + ')'

Expand Down Expand Up @@ -67,8 +66,8 @@ dependencies {
implementation 'dev.rikka.rikkax.html:html-ktx:1.1.2'
implementation 'dev.rikka.ndk.thirdparty:cxx:1.2.0'

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.2'

implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
Expand Down
Binary file added app/release/app-release.aab
Binary file not shown.
Binary file modified app/release/app-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 10,
"versionName": "1.5",
"versionCode": 12,
"versionName": "1.7",
"outputFile": "app-release.apk"
}
],
Expand Down
8 changes: 6 additions & 2 deletions app/src/main/java/dev/rohitverma882/heimdoo/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ import java.io.File
class MainActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding

private val openDevices: MutableMap<String, UsbDeviceConnection> = HashMap()
private var cleanCachedImgs: Boolean = true;

private val usbManager: UsbManager by lazy {
(getSystemService(
Context.USB_SERVICE
) as UsbManager)
}
private val openDevices: MutableMap<String, UsbDeviceConnection> = HashMap()

private val resultReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent?) {
Expand Down Expand Up @@ -101,10 +103,12 @@ class MainActivity : AppCompatActivity() {

private val openDocumentLauncher = registerOpenDocumentLauncher("*/*") { uri: Uri? ->
processFileSelected(uri)
cleanCachedImgs = false
}

private val getContentLauncher = registerGetContentLauncher("*/*") { uri: Uri? ->
processFileSelected(uri)
cleanCachedImgs = false
}

override fun onCreate(savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -275,7 +279,7 @@ class MainActivity : AppCompatActivity() {
Intent(this, FileCacheService::class.java).apply {
action = FileCacheService.ACTION_COPY_TO_CACHE
putExtra(FileCacheService.KEY_DEST_DIR, imgCacheDir)
putExtra(FileCacheService.KEY_DELETE_DEST_DIR_CONTENT, true)
putExtra(FileCacheService.KEY_DELETE_DEST_DIR_CONTENT, cleanCachedImgs)
putExtra(FileCacheService.KEY_SRC_FILE_URI, any)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
setPackage(packageName)
Expand Down

0 comments on commit b2b0de0

Please sign in to comment.