debug features and logging are always on/available for debug builds

This commit is contained in:
Eric House 2013-11-15 20:52:05 -08:00
parent 088dd1bd75
commit f303fa2653
4 changed files with 12 additions and 4 deletions

View file

@ -132,6 +132,11 @@
<string name="redir_host">Invite redirect host</string>
<string name="dict_host">Wordlist download URL</string>
<string name="logging_on">Enable logging</string>
<string name="logging_on_summary">(release builds only)</string>
<string name="debug_features">Enable debug features</string>
<string name="debug_features_summary">Menuitems etc. (release builds
only)</string>
<string name="git_rev_title">Source version id</string>
<string name="relay_port">Relay game port</string>
<string name="proxy_port">Relay device port</string>

View file

@ -311,11 +311,12 @@
/>
<CheckBoxPreference android:key="@string/key_logging_on"
android:title="@string/logging_on"
android:summary="@string/logging_on_summary"
android:defaultValue="false"
/>
<CheckBoxPreference android:key="@string/key_enable_debug"
android:title="Enable debug features"
android:summary="Menuitems etc."
android:title="@string/debug_features"
android:summary="@string/debug_features_summary"
android:defaultValue="false"
/>

View file

@ -665,7 +665,8 @@ public class GamesList extends XWExpandableListActivity
if ( m_menuPrepared ) {
boolean nothingSelected = 0 == (nGroupsSelected + nGamesSelected);
boolean showDbg = XWPrefs.getDebugEnabled( this );
boolean showDbg = BuildConstants.IS_DEBUG_BUILD
|| XWPrefs.getDebugEnabled( this );
showItemsIf( DEBUG_ITEMS, menu, nothingSelected && showDbg );
Utils.setItemVisible( menu, R.id.games_menu_loaddb,
showDbg && !DBUtils.gameDBExists( this ) );

View file

@ -35,7 +35,8 @@ public class XWSumListPreference extends XWListPreference {
{
super.onAttachedToActivity();
if ( XWPrefs.getDebugEnabled( m_context ) ) {
if ( BuildConstants.IS_DEBUG_BUILD ||
XWPrefs.getDebugEnabled( m_context ) ) {
CharSequence[] entries = getEntries();
String lastRow
= m_context.getString( R.string.game_summary_field_rowid );