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

Commit caa532b2 authored by David Duarte's avatar David Duarte Committed by Gerrit Code Review
Browse files

Merge "{AvrcpTarget,HeadsetClient}Service: Throw Exception on double start" into main

parents 8ad7fbc4 7ba1bfbe
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -190,8 +190,7 @@ public class AvrcpTargetService extends ProfileService {
    @Override
    protected boolean start() {
        if (sInstance != null) {
            Log.wtf(TAG, "The service has already been initialized");
            return false;
            throw new IllegalStateException("start() called twice");
        }

        IntentFilter userFilter = new IntentFilter();
+1 −2
Original line number Diff line number Diff line
@@ -107,8 +107,7 @@ public class HeadsetClientService extends ProfileService {
                Log.d(TAG, "start()");
            }
            if (getHeadsetClientService() != null) {
                Log.w(TAG, "start(): start called without stop");
                return false;
                throw new IllegalStateException("start() called twice");
            }

            mDatabaseManager = Objects.requireNonNull(