diff options
author | Christopher Tate <ctate@google.com> | 2011-09-13 17:51:18 -0700 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2011-09-13 17:51:18 -0700 |
commit | c58cf7dd02ad227a68d62a0204152cee62c13182 (patch) | |
tree | 5e73b0f770f20d60a7a12a7b959cff289c0fb1b4 /packages/BackupRestoreConfirmation/src | |
parent | 651cdfcbac6245f570475991588ddc2d30265e8d (diff) | |
download | frameworks_base-c58cf7dd02ad227a68d62a0204152cee62c13182.zip frameworks_base-c58cf7dd02ad227a68d62a0204152cee62c13182.tar.gz frameworks_base-c58cf7dd02ad227a68d62a0204152cee62c13182.tar.bz2 |
Give backup/restore confirmation a proper window title
Since the confirmation uses the same Activity but different layouts
for the backup vs restore cases, we have to do the title in code.
Along the way, fix the restore layout's padding [the backup layout
was already right].
Fixes bug 5164470
Change-Id: I4d636f666d97fc377e9cf36abf08d1625a05577f
Diffstat (limited to 'packages/BackupRestoreConfirmation/src')
-rw-r--r-- | packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java b/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java index 5448e0b..d053f29 100644 --- a/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java +++ b/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java @@ -131,10 +131,13 @@ public class BackupRestoreConfirmation extends Activity { final String action = intent.getAction(); final int layoutId; + final int titleId; if (action.equals(FullBackup.FULL_BACKUP_INTENT_ACTION)) { layoutId = R.layout.confirm_backup; + titleId = R.string.backup_confirm_title; } else if (action.equals(FullBackup.FULL_RESTORE_INTENT_ACTION)) { layoutId = R.layout.confirm_restore; + titleId = R.string.restore_confirm_title; } else { Slog.w(TAG, "Backup/restore confirmation activity launched with invalid action!"); finish(); @@ -159,6 +162,7 @@ public class BackupRestoreConfirmation extends Activity { mObserver.setHandler(mHandler); } + setTitle(titleId); setContentView(layoutId); // Same resource IDs for each layout variant (backup / restore) |