Show a different text for stopped apps in app backups status page
This commit is contained in:
parent
77550a9860
commit
7f4761816e
4 changed files with 6 additions and 1 deletions
|
@ -74,6 +74,7 @@ enum class AppRestoreStatus {
|
||||||
NOT_YET_BACKED_UP,
|
NOT_YET_BACKED_UP,
|
||||||
FAILED,
|
FAILED,
|
||||||
FAILED_NO_DATA,
|
FAILED_NO_DATA,
|
||||||
|
FAILED_WAS_STOPPED,
|
||||||
FAILED_NOT_ALLOWED,
|
FAILED_NOT_ALLOWED,
|
||||||
FAILED_QUOTA_EXCEEDED,
|
FAILED_QUOTA_EXCEEDED,
|
||||||
FAILED_NOT_INSTALLED,
|
FAILED_NOT_INSTALLED,
|
||||||
|
|
|
@ -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_NOT_ALLOWED
|
||||||
import com.stevesoltys.seedvault.restore.AppRestoreStatus.FAILED_NO_DATA
|
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_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.NOT_YET_BACKED_UP
|
||||||
import com.stevesoltys.seedvault.restore.AppRestoreStatus.SUCCEEDED
|
import com.stevesoltys.seedvault.restore.AppRestoreStatus.SUCCEEDED
|
||||||
import com.stevesoltys.seedvault.transport.backup.PackageService
|
import com.stevesoltys.seedvault.transport.backup.PackageService
|
||||||
|
@ -101,7 +102,7 @@ internal class SettingsViewModel(
|
||||||
NOT_YET_BACKED_UP
|
NOT_YET_BACKED_UP
|
||||||
}
|
}
|
||||||
NO_DATA -> FAILED_NO_DATA
|
NO_DATA -> FAILED_NO_DATA
|
||||||
WAS_STOPPED -> NOT_YET_BACKED_UP
|
WAS_STOPPED -> FAILED_WAS_STOPPED
|
||||||
NOT_ALLOWED -> FAILED_NOT_ALLOWED
|
NOT_ALLOWED -> FAILED_NOT_ALLOWED
|
||||||
QUOTA_EXCEEDED -> FAILED_QUOTA_EXCEEDED
|
QUOTA_EXCEEDED -> FAILED_QUOTA_EXCEEDED
|
||||||
UNKNOWN_ERROR -> FAILED
|
UNKNOWN_ERROR -> FAILED
|
||||||
|
|
|
@ -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_NOT_INSTALLED
|
||||||
import com.stevesoltys.seedvault.restore.AppRestoreStatus.FAILED_NO_DATA
|
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_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.IN_PROGRESS
|
||||||
import com.stevesoltys.seedvault.restore.AppRestoreStatus.NOT_YET_BACKED_UP
|
import com.stevesoltys.seedvault.restore.AppRestoreStatus.NOT_YET_BACKED_UP
|
||||||
import com.stevesoltys.seedvault.restore.AppRestoreStatus.SUCCEEDED
|
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) {
|
private fun AppRestoreStatus.getInfo(): String = when (this) {
|
||||||
NOT_YET_BACKED_UP -> context.getString(R.string.restore_app_not_yet_backed_up)
|
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_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_ALLOWED -> context.getString(R.string.restore_app_not_allowed)
|
||||||
FAILED_NOT_INSTALLED -> context.getString(R.string.restore_app_not_installed)
|
FAILED_NOT_INSTALLED -> context.getString(R.string.restore_app_not_installed)
|
||||||
FAILED_QUOTA_EXCEEDED -> context.getString(R.string.restore_app_quota_exceeded)
|
FAILED_QUOTA_EXCEEDED -> context.getString(R.string.restore_app_quota_exceeded)
|
||||||
|
|
|
@ -107,6 +107,7 @@
|
||||||
<string name="restore_magic_package">System package manager</string>
|
<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 -->
|
<!-- 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_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_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_allowed">App doesn\'t allow backup</string>
|
||||||
<string name="restore_app_not_installed">App not installed</string>
|
<string name="restore_app_not_installed">App not installed</string>
|
||||||
|
|
Loading…
Reference in a new issue