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

Commit 8b5ef0b1 authored by Hawkwood Glazier's avatar Hawkwood Glazier Committed by Android (Google) Code Review
Browse files

Merge "Attempt to reload providers when selected provider is available but...

Merge "Attempt to reload providers when selected provider is available but unloaded" into udc-qpr-dev
parents 015e9a3b aabd499a
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ open class ClockRegistry(
            override fun onPluginAttached(
                manager: PluginLifecycleManager<ClockProviderPlugin>
            ): Boolean {
                manager.isDebug = true
                manager.isDebug = !keepAllLoaded

                if (keepAllLoaded) {
                    // Always load new plugins if requested
@@ -511,6 +511,12 @@ open class ClockRegistry(
    fun verifyLoadedProviders() {
        val shouldSchedule = isVerifying.compareAndSet(false, true)
        if (!shouldSchedule) {
            logger.tryLog(
                TAG,
                LogLevel.VERBOSE,
                {},
                { "verifyLoadedProviders: shouldSchedule=false" }
            )
            return
        }

@@ -670,6 +676,7 @@ open class ClockRegistry(
                    { str1 = clockId },
                    { "Clock $str1 not loaded; using default" }
                )
                verifyLoadedProviders()
            } else {
                logger.tryLog(
                    TAG,
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ public class PluginInstance<T extends Plugin> implements PluginLifecycleManager
        mComponentName = componentName;
        mPluginFactory = pluginFactory;
        mPlugin = plugin;
        mTag = TAG + mComponentName.toShortString()
        mTag = TAG + "[" + mComponentName.getShortClassName() + "]"
                + '@' + Integer.toHexString(hashCode());

        if (mPlugin != null) {