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

Commit e1b8d8fc authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

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

Fixes: 159842083
Test: Built
Change-Id: Ic2c8fbb8cfc93c81c692d7ec22fe77bcc1fe9964
parent c1aba95d
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();