(cherry picked from commit a215b95d and amended) Bug: 21868508 Change-Id: Ic83813a966cef18e59447083926bf033aa587154