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

Commit af20138d authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by Android (Google) Code Review
Browse files

Merge "Avoid null plugins, so we never have to special case it"

parents 32e3b065 e1b8d8fc
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ public class RecommendationServiceImpl extends RecommendationService
    private static final String LOG_TAG = "PrintServiceRecService";

    /** All registered plugins */
    private ArrayList<RemotePrintServicePlugin> mPlugins;
    private final ArrayList<RemotePrintServicePlugin> mPlugins = new ArrayList<>();

    /** Lock to keep multi-cast enabled */
    private WifiManager.MulticastLock mMultiCastLock;
@@ -62,8 +62,6 @@ public class RecommendationServiceImpl extends RecommendationService
            mMultiCastLock.acquire();
        }

        mPlugins = new ArrayList<>();

        try {
            for (VendorConfig config : VendorConfig.getAllConfigs(this)) {
                try {
@@ -138,6 +136,7 @@ public class RecommendationServiceImpl extends RecommendationService
                Log.e(LOG_TAG, "Could not stop plugin", e);
            }
        }
        mPlugins.clear();

        if (mMultiCastLock != null) {
            mMultiCastLock.release();