Merge "Check and write some error in atrace." am: 7b50c02030 am: 89c634b6ea
am: 651068c908

Change-Id: Ic27e4f2ada80478464be65a07ae6120f05b02b2b