Merge "Import revised translations. DO NOT MERGE. Bug 3394542" into honeycomb
diff --git a/res/layout-xlarge/date_time_settings_setupwizard.xml b/res/layout-xlarge/date_time_settings_setupwizard.xml
index aa1bbcf..ee425eb 100644
--- a/res/layout-xlarge/date_time_settings_setupwizard.xml
+++ b/res/layout-xlarge/date_time_settings_setupwizard.xml
@@ -14,6 +14,7 @@
limitations under the License.
-->
<RelativeLayout
+ android:id="@+id/layout_root"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
diff --git a/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml b/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
index 715b7cd..2a7da0e 100644
--- a/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
+++ b/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
@@ -15,6 +15,7 @@
-->
<RelativeLayout
+ android:id="@+id/layout_root"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 270041d..ea9f6ca 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -630,6 +630,12 @@
<!-- Warning string that will be displayed when encryption cannot be started -->
<string name="crypt_keeper_unplugged_text">Please plug in your charger and try again.</string>
+ <!-- Dialog title, shown when encryption cannot proceed because a PIN/Password is needed -->
+ <string name="crypt_keeper_dialog_need_password_title">No lock screen PIN or password</string>
+ <!-- Dialog message, shown when encryption cannot proceed because a PIN/Password is needed -->
+ <string name="crypt_keeper_dialog_need_password_message">You must set a lock screen PIN or
+ password before you can start encryption.</string>
+
<!-- Title of the final confirmation screen before starting device encryption -->
<string name="crypt_keeper_confirm_title">Confirm encryption</string>
<!-- Warning text in the final confirmation screen before starting device encryption -->
diff --git a/src/com/android/settings/CryptKeeperSettings.java b/src/com/android/settings/CryptKeeperSettings.java
index 02982b7..01ef3f2 100644
--- a/src/com/android/settings/CryptKeeperSettings.java
+++ b/src/com/android/settings/CryptKeeperSettings.java
@@ -91,11 +91,11 @@
public void onClick(View v) {
if (!runKeyguardConfirmation(KEYGUARD_REQUEST)) {
- // TODO remove with proper flow
+ // TODO replace (or follow) this dialog with an explicit launch into password UI
new AlertDialog.Builder(getActivity())
- .setTitle("No password set")
+ .setTitle(R.string.crypt_keeper_dialog_need_password_title)
.setIcon(android.R.drawable.ic_dialog_alert)
- .setMessage("Before you enable encryption you must set a device password.")
+ .setMessage(R.string.crypt_keeper_dialog_need_password_message)
.setPositiveButton(android.R.string.ok, null)
.create()
.show();
diff --git a/src/com/android/settings/DateTimeSettingsSetupWizard.java b/src/com/android/settings/DateTimeSettingsSetupWizard.java
index 90a0f8b..c3d3bfd 100644
--- a/src/com/android/settings/DateTimeSettingsSetupWizard.java
+++ b/src/com/android/settings/DateTimeSettingsSetupWizard.java
@@ -82,6 +82,9 @@
}
public void initUiForXl() {
+ final View layoutRoot = findViewById(R.id.layout_root);
+ layoutRoot.setSystemUiVisibility(View.STATUS_BAR_DISABLE_BACK);
+
// Currently just comment out codes related to auto timezone.
// TODO: Remove them when we are sure they are unnecessary.
/*
diff --git a/src/com/android/settings/SettingsPreferenceFragment.java b/src/com/android/settings/SettingsPreferenceFragment.java
index 17bf02d..bd9e331 100644
--- a/src/com/android/settings/SettingsPreferenceFragment.java
+++ b/src/com/android/settings/SettingsPreferenceFragment.java
@@ -182,8 +182,11 @@
+ DialogCreatable.class.getName());
}
}
- // restore mDialogFragment in mParentFragment
- ((SettingsPreferenceFragment) mParentFragment).mDialogFragment = this;
+ // This dialog fragment could be created from non-SettingsPreferenceFragment
+ if (mParentFragment instanceof SettingsPreferenceFragment) {
+ // restore mDialogFragment in mParentFragment
+ ((SettingsPreferenceFragment) mParentFragment).mDialogFragment = this;
+ }
}
return ((DialogCreatable) mParentFragment).onCreateDialog(mDialogId);
}
@@ -203,6 +206,7 @@
mOnDismissListener.onDismiss(dialog);
}
}
+
public int getDialogId() {
return mDialogId;
}
@@ -211,9 +215,12 @@
public void onDetach() {
super.onDetach();
- // in case the dialog is not explicitly removed by removeDialog()
- if (((SettingsPreferenceFragment) mParentFragment).mDialogFragment == this) {
- ((SettingsPreferenceFragment) mParentFragment).mDialogFragment = null;
+ // This dialog fragment could be created from non-SettingsPreferenceFragment
+ if (mParentFragment instanceof SettingsPreferenceFragment) {
+ // in case the dialog is not explicitly removed by removeDialog()
+ if (((SettingsPreferenceFragment) mParentFragment).mDialogFragment == this) {
+ ((SettingsPreferenceFragment) mParentFragment).mDialogFragment = null;
+ }
}
}
}
diff --git a/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java b/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
index 7d8895d..caafabc 100644
--- a/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
+++ b/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
@@ -155,6 +155,9 @@
}
public void setup() {
+ final View layoutRoot = findViewById(R.id.layout_root);
+ layoutRoot.setSystemUiVisibility(View.STATUS_BAR_DISABLE_BACK);
+
mTitleView = (TextView)findViewById(R.id.wifi_setup_title);
mProgressBar = (ProgressBar)findViewById(R.id.scanning_progress_bar);
mProgressBar.setMax(2);