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

Commit bb4a7486 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

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