[1/2][SQUASHED] Base: On-The-Go mode

Squashed on-the-go of following commits:
https://github.com/NamelessRom/android_frameworks_base/commit/c9515a3526cf11f402c8e82b5709420f12b3d450
https://github.com/NamelessRom/android_frameworks_base/commit/e28324c182f778cae300340b0c8760076961fa06
https://github.com/NamelessRom/android_frameworks_base/commit/755e04c2ca9251e9ab87da2319da34e4c97b6e3a
https://github.com/NamelessRom/android_frameworks_base/commit/ede7578328baeeedcb1873b2c8061b0e21cf8e09
https://github.com/NamelessRom/android_frameworks_base/commit/73509791602ccca66b75a20ec3a36b7d3aae7bf8
https://github.com/NamelessRom/android_frameworks_base/commit/19c86316bb34edb71eb1bb39ecbbd6cce6d85ca4
https://github.com/NamelessRom/android_frameworks_base/commit/5c63f5a0c06b6c201bd732cc72eea0bd2ba773d9
https://github.com/NamelessRom/android_frameworks_base/commit/2a15bcec684ec501d16daf6bacaa3892865f7b0a
https://github.com/NamelessRom/android_frameworks_base/commit/1fa20bc7d32a83a25ae69641b4815abe80a402cf
https://github.com/NamelessRom/android_frameworks_base/commit/bfbfdae4ede40576e76d487a8452cd8e8fbb637c
https://github.com/NamelessRom/android_frameworks_base/commit/90ac0f63af927837a79937b0d3c4061ac6fc9f17

Change-Id: I1f117975325c9a96a4e6dd7ab8b55b74ee4af019