sync'ed with omni source
https://github.com/omnirom/android/commit/5e8e8ffd80999296cd08949eb5ec24a68d130078
https://github.com/omnirom/android/commit/e965ee05a47a0adf7e562d50a7900e0afc5c80bb