diff options
author | Christopher Tate <ctate@google.com> | 2011-09-14 17:34:52 -0700 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2011-09-14 17:34:52 -0700 |
commit | 28b591c2a416d7f5955371970272bcaa2b1b303e (patch) | |
tree | 7a0403845290806411f3052f60cbec2650b5afa0 /packages/BackupRestoreConfirmation | |
parent | f9fa7543b12b4c54ee21f205b7d537494dbbbdf1 (diff) | |
download | frameworks_base-28b591c2a416d7f5955371970272bcaa2b1b303e.zip frameworks_base-28b591c2a416d7f5955371970272bcaa2b1b303e.tar.gz frameworks_base-28b591c2a416d7f5955371970272bcaa2b1b303e.tar.bz2 |
Use string resources instead of inline literals for progress toasts
...in the full backup/restore confirmation UI.
Change-Id: I858a2d7017450f016afe5052aa37161a1c89c281
Diffstat (limited to 'packages/BackupRestoreConfirmation')
-rw-r--r-- | packages/BackupRestoreConfirmation/res/values/strings.xml | 11 | ||||
-rw-r--r-- | packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java | 10 |
2 files changed, 16 insertions, 5 deletions
diff --git a/packages/BackupRestoreConfirmation/res/values/strings.xml b/packages/BackupRestoreConfirmation/res/values/strings.xml index e207a98..e91c6e2 100644 --- a/packages/BackupRestoreConfirmation/res/values/strings.xml +++ b/packages/BackupRestoreConfirmation/res/values/strings.xml @@ -43,4 +43,15 @@ <!-- Text for message to user when performing a full restore operation, explaining that they must enter the password originally used to encrypt the full backup data. --> <string name="restore_enc_password_text">If the restore data is encrypted, please enter the password below:</string> + + <!-- Text of a toast telling the user that a full backup operation has begun --> + <string name="toast_backup_started">Backup starting...</string> + <!-- Text of a toast telling the user that a full backup operation has ended --> + <string name="toast_backup_ended">Backup finished</string> + <!-- Text of a toast telling the user that a full restore operation has begun --> + <string name="toast_restore_started">Restore starting...</string> + <!-- Text of a toast telling the user that a full restore operation has ended --> + <string name="toast_restore_ended">Restore ended</string> + <!-- Text of a toast telling the user that the operation has timed out --> + <string name="toast_timeout">Operation timed out</string> </resources> diff --git a/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java b/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java index d053f29..fbdf3cc 100644 --- a/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java +++ b/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java @@ -82,7 +82,7 @@ public class BackupRestoreConfirmation extends Activity { public void handleMessage(Message msg) { switch (msg.what) { case MSG_START_BACKUP: { - Toast.makeText(mContext, "!!! Backup starting !!!", Toast.LENGTH_LONG).show(); + Toast.makeText(mContext, R.string.toast_backup_started, Toast.LENGTH_LONG).show(); } break; @@ -93,13 +93,13 @@ public class BackupRestoreConfirmation extends Activity { break; case MSG_END_BACKUP: { - Toast.makeText(mContext, "!!! Backup ended !!!", Toast.LENGTH_SHORT).show(); + Toast.makeText(mContext, R.string.toast_backup_ended, Toast.LENGTH_LONG).show(); finish(); } break; case MSG_START_RESTORE: { - Toast.makeText(mContext, "!!! Restore starting !!!", Toast.LENGTH_LONG).show(); + Toast.makeText(mContext, R.string.toast_restore_started, Toast.LENGTH_LONG).show(); } break; @@ -110,13 +110,13 @@ public class BackupRestoreConfirmation extends Activity { break; case MSG_END_RESTORE: { - Toast.makeText(mContext, "!!! Restore ended !!!", Toast.LENGTH_SHORT).show(); + Toast.makeText(mContext, R.string.toast_restore_ended, Toast.LENGTH_SHORT).show(); finish(); } break; case MSG_TIMEOUT: { - Toast.makeText(mContext, "!!! TIMED OUT !!!", Toast.LENGTH_LONG).show(); + Toast.makeText(mContext, R.string.toast_timeout, Toast.LENGTH_LONG).show(); } break; } |