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

Commit 2ea27ea9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "ProfileService: Change cleanup() to return void"

parents 1d02dfb5 970d0152
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -160,7 +160,7 @@ public class A2dpService extends ProfileService {
    }

    @Override
    protected boolean cleanup() {
    protected void cleanup() {
        if (DBG) {
            Log.d(TAG, "cleanup()");
        }
@@ -178,7 +178,6 @@ public class A2dpService extends ProfileService {
            mAvrcp = null;
        }
        clearA2dpService();
        return true;
    }

    //API Methods
@@ -424,9 +423,8 @@ public class A2dpService extends ProfileService {
        }

        @Override
        public boolean cleanup() {
        public void cleanup() {
            mService = null;
            return true;
        }

        @Override
+2 −4
Original line number Diff line number Diff line
@@ -80,12 +80,11 @@ public class A2dpSinkService extends ProfileService {
    }

    @Override
    protected boolean cleanup() {
    protected void cleanup() {
        if (mStateMachine != null) {
            mStateMachine.cleanup();
        }
        clearA2dpSinkService();
        return true;
    }

    //API Methods
@@ -276,9 +275,8 @@ public class A2dpSinkService extends ProfileService {
        }

        @Override
        public boolean cleanup() {
        public void cleanup() {
            mService = null;
            return true;
        }

        @Override
+1 −2
Original line number Diff line number Diff line
@@ -662,9 +662,8 @@ public class AvrcpControllerService extends ProfileService {
        }

        @Override
        public boolean cleanup() {
        public void cleanup() {
            mService = null;
            return true;
        }

        @Override
+1 −2
Original line number Diff line number Diff line
@@ -830,9 +830,8 @@ public class AdapterService extends Service {
            mService = svc;
        }

        public boolean cleanup() {
        public void cleanup() {
            mService = null;
            return true;
        }

        public AdapterService getService() {
+5 −6
Original line number Diff line number Diff line
@@ -44,7 +44,10 @@ public abstract class ProfileService extends Service {
            android.Manifest.permission.BLUETOOTH_PRIVILEGED;

    public interface IProfileServiceBinder extends IBinder {
        boolean cleanup();
        /**
         * Called in {@link #onDestroy()}
         */
        void cleanup();
    }

    //Profile services will not be automatically restarted.
@@ -92,12 +95,8 @@ public abstract class ProfileService extends Service {

    /**
     * Called in {@link #onDestroy()} when this object is completely discarded
     *
     * @return True in successful condition, False otherwise
     */
    protected boolean cleanup() {
        return true;
    }
    protected void cleanup() {}

    protected ProfileService() {
        mName = getName();
Loading