Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2369792 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Return generic Binder on onBind

By returning a generic Binder on onBind in
ImsServiceBase, we can detect when the process
crashes and restart the service, if necessary.

Test: Telephony Unit Tests
Change-Id: I2fbe2708c3df37704f0c526210267a35c75ee1eb
parent 3e6c189c
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.telephony.ims;
import android.annotation.SystemApi;
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;

/**
@@ -30,8 +31,15 @@ import android.os.IBinder;
@SystemApi
public class ImsServiceBase extends Service {

    /**
     * Binder connection that does nothing but keep the connection between this Service and the
     * framework active. If this service crashes, the framework will be notified.
     */
    private IBinder mConnection = new Binder();

    @Override
    public IBinder onBind(Intent intent) {
        return null;
        return mConnection;
    }

}