Preventing widgets from exceeding Bitmap memory limit

> Moving the size check to a comman place so that it is executed in
all related code
> Fixing size calculation when views are merged as a result of partial
update

Test: Manually tested with a dummy app
Bug: 31790171
Change-Id: Id0ea776796f156455d2cba31c8392d4875116949
(cherry picked from commit 349b412b4ba93e6ab835e3f0c45a998979339b4f)
2 files changed