Deduplicate adapter-of-installed-packages code.

Change-Id: I454ba79eddaaff86233a2cc341f4c8bebe94729e

Conflicts:
	src/com/android/settings/mahdi/notificationlight/NotificationLightSettings.java
Remove SystemSettingSwitchPreference.

We should not introduce one-off UI patterns when there are plenty of
examples where the same usage pattern (a feature on its own
PreferenceScreen with a global enable switch in the action bar) is
handled differently everywhere else (e.g. daydream, cast display,
blacklist). This makes for inconsistent UX.
Also, there are discoverability issues: As there's no other case of a
preference with an embedded control widget opening another preference
screen, users won't expect to find another screen behind it.
Additionally - but entirely subjective - the control looks plain ugly,
as the preference padding is too large for the large switch.

Change-Id: I61284e961babefa3748102b05055fb1d03b079b0
Hide heads up settings and show a notice if heads up is disabled.

This follows a UI pattern used at several other places, such as
daydream, screencast, profiles or blacklist settings.

Change-Id: I5635338ceccae8ba8450284d3078889333fb77c6
Settings: Add heads up quicksettings tile. (2/2)

Change-Id: Ib1db69671d9f5c2c6dfa019739674fee50df9340
Settings: Fix switch state being out of sync.

    - Since QS Tile can also set state of Heads up now,
    we have to set a content observer for the action bar
    switch.

Change-Id: I1c63fd2627a0f823eb6982456e1ed79ab84d1957
revert "Bring back SwitchPreferences for LSN & Peek"
Reset Pattern:
 - If user cancels while creating new pattern, old pattern is restored

Change-Id: I55955b1ffadca2ba712c40c7d443c4fc4b0f528c
Slim Recents: Option to show topmost task [2/2]

Change-Id: I46cd6d1141ffb6893c94b10a7f0d9d9f94b92ec1
Settings: fixed battery stats app list

The check of mAppListGroup getPreferenceCount is no longer working
after we added other options on this page. Add a separate counter to get
back the full possible list of 12 apps

Change-Id: I679b01deec0f52d4fa2012a31b7b305f8fe176b5
Revert "Settings: apple can do...we can do as well"

This reverts commit f5cddfb745f595f1f7bc823886e4d624e9449818.
Revert "Settings: add development animation transition mode 0.75 and 0.25"

This reverts commit d03ce207e6a5f1eb6c4e8651c6c0f272ef71e643.
Settings: Use a seekbar preference to allow setting arbitrary animation scale values
Settings: Replace the single-option menu with a switch in cast screen
Theme Settings: move Dark ui settings into a separate screen
Hover: exclude from insecure lockscreen (2/2)

Enable/disable hover notifications from insecure lockscreen

Change-Id: I011cfe31adae06e7ec43e08d9d8286cd9b554540
Add some system packages to package list adapter.

As we're using the adapter for notification control stuff, we need to
include those packages, too, as they're throwing notifications as well.

Also optimize code a little.

Change-Id: I8829041a535923e3d93d9566e27eb99c48f25abd