Development Settings: fix Advanced reboot not being updated on resume

Change-Id: I5475bec978c9cf50c02769091dbb43c6eff6c020
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
bluetooth: Don't crash when the local adapter is not set

In devices where bluetooth is not working (like the emulator or devices
in development), the bluetooth Settings crashes when closing the activity.

Most of the code checks for the nullability of the local adapter except
for this particular piece. This is usually not a worry for production
devices and I wouldn't usually worry about this but since the rest of the
code performs the nullability check it seems silly to crash onPause.

Change-Id: I7c1d3b43969b516336be770957008ef2054d312f
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
TrustedCredentials: Don't crash when the activity is paused

If you press Settings -> Security -> Trusted Credentials, then press
 back before the loading finishes, the loader async task will still
try to dereference the activity which will cause an NPE.

This patch fixes that by getting and holding a reference to the
context in the beggining and bailing early if it is null.

Change-Id: Ie03734d5f184821df5d8729fc4a16eb51cdeebf5
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
bluetooth: Show a refresh icon on the select devices screen

The refresh menu is hidden behind an overflow which is
pointless. This patch shows the refresh icon if there is
enough room.

Change-Id: I35f19c42054b05388f7b8fcb82e0f3bd60e2d618
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
One cat. for app. security

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Cleanup

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Settings: Update AppNotificationSettings if user resumes

Right now if a user resumes this activty (eg from recents) and did change in the
mean time settings which effects the visibility of preferences in AppNotificationSettings
(eg were removed) it does not get updated.

Fix it with simply reloading the content on onResume and decide to show the entries
on the current user settings situation.

Change-Id: I0b16ebf35604fdca1611f026c9b609427f3060c8
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Settings: Do not allow to access quick settings on secure lockscreen - option (2/2)

We have a lot security guys as user due of using the phones as business phones...that
said a lot complains go into the direction of google how it is possible to have
access to quick settings on a secure lockscreen which is absolutely understandable
due that you are able to control Wifi BT AirplaneMode data etc.

This patch takes care on this problem and adds an option to control this behaviour.

ATTENTION: Due that this is really an UX derp for an average user this feature is
enabled by default now. User need to disable it explicit in settings to get on secure
locksreen the original android behaviour back.

PS2:
- fix derp

Change-Id: Iac8c181767a16d3d198672d16901670984b58f48
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	res/values/strings.xml
[2/2] Settings: Hide power menu on lockscreen

also add buttons screen

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	res/values/custom_strings.xml

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	res/xml/security_settings_misc.xml

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Settings: add quick pulldown listpreference

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	res/values/strings.xml
	src/com/android/settings/simpleaosp/StatusBarSettings.java

Conflicts:
	src/com/android/settings/simpleaosp/StatusBarSettings.java

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	res/values/strings.xml
Forward Port: Volume button seek on screen off [2/2]

Change-Id: I788fc4cfbb688d99de241991821ebf7e277d19ad
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	res/values/slim_strings.xml
	res/xml/simple_sound_settings.xml
	src/com/android/settings/simpleaosp/SoundSettings.java

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Quick pulldown: Only show this option with secured lockscreen

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Settings: StatusBar Ticker (2/2)

PS: MIspeeliings.

Change-Id: I02cf9192c3ba62111a41e7da52cf4c343a589392
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	res/values/slim_strings.xml
	res/xml/status_bar_settings.xml
	src/com/android/settings/slim/StatusBar.java

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
settings: Forward-port notification counters

* Port from CM11

Change-Id: Ie19a6184b1d59676774937084a830ef4c7e8426f
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Battery text mode (2/2)

PS5: More configuration
PS7: Rebased and changed topic

Change-Id: I13bdf2236811f535b0ac324b5b78c0ab12f365a6
Signed-off-by: kecinzer <kecinzer@gmail.com>
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	res/values/cm_arrays.xml
	res/values/cm_strings.xml
	res/xml/status_bar_settings.xml
	src/com/android/settings/cyanogenmod/StatusBarSettings.java

Conflicts:
	src/com/android/settings/simpleaosp/StatusBarSettings.java

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
ListPreference before switches

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
String cleanup

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
settings: Quick unlock controll 1/2

Change-Id: I5b34368a35ab5541b57189e44c28c5903e638778
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Settings: Security: implement a pin keypad shuffler [2/2]

this is to further prevent people using the tablet guessing your pin based on fingerprints left on the screen
example of the expected outcome - https://www.dropbox.com/sh/r3xb2q53ksaqni9/Oz1Eu8Dm7O

PatchSet:
- fix checkbox was wrong assigned
- enable only for PIN Password lock
- small cleanup of old code

PatchSet:
- cleanup

PatchSet:
- add modes.....disabled/always/on request

Change-Id: I225af5654c440aa16964df3257130febec6ef275
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Settings: Switch needs an setOnPreferenceChangeListener

So today is derp day....another 4am morning fix.

Will stop today for sure.

Sorry again

Change-Id: I04eea381a2930995ef0f8820c0f251bc40df4820
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>