Warn that drive size can't be checked with DMG images

This commit is contained in:
Davide Depau 2018-08-17 02:50:18 +02:00
parent 4ee420c965
commit fc64d7929f
2 changed files with 10 additions and 3 deletions

View file

@ -7,10 +7,10 @@ import android.view.View
import android.view.ViewGroup
import eu.depau.etchdroid.R
import eu.depau.etchdroid.StateKeeper
import eu.depau.etchdroid.services.UsbAPIWriteService
import eu.depau.etchdroid.kotlin_exts.*
import eu.depau.etchdroid.enums.FlashMethod
import eu.depau.etchdroid.enums.WizardStep
import eu.depau.etchdroid.kotlin_exts.*
import eu.depau.etchdroid.services.UsbAPIWriteService
import kotlinx.android.synthetic.main.fragment_confirminfo.view.*
import java.io.IOException
@ -73,7 +73,13 @@ class ConfirmInfoFragment : WizardFragment() {
if (imgSize!! > devSize)
view.confirm_extra_info.text = getString(R.string.image_bigger_than_usb)
else {
view.confirm_extra_info.text = getString(R.string.tap_next_to_write)
var text =
if (StateKeeper.flashMethod == FlashMethod.FLASH_DMG_API)
getString(R.string.no_image_size_check_dmg) + "\n"
else
""
text += getString(R.string.tap_next_to_write)
view.confirm_extra_info.text = text
canContinue = true
}
} else {

View file

@ -71,4 +71,5 @@
<string name="fs_label">Label</string>
<string name="fs_type">Type</string>
<string name="part_size">Size</string>
<string name="no_image_size_check_dmg">Image size checks can\'t be performed on DMG images. Make sure the USB drive is large enough before flashing.</string>
</resources>