diff --git a/res/layout/setup_cyanogen_services.xml b/res/layout/setup_cyanogen_services.xml index d788504..1323406 100644 --- a/res/layout/setup_cyanogen_services.xml +++ b/res/layout/setup_cyanogen_services.xml @@ -82,8 +82,7 @@ android:layout_marginLeft="@dimen/location_text_margin_left" android:layout_marginRight="@dimen/location_text_margin_right" android:paddingBottom="@dimen/content_margin_bottom" - android:text="@string/services_metrics_label" - android:maxLines="5" /> + android:text="@string/services_metrics_label"/> @@ -119,8 +118,7 @@ android:layout_marginLeft="@dimen/location_text_margin_left" android:layout_marginRight="@dimen/location_text_margin_right" android:paddingBottom="@dimen/content_margin_bottom" - android:text="@string/services_os_nav_keys_label" - android:maxLines="5" /> + android:text="@string/services_os_nav_keys_label"/> @@ -155,8 +153,7 @@ android:layout_marginLeft="@dimen/location_text_margin_left" android:layout_marginRight="@dimen/location_text_margin_right" android:paddingBottom="@dimen/content_margin_bottom" - android:text="@string/services_secure_sms_label" - android:maxLines="5" /> + android:text="@string/services_secure_sms_label"/> diff --git a/res/values/strings.xml b/res/values/strings.xml index 634a9ca..1a7a6fc 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -17,37 +17,28 @@ Setup Wizard cyanogenmod + CyanogenMod com.cyanogenmod.account Next - Continue Skip - Finish Start - Cancel - Create - Login OK - Existing - New - Skip anyway - Don\'t skip - Just a sec... + Just a sec\u2026 Setup is complete Welcome Select Wi-Fi - SIM Card Missing - GMS account - Choose a SIM for Data - Location Services - Other Services + SIM card missing + Choose a SIM for data + Location services + Other services Date & time Current date Current time - A SIM card has not been detected in your device. To insert a SIM card, read the instructions that came with your device. + A SIM card has not been detected in your device. To insert a SIM card, read the instructions that came with your device. Which SIM do you want to use for data? The selected SIM may incur network charges as it will be used to set up your device. Set your time zone and adjust current date and time if needed @@ -60,7 +51,7 @@ Improve location accuracy by allowing apps to use the GPS on your phone. Use Google\'s location service to help apps determine your location. This means sending annonymous location data to Google, even when no apps are running. - Turn On Mobile Data + Turn on mobile data No service Emergency calls only Do you want to use mobile data during setup? Turning on mobile data may be subject to data charges. @@ -69,12 +60,14 @@ SIM %d - %s - Emergency Call + Emergency call Cyanogen services - These services work for you to extend the capabilities of your device. You can turn them off at anytime. Data will be used in accordance with Cyanogen\'s %s. + These services work for you to extend the capabilities of your device. You can turn them off at anytime. Data will be used in accordance with Cyanogen\'s %s. Privacy Policy - Help improve Cyanogen OS by automatically sending diagnostic and usage data to Cyanogen. This information won’t be used to identify you and lends a hand to teams working on things like battery life, app performance, and new Cyanogen OS features. + Help improve %s + %s by automatically sending diagnostic and usage data to Cyanogen. This information can’t be used to identify you and lends a hand to teams working on things like battery life, app performance, and new %s features. Use on screen navigation keys to move between screens instead of hardware keys. - Use secure SMS to encrypt SMS conversations with other users using secure SMS on a Cyanogen OS device. + Use secure SMS + %s to encrypt SMS conversations with other users using secure SMS on a %s device. diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java index 404f688..ceb9774 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java @@ -26,7 +26,9 @@ import android.os.Handler; import android.os.RemoteException; import android.preference.PreferenceManager; import android.provider.Settings; +import android.text.Spannable; import android.text.SpannableString; +import android.text.SpannableStringBuilder; import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.text.style.ClickableSpan; @@ -166,7 +168,7 @@ public class CyanogenSettingsPage extends SetupPage { final int playServicesAvailable = GooglePlayServicesUtil .isGooglePlayServicesAvailable(context); return playServicesAvailable != ConnectionResult.SUCCESS - || (SetupWizardUtils.isGSMPhone(context) && SetupWizardUtils.isSimMissing(context)); + || (SetupWizardUtils.hasTelephony(context) && SetupWizardUtils.isSimMissing(context)); } public static class CyanogenSettingsFragment extends SetupPageFragment { @@ -216,8 +218,8 @@ public class CyanogenSettingsPage extends SetupPage { @Override protected void initializePage() { String privacy_policy = getString(R.string.services_privacy_policy); - String summary = getString(R.string.services_explanation, privacy_policy); - SpannableString ss = new SpannableString(summary); + String policySummary = getString(R.string.services_explanation, privacy_policy); + SpannableString ss = new SpannableString(policySummary); ClickableSpan clickableSpan = new ClickableSpan() { @Override public void onClick(View textView) { @@ -227,19 +229,30 @@ public class CyanogenSettingsPage extends SetupPage { } }; ss.setSpan(clickableSpan, - summary.length() - privacy_policy.length() - 1, - summary.length() - 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); - TextView textView = (TextView) mRootView.findViewById(R.id.privacy_policy); - textView.setMovementMethod(LinkMovementMethod.getInstance()); - textView.setText(ss); + policySummary.length() - privacy_policy.length() - 1, + policySummary.length() - 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + TextView privacyPolicy = (TextView) mRootView.findViewById(R.id.privacy_policy); + privacyPolicy.setMovementMethod(LinkMovementMethod.getInstance()); + privacyPolicy.setText(ss); + mMetricsRow = mRootView.findViewById(R.id.metrics); mMetricsRow.setOnClickListener(mMetricsClickListener); + String metricsHelpImproveCM = + getString(R.string.services_help_improve_cm, getString(R.string.os_name)); + String metricsSummary = getString(R.string.services_metrics_label, + metricsHelpImproveCM, getString(R.string.os_name)); + final SpannableStringBuilder metricsSpan = new SpannableStringBuilder(metricsSummary); + metricsSpan.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD), + 0, metricsHelpImproveCM.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + TextView metrics = (TextView) mRootView.findViewById(R.id.enable_metrics_summary); + metrics.setText(metricsSpan); mMetrics = (CheckBox) mRootView.findViewById(R.id.enable_metrics_checkbox); boolean metricsChecked = !mPage.getData().containsKey(KEY_SEND_METRICS) || mPage.getData() .getBoolean(KEY_SEND_METRICS); mMetrics.setChecked(metricsChecked); mPage.getData().putBoolean(KEY_SEND_METRICS, metricsChecked); + mNavKeysRow = mRootView.findViewById(R.id.nav_keys); mNavKeysRow.setOnClickListener(mNavKeysClickListener); mNavKeys = (CheckBox) mRootView.findViewById(R.id.nav_keys_checkbox); @@ -256,8 +269,18 @@ public class CyanogenSettingsPage extends SetupPage { isKeyDisablerActive(); mNavKeys.setChecked(navKeysDisabled); } + mSecureSmsRow = mRootView.findViewById(R.id.secure_sms); mSecureSmsRow.setOnClickListener(mSecureSmsClickListener); + String useSecureSms = getString(R.string.services_use_secure_sms); + String secureSmsSummary = getString(R.string.services_secure_sms_label, + useSecureSms, getString(R.string.os_name)); + final SpannableStringBuilder secureSmsSpan = + new SpannableStringBuilder(secureSmsSummary); + secureSmsSpan.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD), + 0, useSecureSms.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + TextView secureSms = (TextView) mRootView.findViewById(R.id.secure_sms_summary); + secureSms.setText(secureSmsSpan); if (hideWhisperPush(getActivity())) { mSecureSmsRow.setVisibility(View.GONE); }