Show a different text for stopped apps in app backups status page

This commit is contained in:
Torsten Grote 2020-09-18 16:27:08 -03:00 committed by Chirayu Desai
parent 965431149e
commit 9f85a66235
4 changed files with 6 additions and 1 deletions

View file

@ -74,6 +74,7 @@ enum class AppRestoreStatus {
NOT_YET_BACKED_UP,
FAILED,
FAILED_NO_DATA,
FAILED_WAS_STOPPED,
FAILED_NOT_ALLOWED,
FAILED_QUOTA_EXCEEDED,
FAILED_NOT_INSTALLED,

View file

@ -28,6 +28,7 @@ import com.stevesoltys.seedvault.restore.AppRestoreStatus.FAILED
import com.stevesoltys.seedvault.restore.AppRestoreStatus.FAILED_NOT_ALLOWED
import com.stevesoltys.seedvault.restore.AppRestoreStatus.FAILED_NO_DATA
import com.stevesoltys.seedvault.restore.AppRestoreStatus.FAILED_QUOTA_EXCEEDED
import com.stevesoltys.seedvault.restore.AppRestoreStatus.FAILED_WAS_STOPPED
import com.stevesoltys.seedvault.restore.AppRestoreStatus.NOT_YET_BACKED_UP
import com.stevesoltys.seedvault.restore.AppRestoreStatus.SUCCEEDED
import com.stevesoltys.seedvault.transport.backup.PackageService
@ -101,7 +102,7 @@ internal class SettingsViewModel(
NOT_YET_BACKED_UP
}
NO_DATA -> FAILED_NO_DATA
WAS_STOPPED -> NOT_YET_BACKED_UP
WAS_STOPPED -> FAILED_WAS_STOPPED
NOT_ALLOWED -> FAILED_NOT_ALLOWED
QUOTA_EXCEEDED -> FAILED_QUOTA_EXCEEDED
UNKNOWN_ERROR -> FAILED

View file

@ -18,6 +18,7 @@ import com.stevesoltys.seedvault.restore.AppRestoreStatus.FAILED_NOT_ALLOWED
import com.stevesoltys.seedvault.restore.AppRestoreStatus.FAILED_NOT_INSTALLED
import com.stevesoltys.seedvault.restore.AppRestoreStatus.FAILED_NO_DATA
import com.stevesoltys.seedvault.restore.AppRestoreStatus.FAILED_QUOTA_EXCEEDED
import com.stevesoltys.seedvault.restore.AppRestoreStatus.FAILED_WAS_STOPPED
import com.stevesoltys.seedvault.restore.AppRestoreStatus.IN_PROGRESS
import com.stevesoltys.seedvault.restore.AppRestoreStatus.NOT_YET_BACKED_UP
import com.stevesoltys.seedvault.restore.AppRestoreStatus.SUCCEEDED
@ -66,6 +67,7 @@ internal open class AppViewHolder(protected val v: View) : RecyclerView.ViewHold
private fun AppRestoreStatus.getInfo(): String = when (this) {
NOT_YET_BACKED_UP -> context.getString(R.string.restore_app_not_yet_backed_up)
FAILED_NO_DATA -> context.getString(R.string.restore_app_no_data)
FAILED_WAS_STOPPED -> context.getString(R.string.restore_app_was_stopped)
FAILED_NOT_ALLOWED -> context.getString(R.string.restore_app_not_allowed)
FAILED_NOT_INSTALLED -> context.getString(R.string.restore_app_not_installed)
FAILED_QUOTA_EXCEEDED -> context.getString(R.string.restore_app_quota_exceeded)

View file

@ -107,6 +107,7 @@
<string name="restore_magic_package">System package manager</string>
<!-- This text gets shown for apps that the OS did not try to backup for whatever reason e.g. no backup was run yet -->
<string name="restore_app_not_yet_backed_up">Not yet backed up</string>
<string name="restore_app_was_stopped">Not backed up as it wasn\'t used recently</string>
<string name="restore_app_no_data">App reported no data for backup</string>
<string name="restore_app_not_allowed">App doesn\'t allow backup</string>
<string name="restore_app_not_installed">App not installed</string>