summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2011-09-14 11:34:03 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-14 11:34:03 -0700
commitf9fa7543b12b4c54ee21f205b7d537494dbbbdf1 (patch)
tree82aada6ca169849da688c464231154164da2a96f /packages
parent311fac7ea58a5fc92ea4a04fab36ee9386759fab (diff)
parentc58cf7dd02ad227a68d62a0204152cee62c13182 (diff)
downloadframeworks_base-f9fa7543b12b4c54ee21f205b7d537494dbbbdf1.zip
frameworks_base-f9fa7543b12b4c54ee21f205b7d537494dbbbdf1.tar.gz
frameworks_base-f9fa7543b12b4c54ee21f205b7d537494dbbbdf1.tar.bz2
Merge "Give backup/restore confirmation a proper window title"
Diffstat (limited to 'packages')
-rw-r--r--packages/BackupRestoreConfirmation/AndroidManifest.xml1
-rw-r--r--packages/BackupRestoreConfirmation/res/layout/confirm_restore.xml4
-rw-r--r--packages/BackupRestoreConfirmation/res/values/strings.xml4
-rw-r--r--packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java4
4 files changed, 11 insertions, 2 deletions
diff --git a/packages/BackupRestoreConfirmation/AndroidManifest.xml b/packages/BackupRestoreConfirmation/AndroidManifest.xml
index 19848f6..f3feee8 100644
--- a/packages/BackupRestoreConfirmation/AndroidManifest.xml
+++ b/packages/BackupRestoreConfirmation/AndroidManifest.xml
@@ -25,6 +25,7 @@
android:permission="android.permission.CONFIRM_FULL_BACKUP" >
<activity android:name=".BackupRestoreConfirmation"
+ android:title=""
android:windowSoftInputMode="stateAlwaysHidden"
android:excludeFromRecents="true"
android:exported="true" >
diff --git a/packages/BackupRestoreConfirmation/res/layout/confirm_restore.xml b/packages/BackupRestoreConfirmation/res/layout/confirm_restore.xml
index 3522e7c..2ee74fe 100644
--- a/packages/BackupRestoreConfirmation/res/layout/confirm_restore.xml
+++ b/packages/BackupRestoreConfirmation/res/layout/confirm_restore.xml
@@ -21,10 +21,10 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
- android:padding="16dp" >
+ android:orientation="vertical">
<ScrollView
+ android:padding="16dp"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_width="match_parent">
diff --git a/packages/BackupRestoreConfirmation/res/values/strings.xml b/packages/BackupRestoreConfirmation/res/values/strings.xml
index f022e57..e207a98 100644
--- a/packages/BackupRestoreConfirmation/res/values/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values/strings.xml
@@ -14,6 +14,10 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Title of the activity when a full backup has been requested and must be confirmed -->
+ <string name="backup_confirm_title">Full backup</string>
+ <!-- Title of the activity when a full restore has been requested and must be confirmed -->
+ <string name="restore_confirm_title">Full restore</string>
<!-- Text for message to user that a full backup has been requested, and must be confirmed. -->
<string name="backup_confirm_text">A full backup of all data to a connected desktop computer has been requested. Do you want to allow this to happen\?\n\nIf you did not request the backup yourself, do not allow the operation to proceed.</string>
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)