AI 144547: Fix change 144342 by making it active only during overlay processing.
BUG=
1754390
Automated import of CL 144547
AI 144342: Fix bag (string-array,etc) behavior with overlays.
We used to replace elements in the default with elements from
the overlay. This change causes us to empty the array first
so if the overlay array is smaller we don't end up with elements
from the default array showing through at the end of the array.
Ex: [A,B,C] and overlay [D] should give [D] but used to give
[D,B,C].
BUG=
1754390
Automated import of CL 144342
AI 144309: am: CL 144308 aapt extensions: required sdk version, dependent software libraries, gadgets
Add new attributes for sdk version, software libs and gadgets
BUG =
1730924
Original author: asuchitra
Merged from: //branches/cupcake/...
Automated import of CL 144309