# HG changeset patch # User Da Risk # Date 1354107105 -3600 # Node ID 42cfd51dc57e41f5395b70e7f9f2c8d7a9e2f90b # Parent b825f2773bd6c270750b726d572f4d10bab53e14 Disable stopping the service if it wasnot explicitelly requested by user. diff -r b825f2773bd6 -r 42cfd51dc57e src/com/beem/project/beem/BeemService.java --- a/src/com/beem/project/beem/BeemService.java Sun Jan 06 18:27:57 2013 +0100 +++ b/src/com/beem/project/beem/BeemService.java Wed Nov 28 13:51:45 2012 +0100 @@ -218,7 +218,9 @@ public boolean onUnbind(Intent intent) { Log.d(TAG, "ONUNBIND()"); if (mConnection != null && !mConnection.getAdaptee().isConnected()) { - this.stopSelf(); + // Disable stopping the service if it was not explicitely requested by the user + // by changing status or disconnect + // this.stopSelf(); } return true; } diff -r b825f2773bd6 -r 42cfd51dc57e src/com/beem/project/beem/service/XmppConnectionAdapter.java --- a/src/com/beem/project/beem/service/XmppConnectionAdapter.java Sun Jan 06 18:27:57 2013 +0100 +++ b/src/com/beem/project/beem/service/XmppConnectionAdapter.java Wed Nov 28 13:51:45 2012 +0100 @@ -577,7 +577,9 @@ Intent intent = new Intent(BeemBroadcastReceiver.BEEM_CONNECTION_CLOSED); intent.putExtra("message", exception.getMessage()); mService.sendBroadcast(intent); - mService.stopSelf(); + // Disable stopping the service if it was not explicitely requested by the user + // by changing status or disconnect + // mService.stopSelf(); resetApplication(); } diff -r b825f2773bd6 -r 42cfd51dc57e src/com/beem/project/beem/utils/BeemBroadcastReceiver.java --- a/src/com/beem/project/beem/utils/BeemBroadcastReceiver.java Sun Jan 06 18:27:57 2013 +0100 +++ b/src/com/beem/project/beem/utils/BeemBroadcastReceiver.java Wed Nov 28 13:51:45 2012 +0100 @@ -86,7 +86,9 @@ if (intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false)) { Toast.makeText(context, context.getString(R.string.BeemBroadcastReceiverDisconnect), Toast.LENGTH_SHORT).show(); - context.stopService(new Intent(context, BeemService.class)); + // Disable stopping the service if it was not explicitely requested by the user + // by changing status or disconnect +// context.stopService(new Intent(context, BeemService.class)); } } }