Append trailing slashes to Web URLs; okhttp upgrade

pull/2/head
Ricki Hirner 9 years ago
parent 2880b05b5d
commit 9a8d29e774

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

@ -14,9 +14,7 @@ import org.slf4j.LoggerFactory;
public class Constants {
public static final String
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";
ACCOUNT_TYPE = "bitfire.at.davdroid";
public static final Logger log = LoggerFactory.getLogger("davdroid");
@ -28,5 +26,5 @@ public class Constants {
NOTIFICATION_CALENDAR_SYNC = 11,
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");
}

@ -33,7 +33,7 @@ public class DonateDialogFragment extends DialogFragment {
.setPositiveButton(R.string.donate_now, new DialogInterface.OnClickListener() {
@Override
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() {

@ -119,7 +119,7 @@ public class MainActivity extends Activity {
public void showWebsite(MenuItem item) {
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);
}

@ -54,7 +54,7 @@ public class AddAccountActivity extends Activity {
}
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
Loading…
Cancel
Save