Check if the Activity is finishing before showDialog()

Check if the Activity is going through its finishing phase before
displaying the Dialog, because Showing dialog once the activity
is no longer in context will cause BadTokenException.

Change-Id: I58940e694f61cd79536abe2df60a0b745a7b806f
Fix NullPointerException at RunningState

getServiceInfo returns null if you have a service defined in the
manifest as: <service android:name=".Xxx" android:exported="false" />
or and in an <application> with no label or icon.
Dont crash the Settings application because of that.

Change-Id: I6f9f69c130e610b7e4ab66426177b7bade1e1515
Merge Navigation Bar and Pie Controls button config (2/2)

Based on the commit series for pie controls, this commit
makes the Navigation Bar and Pie Controls share the same
button layout.
This commit applies the changes made in part 1 to the
Settings app. For the real commit see framework/base.

This commit introduces here:
* Some setting constants changes to avoid clashes with PA.
* Removal of the pie search key setting.

Change-Id: Ifc1c1c7567e406b5f8bac60d35bb6896c83f1da0
turn on these settings by default

Change-Id: If52b75e60db097454d9eb8310bfcfecb20f35bd6
Add ability to install credentials as other UID

We need the ability to install from the system UID to wifi UID
to explicitly bind WiFi credentials to the WiFi profile. This adds the
ability for Wifi Settings to invoke installation of a PKCS12 file for
the wifi UID.

Bug: 8183258
Change-Id: I357c4387baf7e2f6fd6acc9046d9e6b52fdd4bb0
Merge "Add ability to install credentials as other UID"
Add KeyStore storage type to Settings UI

Give the user an idea of what kind of credential storage is in use on
this device for keystore daemon.

Change-Id: Ic970fb908989662665bf1af968ca4a6a9dbfb55a
move pie controls under navbar category

Change-Id: I477dce393b4ae3aa07b46cc8fb523dfa6c8f1091
Merge "Add KeyStore storage type to Settings UI"
Allow multiuser use of keystore

Since keystore has been refactored to let muliple users use it
simultaneously, we can remove all the restrictions put into place to
prevent it.

Bug: 7249554
Change-Id: I5aa069ca439cea68e87e141c497be8cd86b0ba9d
Merge "Allow multiuser use of keystore"
Merge "Check if the Activity is finishing before showDialog()"
Merge "Fix NullPointerException at RunningState"
Merge remote-tracking branch 'aosp/master' into jb-dev

Change-Id: If40dcff12ed91832bb84b669d0cad2c04d0a4576
fix build

Change-Id: I5055ddb5c44d10f0c871ad5022bbffb4626cecca