Close stream when create drawable to avoid memory leak

Ref-Id: I17db1776f44dcda7890be8fffed8181c626a5f10
Change-Id: I1f40cbf63fee739bfd2232607152ae093d65f45d
fix ActivityThread.getTopLevelResources NullPointerException

MIUI-17680

Ref-Id: Ib73cd414c19d3976482a2f95032c6fc8173e591c
Change-Id: Icb8240fe1d367a33043fd324ab44774523a959b5