Utils : Fix tablet orientation logic

Tablets have orientations for portrait reversed, this commit addresses it.
Add in a few more orientation-aware safety checks to circumvent certain devices
whose default orientation does not match their device type.

Change-Id: Idc627e687ca61ab29f08433664bf77148424bd6d
Show application's package name in the "App info" screen.

Change-Id: I7dac8ffa0b10abb5ff235750e90a96d801b2f919
Settings: 180 degrees rotation/orientaion
Signed-off-by: Paul Beeler <sparksco@gmail.com>
Settings: Add Expanded desktop tile in QuickSettings (1/2)

Change-Id: I42a7182859bd028c2e93f0c2fe0b6b5dee404cfa
Merge remote-tracking branch 'sm/sm-jb-mr1-qs' into sm-jb-mr1
Merge remote-tracking branch 'sm/sm-jb-mr1-qs' into sm-jb-mr1
Merge branch 'sm-jb-mr1-qs' of git://github.com/SaberMod/android_packages_apps_Settings into sm-jb-mr1-qs
Port CyanogenMod autobrightness adjustments
Signed-off-by: Paul Beeler <sparksco@gmail.com>
CM Privacy Guard (2/2)

settings: Privacy Guard support

 * Add toggle to InstalledAppDetails to enable/disable privacy guard flag on
   a per-application basis.
 * Add toggle to enable privacy guard by default for applications.

Signed-off-by: Paul Beeler <sparksco@gmail.com>

Remove sms security, we don't want it.

privacy guard: Fix crash when uninstalling an app

 * Don't try to update the privacy guard flag while refreshing after an
   uninstall since the PM will throw an exception at us.

Add missing string

Syntax derp
Settings: Introduce Privacy Guard Manager

Due that on the one hand a lot user are not familiar
with permissions and how to read them and on the
other user want to have a faster easy access to
setup privacy guard for several apps this small
manager assist the user to setup.

Privacy Guard Manager shows a list off all installed apps
Per default it shows only user apps which have critical
permissions privacy guard can protect.
The user can optional show in the list as well all system apps
or turn off the filter to show all apps undependent of the
permission the app has. To activate privacy guard for an
app a simple click on the entry activates it so that the user
can go fast trough the list. Longpress opens app detail page.
Initial help dialog tells the user how to use it.

Due the filter user who are unfimiliar with permissions can
fast see which apps are effected without deeper knowledge

cheers

SlimRoms

PatchSet3:
- go inline with AOSP style
- move PrivacyGuard by default into manager
- change behaviour off active icons

PatchSet4:
- change app icon size to 36dip

PatchSet5:
- string change

PatchSet6:
- add reset option to disable privacy guard for
  all shown apps in the list

PatchSet7:
- Cleaned up the intro dialog a bit.

PatchSet8+9:
- cleanup
- fix alignment of top checkbox

PatchSet10:
- fix permission filter

PatchSet11:
- improve icon loading

Signed-off-by: Paul Beeler <sparksco@gmail.com>

Signed-off-by: Evan Anderson <evan1124@gmail.com>

Remove cm_strings

Signed-off-by: Evan Anderson <evan1124@gmail.com>

Fix some derps from merge

Signed-off-by: Evan Anderson <evan1124@gmail.com>

Missing bracket

Signed-off-by: Evan Anderson <evan1124@gmail.com>
Add CM's app security settings

Needed this for privacy guard manager

Change-Id: Idd8609515ca0ae1c76445892b76ab58650f9b3b0
Signed-off-by: Evan Anderson <evan1124@gmail.com>

oops

Change-Id: Id40211ce0245e917a8e02be325dc4b72953c588b
Signed-off-by: Evan Anderson <evan1124@gmail.com>

Handle cancellation of the 'enabling PrivacyGuard' alert box.

I noticed that the option could remain ticked but not actually enabled
if the alert box is cancelled.

Change-Id: If9a4e88641a5e4283d6ea16c17ca4461841580e3

The real fix

Change-Id: I858528589c2c918fbc2e02c9c9a1aa2cf3855916
Signed-off-by: Evan Anderson <evan1124@gmail.com>
Fix derp.

Change-Id: I2766f4c89460c967e32349be008e38b3600b7e76
Fix for SecuritySettings derp

I derped up this one pretty bad... Actually fixed this time + style fixes.
Settings: privacy Guard enhance app logic

This commit changes the following

- do not show apps signed with the plaform certificate at all
  (like settings, systemUI, android system etc)
  IMO the user should trust the android signed apps to be save and this will
  prevent weird behaviours user can get when they activate it on this packages
  all other system apps (like calculator, browser) and all which are not signed with
  android key are not effected.

- to go inline with AOSP disable the checkbox in detail app screen
  for built in apps

cheers

SlimRoms

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Settings: Rename 'Power sounds' to 'Charging sounds' and add summary

Signed-off-by: Paul Beeler <sparksco@gmail.com>
HALO: Circle, Bubble, text colors

Signed-off-by: Paul Beeler <sparksco@gmail.com>
HALO: Ability to disable/enable custom colors, Effect color added

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Fix the build
Signed-off-by: Paul Beeler <sparksco@gmail.com>