cleanup from review of diff since last release. All whitespace or

removing logging except for one check for null.
This commit is contained in:
Eric House 2016-01-27 07:31:10 -08:00
parent 813d5c18b3
commit 794bce1ceb
7 changed files with 176 additions and 180 deletions

View file

@ -1974,9 +1974,9 @@
\"Import contact\" button to add people you want to invite, the +
button to enter numbers directly.</string>
<!-- -->
<string name="empty_relay_inviter">This list of devies is
<string name="empty_relay_inviter">This list of devices is
empty. Use the \"Scan games\" button to scan your old games
for opponents. Use the + button to enter device IDs directly.</string>
for opponents. Use the \"+\" button to enter device IDs directly.</string>
<!-- -->
<string name="get_sms_number">Enter phone number:</string>
<string name="get_relay_number">Enter device ID:</string>

View file

@ -64,8 +64,10 @@ public class BTInviteDelegate extends InviteDelegate {
intent.putExtra( INTENT_KEY_NMISSING, nMissing );
if ( null != info ) {
String lastDev = info.getLastDev( InviteMeans.BLUETOOTH );
if ( null != lastDev ) {
intent.putExtra( INTENT_KEY_LASTDEV, lastDev );
}
}
activity.startActivityForResult( intent, requestCode.ordinal() );
}

View file

@ -472,7 +472,6 @@ public class DBUtils {
// care only that it's non-0.
public int getMinPlayerCount() {
if ( -1 == m_cachedCount ) {
DbgUtils.logf( "getMinPlayerCount(%H)", this );
int count = m_timestamps.size();
Map<InviteMeans, Set<String>> hashes
= new HashMap<InviteMeans, Set<String>>();
@ -481,7 +480,6 @@ public class DBUtils {
InviteMeans means = m_means.get(ii);
Set<String> devs;
if ( ! hashes.containsKey( means ) ) {
DbgUtils.logf( "creating new hash for means %s", means.toString() );
devs = new HashSet<String>();
hashes.put( means, devs );
}
@ -491,7 +489,6 @@ public class DBUtils {
target = String.format( "%d", ++fakeCount );
}
devs.add( target );
DbgUtils.logf( "added target %s for means %s", target, means.toString() );
}
// Now find the max
@ -500,12 +497,9 @@ public class DBUtils {
if ( hashes.containsKey( means ) ) {
int siz = hashes.get( means ).size();
m_cachedCount += siz;
DbgUtils.logf( "counting: means %s has unique count of %d",
means.toString(), siz );
}
}
}
DbgUtils.logf( "getMinPlayerCount(%H) => %d", this, m_cachedCount );
return m_cachedCount;
}
@ -2244,7 +2238,7 @@ public class DBUtils {
public static void setIntFor( Context context, String key, int value )
{
DbgUtils.logdf( "DBUtils.setIntFor(key=%s, val=%d)", key, value );
// DbgUtils.logdf( "DBUtils.setIntFor(key=%s, val=%d)", key, value );
String asStr = String.format( "%d", value );
setStringFor( context, key, asStr );
}
@ -2255,7 +2249,7 @@ public class DBUtils {
if ( null != asStr ) {
dflt = Integer.parseInt( asStr );
}
DbgUtils.logdf( "DBUtils.getIntFor(key=%s)=>%d", key, dflt );
// DbgUtils.logdf( "DBUtils.getIntFor(key=%s)=>%d", key, dflt );
return dflt;
}
@ -2272,7 +2266,7 @@ public class DBUtils {
if ( null != asStr ) {
dflt = Boolean.parseBoolean( asStr );
}
DbgUtils.logdf( "DBUtils.getBoolFor(key=%s)=>%b", key, dflt );
// DbgUtils.logdf( "DBUtils.getBoolFor(key=%s)=>%b", key, dflt );
return dflt;
}
@ -2288,7 +2282,7 @@ public class DBUtils {
};
String newVal = getModStringFor( context, key, proc );
int asInt = Integer.parseInt( newVal );
DbgUtils.logf( "getIncrementIntFor(%s) => %d", key, asInt );
// DbgUtils.logf( "getIncrementIntFor(%s) => %d", key, asInt );
return asInt;
}

View file

@ -462,7 +462,7 @@ public class GameUtils {
public static long makeNewMultiGame( Context context, NetLaunchInfo nli,
MultiMsgSink sink, UtilCtxt util )
{
DbgUtils.logf( "makeNewMultiGame(nli=%s)", nli.toString() );
DbgUtils.logdf( "makeNewMultiGame(nli=%s)", nli.toString() );
CommsAddrRec addr = nli.makeAddrRec( context );
return makeNewMultiGame( context, sink, util, DBUtils.GROUPID_UNSPEC,

View file

@ -58,7 +58,7 @@ public class XWService extends Service {
if ( null != s_srcMgr ) {
s_srcMgr.sendResult( event, args );
} else {
DbgUtils.logf( "XWService.sendResult: dropping %s event", event.toString() );
DbgUtils.logdf( "XWService.sendResult: dropping %s event", event.toString() );
}
}
@ -74,7 +74,7 @@ public class XWService extends Service {
s_seen.add( inviteID );
}
}
DbgUtils.logf( "XWService.checkNotDupe(%s) => %b", inviteID, !isDupe );
DbgUtils.logdf( "XWService.checkNotDupe(%s) => %b", inviteID, !isDupe );
return !isDupe;
}