cherry pick https://github.com/omxcodec/android_frameworks_base/commit/9a702b

Change-Id: I41a54fd47af7f90145ae05e5995d73879883f564