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

Commit 0d33db9f authored by Darrell Shi's avatar Darrell Shi
Browse files

Fix 'Registrant' already registered exception

This exception was caused by multiple classes having the same simple
name so switch to use the canonical name.

Bug: 309672095
Fix: 309672095
Test: build SystemUITitan with studio and no longer loop crash
Flag: NONE
Change-Id: I7f705d49cc234eb8c55a423c826e753f88dfb136
parent 71ee7643
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ open class DumpManager @Inject constructor() {

    /** See [registerCriticalDumpable]. */
    fun registerCriticalDumpable(module: Dumpable) {
        registerCriticalDumpable(module::class.java.simpleName, module)
        registerCriticalDumpable(module::class.java.canonicalName, module)
    }

    /**
@@ -62,7 +62,7 @@ open class DumpManager @Inject constructor() {

    /** See [registerNormalDumpable]. */
    fun registerNormalDumpable(module: Dumpable) {
        registerNormalDumpable(module::class.java.simpleName, module)
        registerNormalDumpable(module::class.java.canonicalName, module)
    }

    /**
@@ -105,12 +105,12 @@ open class DumpManager @Inject constructor() {
    }

    /**
     * Same as the above override, but automatically uses the simple class name as the dumpable
     * Same as the above override, but automatically uses the canonical class name as the dumpable
     * name.
     */
    @Synchronized
    fun registerDumpable(module: Dumpable) {
        registerDumpable(module::class.java.simpleName, module)
        registerDumpable(module::class.java.canonicalName, module)
    }

    /** Unregisters a previously-registered dumpable. */