Skip to content
Snippets Groups Projects
Commit 0f550ee2 authored by Alexandre Lision's avatar Alexandre Lision
Browse files

* #32662: better SipService lifecycle

parent fda4d1de
No related branches found
No related tags found
No related merge requests found
......@@ -137,6 +137,7 @@ public class SFLPhoneHomeActivity extends Activity implements DialingFragment.Ca
if (!mBound) {
Log.i(TAG, "onStart: Binding service...");
Intent intent = new Intent(this, SipService.class);
startService(intent);
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
}
......
......@@ -93,8 +93,12 @@ public class SipService extends Service {
public boolean onUnbind(Intent i) {
super.onUnbind(i);
Log.i(TAG, "onUnbind(intent)");
return false;
return true;
}
@Override
public void onRebind(Intent i){
super.onRebind(i);
}
/* called once by startService() */
......@@ -132,7 +136,7 @@ public class SipService extends Service {
receiver = new IncomingReceiver(this, mBinder);
return START_NOT_STICKY; /* started and stopped explicitly */
return START_STICKY; /* started and stopped explicitly */
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment