Merge branch 'android_branch' into android_bt

This commit is contained in:
Eric House 2012-02-06 18:13:57 -08:00
commit 796baffa6d
3 changed files with 15 additions and 34 deletions

View file

@ -1105,7 +1105,7 @@ Java_org_eehouse_android_xw4_jni_XwJNI_game_1summarize
XP_UCHAR buf[128];
XP_U16 len = VSIZE(buf);
if ( comms_getRelayID( comms, buf, &len ) ) {
buf[len] = '\0';
XP_ASSERT( '\0' == buf[len] );
setString( env, jsummary, "relayID", buf );
}
setString( env, jsummary, "roomName", addr.u.ip_relay.invite );

View file

@ -458,17 +458,9 @@ public class DBUtils {
Cursor cursor = db.query( DBHelper.TABLE_NAME_SUM, columns,
selection, null, null, null, null );
if ( 0 < cursor.getCount() ) {
cursor.moveToFirst();
for ( ; ; ) {
ids.add( cursor.
getString( cursor.
while ( cursor.moveToNext() ) {
ids.add( cursor.getString( cursor.
getColumnIndex(DBHelper.RELAYID)) );
if ( cursor.isLast() ) {
break;
}
cursor.moveToNext();
}
}
cursor.close();
db.close();
@ -513,17 +505,12 @@ public class DBUtils {
Cursor cursor = db.query( DBHelper.TABLE_NAME_OBITS, columns,
null, null, null, null, null );
if ( 0 < cursor.getCount() ) {
cursor.moveToFirst();
for ( ; ; ) {
int index = cursor.getColumnIndex( DBHelper.RELAYID );
String relayID = cursor.getString( index );
index = cursor.getColumnIndex( DBHelper.SEED );
int seed = cursor.getInt( index );
int idIndex = cursor.getColumnIndex( DBHelper.RELAYID );
int seedIndex = cursor.getColumnIndex( DBHelper.SEED );
while ( cursor.moveToNext() ) {
String relayID = cursor.getString( idIndex );
int seed = cursor.getInt( seedIndex );
al.add( new Obit( relayID, seed ) );
if ( cursor.isLast() ) {
break;
}
cursor.moveToNext();
}
}
cursor.close();
@ -678,17 +665,9 @@ public class DBUtils {
null, null, null, null, orderBy );
int count = cursor.getCount();
result = new long[count];
if ( 0 < count ) {
int index = cursor.getColumnIndex( ROW_ID );
cursor.moveToFirst();
for ( int ii = 0; ; ++ii ) {
for ( int ii = 0; cursor.moveToNext(); ++ii ) {
result[ii] = cursor.getLong( index );
if ( cursor.isLast() ) {
break;
}
cursor.moveToNext();
}
}
cursor.close();
db.close();

View file

@ -84,6 +84,7 @@ $cols = array( new Column("dead", "D", "identity", false ),
new Column("room", "Room", "identity", false ),
new Column("lang", "Lang", "int_to_lang", false ),
new Column("ntotal", "Tot", "identity", false ),
new Column("clntVers", "CV", "identity", true ),
new Column("nperdevice", "NP", "identity", true ),
new Column("ack", "A", "identity", true ),
new Column("nsent", "Sent", "identity", false ),
@ -137,7 +138,8 @@ while ( $row = pg_fetch_array($result) ) {
for ( $devIndex = 0; $devIndex < $nrows; ++$devIndex ) {
echo "<tr class=\"" . ((0 == ($count % 2)) ? "even" : "odd") . "\">";
if ( 0 == $devIndex ) {
echo "<td rowspan=$nrows>$count</td>";
$visCount = $count + 1;
echo "<td rowspan=$nrows>$visCount</td>";
}
foreach ( $cols as $index => $col ) {
$col->printTD( $devIndex, $nrows, $row[$index] );