mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-01 06:19:57 +01:00
move prefix into resources two since it's repeated.
This commit is contained in:
parent
baa790a8c3
commit
6f620ebc44
3 changed files with 13 additions and 12 deletions
|
@ -129,7 +129,9 @@
|
|||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data android:scheme="http"
|
||||
android:host="@string/invite_host" android:pathPrefix="/and/" />
|
||||
android:host="@string/invite_host"
|
||||
android:pathPrefix="@string/invite_prefix"
|
||||
/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
|
|
@ -102,10 +102,9 @@
|
|||
<!-- other -->
|
||||
<string name="default_host">eehouse.org</string>
|
||||
|
||||
<!-- <string name="default_host">10.0.2.2</string> -->
|
||||
<string name="invite_host">eehouse.org</string>
|
||||
<string name="invite_prefix">/and/</string>
|
||||
<string name="dict_url">http://eehouse.org/and_wordlists</string>
|
||||
<string name="game_url_pathf">//%1$s/and</string>
|
||||
<string name="expl_update_url">Update checks URL</string>
|
||||
<string name="default_update_url">http://eehouse.org/xw4/info.py</string>
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ package org.eehouse.android.xw4;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri.Builder;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import java.net.URLEncoder;
|
||||
|
@ -99,14 +98,15 @@ public class NetLaunchInfo {
|
|||
String inviteID, int lang,
|
||||
String dict, int nPlayersT )
|
||||
{
|
||||
String host = context.getString( R.string.invite_host );
|
||||
Builder ub = new Builder();
|
||||
ub.scheme( "http" );
|
||||
ub.path( context.getString( R.string.game_url_pathf, host ) );
|
||||
ub.appendQueryParameter( "lang", String.format("%d", lang ) );
|
||||
ub.appendQueryParameter( "np", String.format( "%d", nPlayersT ) );
|
||||
ub.appendQueryParameter( "room", room );
|
||||
ub.appendQueryParameter( "id", inviteID );
|
||||
Uri.Builder ub = new Uri.Builder()
|
||||
.scheme( "http" )
|
||||
.path( String.format( "//%s%s",
|
||||
context.getString(R.string.invite_host),
|
||||
context.getString(R.string.invite_prefix) ) )
|
||||
.appendQueryParameter( "lang", String.format("%d", lang ) )
|
||||
.appendQueryParameter( "np", String.format( "%d", nPlayersT ) )
|
||||
.appendQueryParameter( "room", room )
|
||||
.appendQueryParameter( "id", inviteID );
|
||||
if ( null != dict ) {
|
||||
ub.appendQueryParameter( "wl", dict );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue