Skip to content
Commit 0a286830 authored by Paul Duffin's avatar Paul Duffin
Browse files

Detect registration of duplicate module/singleton types

Module type and singleton type names have to be unique but duplicates
are not checked when the relevant android.Register...() func is called.
Instead they are collated in lists and then registered with the Context
later on, at which point duplicates are detected. That loses
information that can be helpful in fixing the issue.

This is not an issue when testing as the module and singleton types
are registered directly with the Context.

This change adds duplicate detection to the initRegistrationContext
Register... methods prior to calling the android.Register... methods
which should make it easier to detect duplicates registered from an
init() function.

Test: m checkbuild
Bug: 146540677
Change-Id: I7f1a4b649072867717a9829c737a44454b12266c
parent a48f758d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment