diff --git a/app/build.gradle b/app/build.gradle index 3051ab6..79101c0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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 + ')' @@ -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' diff --git a/app/release/app-release.aab b/app/release/app-release.aab new file mode 100644 index 0000000..21b123c Binary files /dev/null and b/app/release/app-release.aab differ diff --git a/app/release/app-release.apk b/app/release/app-release.apk index d00fe61..bf2fa58 100644 Binary files a/app/release/app-release.apk and b/app/release/app-release.apk differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index 8fda8d8..5b2ce7f 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -11,8 +11,8 @@ "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 10, - "versionName": "1.5", + "versionCode": 12, + "versionName": "1.7", "outputFile": "app-release.apk" } ], diff --git a/app/src/main/java/dev/rohitverma882/heimdoo/MainActivity.kt b/app/src/main/java/dev/rohitverma882/heimdoo/MainActivity.kt index 5267fbb..1f10784 100644 --- a/app/src/main/java/dev/rohitverma882/heimdoo/MainActivity.kt +++ b/app/src/main/java/dev/rohitverma882/heimdoo/MainActivity.kt @@ -43,12 +43,14 @@ import java.io.File class MainActivity : AppCompatActivity() { private lateinit var binding: ActivityMainBinding + private val openDevices: MutableMap = HashMap() + private var cleanCachedImgs: Boolean = true; + private val usbManager: UsbManager by lazy { (getSystemService( Context.USB_SERVICE ) as UsbManager) } - private val openDevices: MutableMap = HashMap() private val resultReceiver = object : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent?) { @@ -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?) { @@ -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)