mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
remove option of disabling foreground service
Since it's not going to be running all the time any more.
This commit is contained in:
parent
9537100399
commit
546e5416dc
7 changed files with 1 additions and 31 deletions
|
@ -376,9 +376,7 @@ public class BTService extends XWService {
|
|||
Log.d( TAG, "startService(%s); inForeground = %b", intent, inForeground );
|
||||
|
||||
if ( ! inForeground && canRunForegroundService() ) {
|
||||
if ( XWPrefs.getBTBackgroundEnabled( context ) ) {
|
||||
context.startForegroundService( intent );
|
||||
}
|
||||
} else if ( inForeground || Build.VERSION.SDK_INT < Build.VERSION_CODES.O ) {
|
||||
context.startService( intent );
|
||||
} else {
|
||||
|
|
|
@ -56,7 +56,6 @@ public class DlgDelegate {
|
|||
SET_HIDE_NEWGAME_BUTTONS,
|
||||
DWNLD_LOC_DICT,
|
||||
NEW_GAME_DFLT_NAME,
|
||||
DISABLE_BT_BACK,
|
||||
|
||||
// BoardDelegate
|
||||
UNDO_LAST_ACTION,
|
||||
|
|
|
@ -1359,10 +1359,6 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
true );
|
||||
break;
|
||||
|
||||
case DISABLE_BT_BACK:
|
||||
XWPrefs.setBTBackgroundEnabled( m_activity, false );
|
||||
break;
|
||||
|
||||
default:
|
||||
handled = super.onPosButton( action, params );
|
||||
}
|
||||
|
@ -2274,11 +2270,8 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
private void tryBackgroundIntent( Intent intent )
|
||||
{
|
||||
if ( intent.getBooleanExtra( BACKGROUND_EXTRA, false ) ) {
|
||||
ActionPair pair = new ActionPair( Action.DISABLE_BT_BACK,
|
||||
R.string.disable_bt_back );
|
||||
makeNotAgainBuilder( R.string.not_again_btservice,
|
||||
R.string.key_notagain_btservice )
|
||||
.setActionPair( pair )
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,16 +51,6 @@ public class XWPrefs {
|
|||
setPrefsBoolean( context, R.string.key_enable_sms, enabled );
|
||||
}
|
||||
|
||||
public static void setBTBackgroundEnabled( Context context, boolean enabled )
|
||||
{
|
||||
setPrefsBoolean( context, R.string.key_btback_enabled, enabled );
|
||||
}
|
||||
|
||||
public static boolean getBTBackgroundEnabled( Context context )
|
||||
{
|
||||
return getPrefsBoolean( context, R.string.key_btback_enabled, true );
|
||||
}
|
||||
|
||||
public static boolean getDebugEnabled( Context context )
|
||||
{
|
||||
return getPrefsBoolean( context, R.string.key_enable_debug, false );
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
<string name="key_notify_sound">key_notify_sound</string>
|
||||
<string name="key_disable_relay">key_disable_relay</string>
|
||||
<string name="key_notify_vibrate">key_notify_vibrate</string>
|
||||
<string name="key_btback_enabled">key_btback_enabled</string>
|
||||
<string name="key_enable_sms">key_enable_sms</string>
|
||||
<string name="key_enable_p2p">key_enable_p2p</string>
|
||||
<string name="key_network_behavior">key_network_behavior</string>
|
||||
|
|
|
@ -2029,8 +2029,6 @@
|
|||
<string name="title_enable_p2p">Enable WiFi Direct</string>
|
||||
<string name="summary_enable_p2p">Experimental, uses lots of battery</string>
|
||||
|
||||
<string name="title_btback_enabled">Enable background Bluetooth</string>
|
||||
<string name="summary_btback_enabled">Always listen for Bluetooth messages</string>
|
||||
<string name="bkng_notify_text">Accepting Bluetooth messages…</string>
|
||||
|
||||
<!-- -->
|
||||
|
@ -2656,8 +2654,6 @@
|
|||
Bluetooth moves and invitations while in the foreground, but any
|
||||
sent while it\'s in the background will be lost.</string>
|
||||
|
||||
<string name="disable_bt_back">Disable Background</string>
|
||||
|
||||
<string name="no_invites">This game has sent no invitations</string>
|
||||
|
||||
<string name="disable_dualpane">Disable side-by-side</string>
|
||||
|
|
|
@ -335,11 +335,6 @@
|
|||
android:summary="@string/notify_other_summary"
|
||||
android:defaultValue="false"
|
||||
/>
|
||||
<CheckBoxPreference android:key="@string/key_btback_enabled"
|
||||
android:title="@string/title_btback_enabled"
|
||||
android:summary="@string/summary_btback_enabled"
|
||||
android:defaultValue="true"
|
||||
/>
|
||||
<CheckBoxPreference android:key="@string/key_enable_p2p"
|
||||
android:title="@string/title_enable_p2p"
|
||||
android:summary="@string/summary_enable_p2p"
|
||||
|
|
Loading…
Reference in a new issue