diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml index 036e8af..cd6474c 100644 --- a/android/res/values/strings.xml +++ b/android/res/values/strings.xml @@ -39,7 +39,7 @@ 2. Connect your Chrome and your phone.<br>3. Set your link action preference.<br><br> By using this application, you agree to the <br> <a href="{tos_link}">Terms of Service</a> and - <a href="http://m.google.com/privacy">Privacy Policy</a> + <a href="{pp_link}">Privacy Policy</a>. Chrome to Phone lets you easily share links, maps, and currently selected phone numbers and text @@ -52,6 +52,6 @@ in the status bar which you can action manually. <br><br> By using this application, you agree to the <br> <a href="{tos_link}">Terms of Service</a> and - <a href="http://m.google.com/privacy">Privacy Policy</a> + <a href="{pp_link}">Privacy Policy</a>. diff --git a/android/src/com/google/android/apps/chrometophone/HelpActivity.java b/android/src/com/google/android/apps/chrometophone/HelpActivity.java index 5ba8569..2fdd784 100644 --- a/android/src/com/google/android/apps/chrometophone/HelpActivity.java +++ b/android/src/com/google/android/apps/chrometophone/HelpActivity.java @@ -15,12 +15,14 @@ public class HelpActivity extends Activity { setContentView(R.layout.help); TextView textView = (TextView) findViewById(R.id.help_text); - String helpText = getString(R.string.help_text).replace("{tos_link}", getTosLink()); + String helpText = getString(R.string.help_text) + .replace("{tos_link}", getTOSLink()) + .replace("{pp_link}", getPPLink()); textView.setText(Html.fromHtml(helpText)); textView.setMovementMethod(LinkMovementMethod.getInstance()); } - public static String getTosLink() { + public static String getTOSLink() { String link = "http://m.google.com/toscountry"; // default String country = Locale.getDefault().getCountry(); @@ -33,4 +35,18 @@ public class HelpActivity extends Activity { } return link; } + + public static String getPPLink() { + String link = "http://m.google.com/privacy"; // default + + String country = Locale.getDefault().getCountry(); + if (country.equals("US")) { + link = "http://m.google.com/privacy"; + } else if (country.equals("GB")) { + link = "http://m.google.co.uk/privacy"; + } else if (country.equals("CA")) { + link = "http://m.google.ca/privacy"; + } + return link; + } } diff --git a/android/src/com/google/android/apps/chrometophone/MainActivity.java b/android/src/com/google/android/apps/chrometophone/MainActivity.java index e342afc..2ca2228 100644 --- a/android/src/com/google/android/apps/chrometophone/MainActivity.java +++ b/android/src/com/google/android/apps/chrometophone/MainActivity.java @@ -142,8 +142,9 @@ public class MainActivity extends Activity { } private void setIntroScreenContent() { - String introText = - getString(R.string.intro_text).replace("{tos_link}", HelpActivity.getTosLink()); + String introText = getString(R.string.intro_text) + .replace("{tos_link}", HelpActivity.getTOSLink()) + .replace("{pp_link}", HelpActivity.getPPLink()); TextView textView = (TextView) findViewById(R.id.intro_text); textView.setText(Html.fromHtml(introText)); textView.setMovementMethod(LinkMovementMethod.getInstance());