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

Commit a803fdee authored by Hawkwood Glazier's avatar Hawkwood Glazier Committed by Automerger Merge Worker
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 am: 8b5ef0b1

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24819731



Change-Id: Ic5e55028fd657a9edd4fbb2e2454f9f222df8f59
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0f3ab63c 8b5ef0b1
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) {