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

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

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

parents 11f81392 feee0dda
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -160,7 +160,7 @@ public class A2dpService extends ProfileService {
    }
    }


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


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


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


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


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


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


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


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


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


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


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


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


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


    //Profile services will not be automatically restarted.
    //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
     * Called in {@link #onDestroy()} when this object is completely discarded
     *
     * @return True in successful condition, False otherwise
     */
     */
    protected boolean cleanup() {
    protected void cleanup() {}
        return true;
    }


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