[MS12.1] Support NetworkTemplate builder
In current design, NeworkTemplate has a lot of buildTemplate*
functions to create various type of templates. These functions
do not have any flexibility to add any dimension. Thus, if
there is a need to add a dimension, the typical ways are:
1. Add one parameter to the buildTemplate* function and change
all callers.
2. Use the NetworkTemplate constructors directly. And add one
more parameter if it doesn't fulfill the needs.
These codes are painful to maintain in the future if they are
exposed as system api since they are lack of flexibility. Thus,
introduce a builder class to NetworkTemplate to address this
problem.
Test: atest NetworkTemplateTest
Bug: 204830222
Change-Id: I49fab236bac392563b1290d69573ad1415fda734
1 file changed