Updater: Show toast when starting export

* It's not immediately clear that an export is started since the
  notification isn't intrusive
* Show a toast - that will be clear enough

Change-Id: I78d78b23884df3ddb37bc486c1d6012f899c888d
This commit is contained in:
Michael W
2022-02-07 16:22:08 +01:00
committed by Bruno Martins
parent f27d50d640
commit d54176ccf7
2 changed files with 2 additions and 0 deletions

View File

@@ -125,6 +125,7 @@
<string name="notification_export_success">Update exported</string> <string name="notification_export_success">Update exported</string>
<string name="notification_export_fail">Export error</string> <string name="notification_export_fail">Export error</string>
<string name="toast_already_exporting">Already exporting an update</string> <string name="toast_already_exporting">Already exporting an update</string>
<string name="toast_export_started">Export started</string>
<plurals name="eta_seconds"> <plurals name="eta_seconds">
<item quantity="one">1 second left</item> <item quantity="one">1 second left</item>

View File

@@ -69,6 +69,7 @@ public class ExportUpdateService extends Service {
File source = (File) intent.getSerializableExtra(EXTRA_SOURCE_FILE); File source = (File) intent.getSerializableExtra(EXTRA_SOURCE_FILE);
Uri destination = intent.getParcelableExtra(EXTRA_DEST_URI); Uri destination = intent.getParcelableExtra(EXTRA_DEST_URI);
startExporting(source, destination); startExporting(source, destination);
Toast.makeText(this, R.string.toast_export_started, Toast.LENGTH_SHORT).show();
} else { } else {
Log.e(TAG, "No action specified"); Log.e(TAG, "No action specified");
} }