kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
1.1.35 fix nasty progress related bug in firmware update
rodzic
a20fffcc2c
commit
3835a85b8e
|
@ -31,8 +31,8 @@ android {
|
||||||
applicationId "com.geeksville.mesh"
|
applicationId "com.geeksville.mesh"
|
||||||
minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works)
|
minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works)
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 20134 // format is Mmmss (where M is 1+the numeric major number
|
versionCode 20135 // format is Mmmss (where M is 1+the numeric major number
|
||||||
versionName "1.1.34"
|
versionName "1.1.35"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|
|
@ -194,16 +194,21 @@ class SoftwareUpdateService : JobIntentService(), Logging {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* true if we are busy with an update right now
|
||||||
|
*/
|
||||||
|
val isUpdating get() = progress >= 0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update our progress indication for GUIs
|
* Update our progress indication for GUIs
|
||||||
*
|
*
|
||||||
* @param isAppload if false, we don't report failure indications (because we consider spiffs non critical for now). But do report to analytics
|
* @param isAppload if false, we don't report failure indications (because we consider spiffs non critical for now). But do report to analytics
|
||||||
*/
|
*/
|
||||||
fun sendProgress(context: Context, p: Int, isAppload: Boolean) {
|
fun sendProgress(context: Context, p: Int, isAppload: Boolean) {
|
||||||
if(!isAppload && progress < 0)
|
if(!isAppload && p < 0)
|
||||||
reportError("Error while writing spiffs $progress") // See if this is happening in the wild
|
reportError("Error while writing spiffs $progress") // See if this is happening in the wild
|
||||||
|
|
||||||
if(progress != p && (progress >= 0 || isAppload)) {
|
if(progress != p && (p >= 0 || isAppload)) {
|
||||||
progress = p
|
progress = p
|
||||||
|
|
||||||
val intent = Intent(ACTION_UPDATE_PROGRESS).putExtra(
|
val intent = Intent(ACTION_UPDATE_PROGRESS).putExtra(
|
||||||
|
|
Ładowanie…
Reference in New Issue