mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
Merge branch 'android_branch' into android_invite
Conflicts: xwords4/android/XWords4/res/values/common_rsrc.xml xwords4/android/XWords4/res/values/strings.xml xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CurGameInfo.java xwords4/linux/scripts/discon_ok2.sh
This commit is contained in:
commit
0c4191805f
8 changed files with 61 additions and 9 deletions
|
@ -22,7 +22,7 @@
|
|||
to come from a domain that you own or have control over. -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.eehouse.android.xw4"
|
||||
android:versionCode="21"
|
||||
android:versionCode="22"
|
||||
android:versionName="@string/app_version"
|
||||
>
|
||||
|
||||
|
|
|
@ -6,14 +6,26 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<b>Crosswords 4.4 beta 28 release</b>
|
||||
<b>Crosswords 4.4 beta 29 release</b>
|
||||
|
||||
<ul>
|
||||
<li>By request: Add preference to leave screen on while you're
|
||||
thinking about a move</li>
|
||||
|
||||
<li>By request: Add preference to auto-juggle players when creating
|
||||
a new game</li>
|
||||
|
||||
<li>Fix various rare crashers reported via devices through google</li>
|
||||
|
||||
<li>fix nasty memory leak inside native code introduced when players
|
||||
got to have their own dictionaries</li>
|
||||
|
||||
<li>fix bug where moves were lost among networked games with more
|
||||
than two devices</li>
|
||||
|
||||
<ul>Quick fixes
|
||||
<li>Fix crash that so far happens on only one device -- my wife's</li>
|
||||
|
||||
<li>Fix contrast problems when using light-on-dark scheme.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>Please remember that this is beta software. Please let me know (at
|
||||
eehouse@eehouse.org) what's broken and what features you'd most like
|
||||
to see.</p>
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
<string name="key_notify_sound">key_notify_sound</string>
|
||||
<string name="key_notify_vibrate">key_notify_vibrate</string>
|
||||
<string name="key_hide_intro">key_hide_intro</string>
|
||||
<string name="key_keep_screenon">key_keep_screenon</string>
|
||||
|
||||
<string name="key_notagain_sync">key_notagain_sync</string>
|
||||
<string name="key_notagain_chat">key_notagain_chat</string>
|
||||
|
@ -76,7 +77,7 @@
|
|||
|
||||
<!-- <string name="default_host">10.0.2.2</string> -->
|
||||
<string name="dict_url">http://eehouse.org/and_dicts_hh</string>
|
||||
<string name="app_version">4.4 beta 28</string>
|
||||
<string name="app_version">4.4 beta 29</string>
|
||||
<string name="game_url_pathf">//%1$s/redir.php</string>
|
||||
|
||||
<!-- Debugging stuff. No point in localizing it. -->
|
||||
|
|
|
@ -225,7 +225,7 @@
|
|||
<string name="hints_allowed">Allow hints</string>
|
||||
<string name="hints_allowed_sum">Enable the hint feature</string>
|
||||
<string name="init_autojuggle">Juggle players</string>
|
||||
<string name="init_autojuggle_sum">Randomly re-order players</string>
|
||||
<string name="init_autojuggle_sum">Randomly, for new games</string>
|
||||
<string name="progress_title">Searching for moves</string>
|
||||
<string name="use_timer">Enable game timer</string>
|
||||
<string name="color_tiles">Color tiles</string>
|
||||
|
@ -234,6 +234,8 @@
|
|||
<string name="show_arrow">Show board arrow</string>
|
||||
<string name="show_arrow_summary">Tapped rack tiles land on this
|
||||
arrow when it is visible</string>
|
||||
<string name="keep_screenon">Keep screen on</string>
|
||||
<string name="keep_screenon_summary">Keep board screen on 10 mins</string>
|
||||
<string name="explain_robot">Explain other moves</string>
|
||||
<string name="explain_robot_summary">Display score summary after
|
||||
every robot or remote turn</string>
|
||||
|
|
|
@ -113,6 +113,11 @@
|
|||
android:summary="@string/show_arrow_summary"
|
||||
android:defaultValue="true"
|
||||
/>
|
||||
<CheckBoxPreference android:key="@string/key_keep_screenon"
|
||||
android:title="@string/keep_screenon"
|
||||
android:summary="@string/keep_screenon_summary"
|
||||
android:defaultValue="false"
|
||||
/>
|
||||
|
||||
<PreferenceScreen android:title="@string/prefs_colors"
|
||||
android:summary="@string/prefs_colors_summary"
|
||||
|
|
|
@ -70,6 +70,7 @@ public class BoardActivity extends XWActivity
|
|||
private static final int DLG_INVITE = DLG_OKONLY + 9;
|
||||
|
||||
private static final int CHAT_REQUEST = 1;
|
||||
private static final int SCREEN_ON_TIME = 10 * 60 * 1000; // 10 mins
|
||||
|
||||
private BoardView m_view;
|
||||
private int m_jniGamePtr;
|
||||
|
@ -78,6 +79,7 @@ public class BoardActivity extends XWActivity
|
|||
CommsTransport m_xport;
|
||||
private Handler m_handler;
|
||||
private TimerRunnable[] m_timers;
|
||||
private Runnable m_screenTimer;
|
||||
private String m_name;
|
||||
private Toolbar m_toolbar;
|
||||
private ArrayList<String> m_pendingChats = new ArrayList<String>();
|
||||
|
@ -335,6 +337,7 @@ public class BoardActivity extends XWActivity
|
|||
m_haveInvited = intent.getBooleanExtra( GameUtils.INVITED, false );
|
||||
|
||||
setBackgroundColor();
|
||||
setKeepScreenOn();
|
||||
} // onCreate
|
||||
|
||||
@Override
|
||||
|
@ -348,6 +351,7 @@ public class BoardActivity extends XWActivity
|
|||
protected void onResume()
|
||||
{
|
||||
super.onResume();
|
||||
setKeepScreenOn();
|
||||
loadGame();
|
||||
}
|
||||
|
||||
|
@ -376,7 +380,9 @@ public class BoardActivity extends XWActivity
|
|||
if ( null != m_jniThread ) {
|
||||
m_jniThread.handle( JNIThread.JNICmd.CMD_PREFS_CHANGE );
|
||||
}
|
||||
// in case of change...
|
||||
setBackgroundColor();
|
||||
setKeepScreenOn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1342,4 +1348,25 @@ public class BoardActivity extends XWActivity
|
|||
m_view.getRootView().setBackgroundColor( back );
|
||||
}
|
||||
|
||||
private void setKeepScreenOn()
|
||||
{
|
||||
boolean keepOn = CommonPrefs.getKeepScreenOn( this );
|
||||
m_view.setKeepScreenOn( keepOn );
|
||||
|
||||
if ( keepOn ) {
|
||||
if ( null == m_screenTimer ) {
|
||||
m_screenTimer = new Runnable() {
|
||||
public void run() {
|
||||
Utils.logf( "run() called for setKeepScreenOn()" );
|
||||
if ( null != m_view ) {
|
||||
m_view.setKeepScreenOn( false );
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
m_handler.removeCallbacks( m_screenTimer ); // needed?
|
||||
m_handler.postDelayed( m_screenTimer, SCREEN_ON_TIME );
|
||||
}
|
||||
}
|
||||
|
||||
} // class BoardActivity
|
||||
|
|
|
@ -558,7 +558,7 @@ public class GamesList extends XWListActivity
|
|||
if ( null != relayIDs ) {
|
||||
for ( String relayID : relayIDs ) {
|
||||
String path = DBUtils.getPathFor( this, relayID );
|
||||
if ( GameUtils.gameDictsHere( this, path ) ) {
|
||||
if ( null != path && GameUtils.gameDictsHere( this, path ) ) {
|
||||
GameUtils.launchGame( this, path );
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -311,6 +311,11 @@ public class CommonPrefs {
|
|||
return getPrefsBoolean( context, R.string.key_hide_intro, false );
|
||||
}
|
||||
|
||||
public static boolean getKeepScreenOn( Context context )
|
||||
{
|
||||
return getPrefsBoolean( context, R.string.key_keep_screenon, false );
|
||||
}
|
||||
|
||||
public static boolean getPrefsBoolean( Context context, int keyID,
|
||||
boolean defaultValue )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue