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

Commit c0e7a041 authored by Jonathan Basseri's avatar Jonathan Basseri
Browse files

Fix logic error in CarrierService.

CarrierService is supposed to filter intents in onBind and only accept
valid actions. The logic was off so that it rejected all bind attempts.

This was tricky to track down because clients get no clear signal that
onBind is returning null.

Bug: 21571360
Change-Id: If37a52e30d0c7fd0205f23595f39be3d55db69d4
parent f0742bdf
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -86,11 +86,13 @@ public abstract class CarrierService extends Service {
    /** @hide */
    @Override
    public final IBinder onBind(Intent intent) {
        if (!CONFIG_SERVICE_INTERFACE.equals(intent.getAction())
            || !BIND_SERVICE_INTERFACE.equals(intent.getAction())) {
            return null;
        }
        switch (intent.getAction()) {
            case CONFIG_SERVICE_INTERFACE:
            case BIND_SERVICE_INTERFACE:
                return mStubWrapper;
            default:
                null;
        }
    }

    /**