Hide settings-key until the device is unlocked.

Starting in N, we are going to have new APIs to officially support the
situation where apps need to run before the user has unlocked their
device for the first time.  For IME developers those APIs would be
important not only because IMEs developers may want to support other
apps that support that feature but also because IMEs developers have
already needed to pay attention to the same situation where the IME is
running so that the user can enter the initial password (e.g. for an
encrypted device).

Bug 11270326 is a perfect example of this scenario.  Now we can disable
settings-key until the device is unlocked by using the new API when
running in Android N devices.

Bug: 11270326
Change-Id: Ie1c6efa63b60b91430f1a78dde624d0f3dff3c69
2 files changed