Merge heads

This commit is contained in:
youtaol
2012-07-10 17:20:10 +08:00
89 changed files with 575 additions and 301 deletions
@@ -40,8 +40,8 @@ public class HelpActivity extends AbstractMyTracksActivity {
mapsPublicUnlisted.setText(getString(
R.string.help_maps_public_unlisted_answer, getString(R.string.maps_public_unlisted_url)));
TextView googleServices = (TextView) findViewById(R.id.help_google_services_answer);
googleServices.setText(getString(R.string.help_google_services_answer,
TextView sendTrack = (TextView) findViewById(R.id.help_send_track_answer);
sendTrack.setText(getString(R.string.help_send_track_answer,
getString(R.string.send_google_maps_url),
getString(R.string.send_google_fusion_tables_url),
getString(R.string.send_google_docs_url)));
@@ -36,6 +36,7 @@ public class EulaDialogFragment extends DialogFragment {
public static final String EULA_DIALOG_TAG = "eulaDialog";
private static final String KEY_HAS_ACCEPTED = "hasAccepted";
private static final String GOOGLE_URL = "m.google.com";
private static final String KOREAN = "ko";
/**
* Creates a new instance of {@link EulaDialogFragment}.
@@ -98,12 +99,17 @@ public class EulaDialogFragment extends DialogFragment {
*
*/
private String getEulaText() {
return getString(R.string.eula_date)
String tos = getString(R.string.eula_date)
+ "\n\n"
+ getString(R.string.eula_body, GOOGLE_URL)
+ "\n\n"
+ getString(R.string.eula_footer, GOOGLE_URL)
+ "\n\n"
+ getString(R.string.eula_copyright_year);
boolean isKorean = getResources().getConfiguration().locale.getLanguage().equals(KOREAN);
if (isKorean) {
tos += "\n\n" + getString(R.string.eula_korean);
}
return tos;
}
}
@@ -17,7 +17,6 @@
package com.google.android.apps.mytracks.settings;
import com.google.android.apps.mytracks.util.DialogUtils;
import com.google.android.apps.mytracks.util.PreferencesUtils;
import com.google.android.maps.mytracks.R;
import android.app.Dialog;
@@ -48,23 +47,12 @@ public class SharingSettingsActivity extends AbstractSettingsActivity {
defaultMapPublicCheckBoxPreference = (CheckBoxPreference) findPreference(
getString(R.string.default_map_public_key));
defaultMapPublicCheckBoxPreference.setSummaryOn(getString(
R.string.settings_sharing_map_public_summary,
R.string.settings_sharing_new_map_public_summary_on,
getString(R.string.maps_public_unlisted_url)));
defaultMapPublicCheckBoxPreference.setSummaryOff(getString(
R.string.settings_sharing_map_unlisted_summary,
R.string.settings_sharing_new_map_public_summary_off,
getString(R.string.maps_public_unlisted_url)));
boolean defaultMapPublic = PreferencesUtils.getBoolean(
this, R.string.default_map_public_key, PreferencesUtils.DEFAULT_MAP_PUBLIC_DEFAULT);
updateDefaultMapPublicTitle(defaultMapPublic);
defaultMapPublicCheckBoxPreference.setOnPreferenceChangeListener(
new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
updateDefaultMapPublicTitle((Boolean) newValue);
return true;
}
});
allowAccessCheckBoxPreference = (CheckBoxPreference) findPreference(
getString(R.string.allow_access_key));
allowAccessCheckBoxPreference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@@ -94,14 +82,4 @@ public class SharingSettingsActivity extends AbstractSettingsActivity {
}
});
}
/**
* Updates the title for the default map public check box preference.
*
* @param value the value
*/
private void updateDefaultMapPublicTitle(boolean value) {
defaultMapPublicCheckBoxPreference.setTitle(value ? R.string.settings_sharing_map_public
: R.string.settings_sharing_map_unlisted);
}
}