mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-07 05:24:46 +01:00
in invite dialog, confirm before deleting BT devices
This commit is contained in:
parent
0da5d9dd28
commit
23e58524a1
3 changed files with 27 additions and 10 deletions
|
@ -159,12 +159,11 @@ public class BTInviteDelegate extends InviteDelegate {
|
|||
BTService.openBTSettings( m_activity );
|
||||
break;
|
||||
case R.id.button_clear:
|
||||
mPersisted.remove( getChecked() );
|
||||
store();
|
||||
|
||||
clearChecked();
|
||||
updateListAdapter( mPersisted.pairs );
|
||||
tryEnable();
|
||||
int count = getChecked().size();
|
||||
String msg = getQuantityString( R.plurals.confirm_clear_bt_fmt,
|
||||
count, count )
|
||||
+ getString( R.string.confirm_clear_bt_postscript );
|
||||
makeConfirmThenBuilder( msg, Action.CLEAR_ACTION ).show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -323,6 +322,14 @@ public class BTInviteDelegate extends InviteDelegate {
|
|||
case OPEN_BT_PREFS_ACTION:
|
||||
BTService.openBTSettings( m_activity );
|
||||
break;
|
||||
case CLEAR_ACTION:
|
||||
mPersisted.remove( getChecked() );
|
||||
store();
|
||||
|
||||
clearChecked();
|
||||
updateListAdapter( mPersisted.pairs );
|
||||
tryEnable();
|
||||
break;
|
||||
default:
|
||||
handled = super.onPosButton( action, params );
|
||||
}
|
||||
|
|
|
@ -196,12 +196,13 @@ public class RelayService extends JobIntentService
|
|||
enqueueWork( context, intent );
|
||||
}
|
||||
|
||||
// Must use the same lobID for all work enqueued for the same class
|
||||
// Must use the same jobID for all work enqueued for the same class
|
||||
private final static int sJobID = RelayService.class.hashCode();
|
||||
|
||||
private static void enqueueWork( Context context, Intent intent )
|
||||
{
|
||||
Log.d( TAG, "calling enqueueWork(cmd=%s)", cmdFrom( intent ) );
|
||||
Log.d( TAG, "calling enqueueWork(id=%d, cmd=%s)", sJobID,
|
||||
cmdFrom( intent ) );
|
||||
enqueueWork( context, RelayService.class, sJobID, intent );
|
||||
}
|
||||
|
||||
|
|
|
@ -1871,8 +1871,9 @@
|
|||
</plurals>
|
||||
|
||||
<!-- Appended to above -->
|
||||
<string name="invite_bt_desc_postscript">\n\n(The list is of devices you\'ve
|
||||
paired and on which CrossWords has been detected.)</string>
|
||||
<string name="invite_bt_desc_postscript">\n\n(The list is of
|
||||
paired devices on which CrossWords has been detected via a
|
||||
scan.)</string>
|
||||
|
||||
<plurals name="bt_scan_progress_fmt">
|
||||
<item quantity="one">Scanning for CrossWords</item>
|
||||
|
@ -1969,6 +1970,14 @@
|
|||
<item quantity="other">Are you sure you want to delete the
|
||||
%1$d checked RelayID records?</item>
|
||||
</plurals>
|
||||
<plurals name="confirm_clear_bt_fmt">
|
||||
<item quantity="one">Are you sure you want to forget the checked
|
||||
device?</item>
|
||||
<item quantity="other">Are you sure you want to forget %1$d
|
||||
checked devices?</item>
|
||||
</plurals>
|
||||
<string name="confirm_clear_bt_postscript">\n\n(You can re-add devices
|
||||
only when they are within BlueTooth range.)</string>
|
||||
|
||||
<!-- -->
|
||||
<string name="summary_conn_sms_fmt">Game in play with %1$s</string>
|
||||
|
|
Loading…
Reference in a new issue