OpenDelta: add error state for failing to create flash setup
sometimes /cache is full - so signal that to the user and dont just fail silently Change-Id: I1a5455381381f0ad316a302811e23962dc7261f4
This commit is contained in:
parent
9e67304d33
commit
ac1f262a8f
|
@ -105,4 +105,5 @@
|
|||
<string name="clear_files_summary">Delete existing update files to force downloading full update</string>
|
||||
<string name="clean_files_feedback" formatted="false">Deleted %d files. Now press \'Check for updates\'</string>
|
||||
<string name="state_error_permissions">No storage permissions.</string>
|
||||
<string name="state_error_flash">Failed to setup flash. Clean /cache and retry.</string>
|
||||
</resources>
|
||||
|
|
|
@ -257,6 +257,10 @@ public class MainActivity extends Activity {
|
|||
progress.setIndeterminate(false);
|
||||
} else if (UpdateService.STATE_ERROR_PERMISSIONS.equals(state)) {
|
||||
progress.setIndeterminate(false);
|
||||
} else if (UpdateService.STATE_ERROR_FLASH.equals(state)) {
|
||||
enableCheck = true;
|
||||
enableFlash = true;
|
||||
progress.setIndeterminate(false);
|
||||
} else if (UpdateService.STATE_ACTION_NONE.equals(state)) {
|
||||
enableCheck = true;
|
||||
progress.setIndeterminate(false);
|
||||
|
|
|
@ -152,6 +152,7 @@ OnWantUpdateCheckListener, OnSharedPreferenceChangeListener {
|
|||
public static final String STATE_ERROR_DOWNLOAD = "error_download";
|
||||
public static final String STATE_ERROR_CONNECTION = "error_connection";
|
||||
public static final String STATE_ERROR_PERMISSIONS = "error_permissions";
|
||||
public static final String STATE_ERROR_FLASH = "error_flash";
|
||||
|
||||
private static final String ACTION_CHECK = "eu.chainfire.opendelta.action.CHECK";
|
||||
private static final String ACTION_FLASH = "eu.chainfire.opendelta.action.FLASH";
|
||||
|
@ -1608,6 +1609,7 @@ OnWantUpdateCheckListener, OnSharedPreferenceChangeListener {
|
|||
// else to do at
|
||||
// at this stage than give up. No reason to crash though.
|
||||
Logger.ex(e);
|
||||
updateState(STATE_ERROR_FLASH, null, null, null, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue