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

Commit a0a82d25 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Disconnect plugins on the main thread." into rvc-dev am: bb4a7486 am:...

Merge "Disconnect plugins on the main thread." into rvc-dev am: bb4a7486 am: 5c2745e8 am: 2c969ea1

Change-Id: I754a9e688eb35ae74b92df33247e9e76f83e8081
parents 63b953f0 2c969ea1
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -257,12 +257,8 @@ public class PluginInstanceManager<T extends Plugin> {
                    if (DEBUG) Log.d(TAG, "queryAll " + mAction);
                    if (DEBUG) Log.d(TAG, "queryAll " + mAction);
                    for (int i = mPlugins.size() - 1; i >= 0; i--) {
                    for (int i = mPlugins.size() - 1; i >= 0; i--) {
                        PluginInfo<T> plugin = mPlugins.get(i);
                        PluginInfo<T> plugin = mPlugins.get(i);
                        mListener.onPluginDisconnected(plugin.mPlugin);
                        mMainHandler.obtainMessage(
                        if (!(plugin.mPlugin instanceof PluginFragment)) {
                                mMainHandler.PLUGIN_DISCONNECTED, plugin).sendToTarget();
                            // Only call onDestroy for plugins that aren't fragments, as fragments
                            // will get the onDestroy as part of the fragment lifecycle.
                            plugin.mPlugin.onDestroy();
                        }
                    }
                    }
                    mPlugins.clear();
                    mPlugins.clear();
                    handleQueryPlugins(null);
                    handleQueryPlugins(null);