Bug: 21868508 (cherry picked and squashed from commits ec74835a and 0941b9d4) Change-Id: I1750e6bea20321d04680132281a6c2924531c5ae