kill progress when owner view goes away

BT Invite progress was sticking around when Board left because it wasn't
foreground.
This commit is contained in:
Eric House 2019-01-08 13:55:55 -08:00
parent 2c73f4ca77
commit f18a957ed5
5 changed files with 14 additions and 8 deletions

View file

@ -159,6 +159,7 @@ public class DelegateBase implements DlgClickNotify,
{ {
m_isVisible = false; m_isVisible = false;
XWServiceHelper.setListener( null ); XWServiceHelper.setListener( null );
m_dlgDelegate.onPausing();
} }
protected DelegateBase curThis() protected DelegateBase curThis()

View file

@ -326,6 +326,11 @@ public class DlgDelegate {
m_handler = new Handler(); m_handler = new Handler();
} }
void onPausing()
{
stopProgress();
}
private void showOKOnlyDialogThen( String msg, Action action, private void showOKOnlyDialogThen( String msg, Action action,
Object[] params, int titleId ) Object[] params, int titleId )
{ {

View file

@ -171,13 +171,7 @@ abstract class InviteDelegate extends ListDelegateBase
} }
} }
protected void onBarButtonClicked( int id ) abstract void onBarButtonClicked( int id );
{
Assert.fail(); // subclass must implement
}
// Subclasses can do something here
protected void addToButtonBar( FrameLayout container ) {}
//////////////////////////////////////// ////////////////////////////////////////
// View.OnClickListener // View.OnClickListener

View file

@ -77,6 +77,12 @@ public class WiDirInviteDelegate extends InviteDelegate
WiDirService.unregisterDevSetListener( this ); WiDirService.unregisterDevSetListener( this );
} }
protected void onBarButtonClicked( int id )
{
// not implemented yet as there's no bar button
Assert.assertFalse( BuildConfig.DEBUG );
}
@Override @Override
protected void onChildAdded( View child, InviterItem data ) protected void onChildAdded( View child, InviterItem data )
{ {

View file

@ -1835,7 +1835,7 @@
<string name="button_scan">Rescan</string> <string name="button_scan">Rescan</string>
<!-- --> <!-- -->
<string name="invite_progress_title">Connecting...</string> <string name="invite_progress_title">Connecting</string>
<string name="invite_progress_fmt">Sending invitation to CrossWords on %1$s</string> <string name="invite_progress_fmt">Sending invitation to CrossWords on %1$s</string>
<!-- --> <!-- -->
<string name="summary_wait_host">Waiting for connection[s]</string> <string name="summary_wait_host">Waiting for connection[s]</string>