This patch series improves the code for reconnecting to an IRC server
after a disconnection.
Patch 2 ensures that only one copy of the reconnect dialog is open at
any one time, makes sure the option to reconnect is offered consistently
without regard to whether a ConversationActivity is active or not, and
prevents conversation history from being cleared on reconnect.
Patch 3 implements multiple reconnection attempts, with a preference to
control how often a reconnection is retried.
The first patch (which is to PircBot, and potentially appropriate for
upstream) fixes a crash which can be triggered by the other two.
The patches have been tested on a Nexus S running 2.3.4, and makes Yaaic
significantly more usable on unreliable cellular network connections.
PS: I finally figured out how to subscribe to the list, so no need to cc
me on replies ...
Steven Luo (3):
PircBot: Gracefully handle disposing of the PircBot before I/O
threads are started
Make reconnections actually work
Fix auto-reconnect
application/res/values/arrays.xml | 16 ++++
application/res/values/settings.xml | 3 +
application/res/values/strings.xml | 3 +
application/res/xml/preferences.xml | 9 ++
application/src/org/jibble/pircbot/PircBot.java | 8 ++-
.../org/yaaic/activity/ConversationActivity.java | 25 ++++---
.../src/org/yaaic/activity/ServersActivity.java | 4 +-
application/src/org/yaaic/irc/IRCConnection.java | 4 +-
application/src/org/yaaic/irc/IRCService.java | 85 ++++++++++++++++++--
application/src/org/yaaic/model/Broadcast.java | 1 +
application/src/org/yaaic/model/Server.java | 17 ++++
application/src/org/yaaic/model/Settings.java | 13 +++
.../src/org/yaaic/receiver/ReconnectReceiver.java | 64 +++++++++++++++
13 files changed, 231 insertions(+), 21 deletions(-)
create mode 100644 application/src/org/yaaic/receiver/ReconnectReceiver.java
--
1.7.2.5