From ed1e2a0812a0d65c6441d01b0f92b4f8a798f6ab Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 5 Jun 2013 21:14:51 -0700 Subject: [PATCH] fix formatting -- no code change --- .../eehouse/android/xw4/BoardActivity.java | 2 +- .../eehouse/android/xw4/FirstRunDialog.java | 54 +++++++++---------- .../eehouse/android/xw4/GCMIntentService.java | 2 +- .../org/eehouse/android/xw4/GameUtils.java | 2 +- .../src/org/eehouse/android/xw4/Utils.java | 2 +- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java index 235d9deea..eadcc7733 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java @@ -150,7 +150,7 @@ public class BoardActivity extends XWActivity private boolean m_gameOver = false; // call startActivityForResult synchronously - private Semaphore m_forResultWait = new Semaphore(0); + private Semaphore m_forResultWait = new Semaphore(0); private int m_resultCode; private Thread m_blockingThread; diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/FirstRunDialog.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/FirstRunDialog.java index ef23499d7..2e2365bd0 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/FirstRunDialog.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/FirstRunDialog.java @@ -37,48 +37,48 @@ public class FirstRunDialog { { String page = null; InputStream inputStream = null; - try { + try { inputStream = context.getResources() .openRawResource(R.raw.changes); - - final char[] buf = new char[0x1000]; - StringBuilder stringBuilder = new StringBuilder(); - Reader reader = new InputStreamReader( inputStream, "UTF-8" ); - int nRead; - do { + + final char[] buf = new char[0x1000]; + StringBuilder stringBuilder = new StringBuilder(); + Reader reader = new InputStreamReader( inputStream, "UTF-8" ); + int nRead; + do { nRead = reader.read( buf, 0, buf.length ); if ( nRead > 0 ) { stringBuilder.append( buf, 0, nRead ); } - } while ( nRead >= 0 ); - - page = stringBuilder.toString(); - } - catch ( IOException ioe ) { - DbgUtils.loge( ioe ); - } - finally { + } while ( nRead >= 0 ); + + page = stringBuilder.toString(); + } + catch ( IOException ioe ) { + DbgUtils.loge( ioe ); + } + finally { // could just catch NPE.... - if ( null != inputStream ) { - try { - inputStream.close(); - } catch ( IOException ioe ) { + if ( null != inputStream ) { + try { + inputStream.close(); + } catch ( IOException ioe ) { DbgUtils.loge( ioe ); - } - } - } - + } + } + } + // This won't support e.g mailto refs. Probably want to // launch the browser with an intent eventually. - WebView view = new WebView( context ); - view.loadData( page, "text/html", "utf-8" ); + WebView view = new WebView( context ); + view.loadData( page, "text/html", "utf-8" ); - AlertDialog dialog = new AlertDialog.Builder( context ) + AlertDialog dialog = new AlertDialog.Builder( context ) .setIcon(android.R.drawable.ic_menu_info_details) .setTitle( R.string.changes_title ) .setView( view ) .setPositiveButton( R.string.button_ok, null) .create(); - dialog.show(); + dialog.show(); } } diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GCMIntentService.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GCMIntentService.java index 99945ca0a..c6038450a 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GCMIntentService.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GCMIntentService.java @@ -34,7 +34,7 @@ public class GCMIntentService extends GCMBaseIntentService { super( GCMConsts.SENDER_ID ); } - @Override + @Override protected void onError( Context context, String error ) { DbgUtils.logf("GCMIntentService.onError(%s)", error ); diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java index 3a55b792f..4a4e4d9bd 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java @@ -282,7 +282,7 @@ public class GameUtils { } public static long saveNewGame( Context context, int gamePtr, - CurGameInfo gi ) + CurGameInfo gi ) { byte[] stream = XwJNI.game_saveToStream( gamePtr, gi ); GameLock lock = DBUtils.saveNewGame( context, stream ); diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/Utils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/Utils.java index 0c1895f90..035d5bb03 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/Utils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/Utils.java @@ -60,7 +60,7 @@ public class Utils { public static final int TURN_COLOR = 0x7F00FF00; private static final String DB_PATH = "XW_GAMES"; - private static final String HIDDEN_PREFS = "xwprefs_hidden"; + private static final String HIDDEN_PREFS = "xwprefs_hidden"; private static final String SHOWN_VERSION_KEY = "SHOWN_VERSION_KEY"; private static Boolean s_isFirstBootThisVersion = null;