1
0
mirror of https://github.com/etesync/android synced 2025-01-26 15:40:55 +00:00

Append trailing slashes to Web URLs; okhttp upgrade

This commit is contained in:
Ricki Hirner 2016-01-08 17:57:51 +01:00
parent 2880b05b5d
commit 9a8d29e774
6 changed files with 7 additions and 9 deletions

View File

@ -66,5 +66,5 @@ dependencies {
compile project(':MemorizingTrustManager') compile project(':MemorizingTrustManager')
androidTestCompile 'com.squareup.okhttp:mockwebserver:2.7.1' androidTestCompile 'com.squareup.okhttp:mockwebserver:2.7.2'
} }

View File

@ -14,9 +14,7 @@ import org.slf4j.LoggerFactory;
public class Constants { public class Constants {
public static final String public static final String
ACCOUNT_TYPE = "bitfire.at.davdroid", ACCOUNT_TYPE = "bitfire.at.davdroid";
WEB_URL_MAIN = "https://davdroid.bitfire.at/?pk_campaign=davdroid-app",
WEB_URL_HELP = "https://davdroid.bitfire.at/configuration?pk_campaign=davdroid-app";
public static final Logger log = LoggerFactory.getLogger("davdroid"); public static final Logger log = LoggerFactory.getLogger("davdroid");
@ -28,5 +26,5 @@ public class Constants {
NOTIFICATION_CALENDAR_SYNC = 11, NOTIFICATION_CALENDAR_SYNC = 11,
NOTIFICATION_TASK_SYNC = 12; NOTIFICATION_TASK_SYNC = 12;
public final static Uri donationUri = Uri.parse("https://davdroid.bitfire.at/donate?pk_campaign=davdroid-app"); public final static Uri webUri = Uri.parse("https://davdroid.bitfire.at/?pk_campaign=davdroid-app");
} }

View File

@ -33,7 +33,7 @@ public class DonateDialogFragment extends DialogFragment {
.setPositiveButton(R.string.donate_now, new DialogInterface.OnClickListener() { .setPositiveButton(R.string.donate_now, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
startActivity(new Intent(Intent.ACTION_VIEW, Constants.donationUri)); startActivity(new Intent(Intent.ACTION_VIEW, Constants.webUri.buildUpon().appendEncodedPath("donate/").build()));
} }
}) })
.setNegativeButton(R.string.donate_later, new DialogInterface.OnClickListener() { .setNegativeButton(R.string.donate_later, new DialogInterface.OnClickListener() {

View File

@ -119,7 +119,7 @@ public class MainActivity extends Activity {
public void showWebsite(MenuItem item) { public void showWebsite(MenuItem item) {
Intent intent = new Intent(Intent.ACTION_VIEW); Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(Constants.WEB_URL_MAIN + "&pk_kwd=main-activity")); intent.setData(Constants.webUri);
startActivity(intent); startActivity(intent);
} }

View File

@ -54,7 +54,7 @@ public class AddAccountActivity extends Activity {
} }
public void showHelp(MenuItem item) { public void showHelp(MenuItem item) {
startActivityForResult(new Intent(Intent.ACTION_VIEW, Uri.parse(Constants.WEB_URL_HELP + "&pk_kwd=add-account-activity")), 0); startActivityForResult(new Intent(Intent.ACTION_VIEW, Constants.webUri.buildUpon().appendEncodedPath("configuration/").build()), 0);
} }
} }

@ -1 +1 @@
Subproject commit f060f00fe6ccf5e8a79690c8707cf2b1d98a3d17 Subproject commit adb19e52298c11e1abc7d9aeee15380f835f1ba2