Navbar buttons spacing for Phablet UI

This patch trys to make spaces in navbar buttons to fit Google behaviour
for tablets (Nexus 7, Nexus 10).

PS2: Better values after some testing on Nexus 7
PS3: Previous solution isn't good

Change-Id: I1ea9c883c519641fd99a033a54a1dc29fd9d57bd
Signed-off-by: kecinzer <kecinzer@gmail.com>
FavoriteToggle: DismissKeyguard

Small Fix

PS2: Another Small Fix (insta-swag)

Change-Id: I8c854ef63b111ed702a42746f5ed22893620e1b7
hwui: This code should only be enabled with QCOM_BSP

This brings back Change-Id: I1a06ac54a8ce2dccbf4a67424b0cbb6e7dd21e8b

Change-Id: I253884b15f52f403efcc46e66bc93cf85e91c82d
Improve auto-brightness handling

- Add a setting to control the auto-brightness algorithm responsitivity
- Make the algorithm react much faster when the ambient brightness
  increases quickly, e.g. when receiving a call in bright sunlight.

Change-Id: Ic608901c476609dde69cae982228c09567140a83
FW : Allow user selection of Font Size

ps 1:  This re-structures a lot of the way icons & layouts are sized.
It allows System Icons, Notification Icons, etc. to scale according
to the size of the statusbar.  StatusBar now sizes itself based on
the height of the Font (which is user selectable in RC).

This needs a lot of testing, as I've made substantial changes to the
way the Statusbar.  Also, While everything is 'working', the alignment
of the Textviews alludes me.  All textviews are being aligned at the bottom
of the StatusBar rather than centering like they should.

PS 2:  Fix the issue with StatusBar robbing touches at boot.
Fixed windowing size update in PhoneWindowManager.
Some of the icons still don't scale exactly right,
and of course the TextViews continue to taunt me.

ps 3: Re write some of the scaling of images and add some padding.
   Create a StatusBarHelpers sub in core.util.aokp for re-using some routines.

ps 4:  Solved initial sizing issue (at boot or change) and everything
	seems to be aligned properly.
	Note that icons will only scale up to their source size.  So
	themes that provide HQ/large icons can benefit from larger
	font sizes, but some themes (including stock/system) will
	show increases in fonts and Notification Icons, but not
	the SystemIcons (right side)

ps 5: Adjust layout to elimination notification cutoff

ps 6:  Really fix layout this time.
ps 7: add some padding between notification icons
ps 8: adjust statusbar padding to try to remove small line when no
      Font has been set.
ps 9:  Add some padding below notifications.
ps 10:  Fix notification overlays and tweak notification paddings.
ps 11:  A few more refinements in sizing
ps 12..15 : more dynamic scaling & padding adjustments
ps 16: set scaling as close to Stock as I can get it.  Fix scaling of
	notification background on smaller sizes
ps 17: Set system icon widths so that scaling looks more natural.
	re-aligned signal text/wifi text.
ps 18: Use correct default font size for text
ps 19:  Re-do logic for font size on ticker text.

Change-Id: I5f9e99930210d3d91cda3ef167ad42993c261816
Signed-off-by: Zaphod <mwilson@acesappraisal.com>
Reduce observers in SystemUI: StatusBarIconView

Currently, for each status bar icon view there is a observer that
listens for changes of STATUS_BAR_NOTIF_COUNT. With one
notification usually having one or more status bar icons
you may end up easily with 10+ more observers for ~5 notifications.

With this commit the internal observer class becomes a singleton.
This means there is now only one observer for all status bar icons
and additional binder calls on new notification are avoided.

See "dumpsys content"

Change-Id: I7ca6481fe43e87c34b19d7b71e531cce93cf80ef
Reduce observers in SystemUI: KeyButtonView

This is based on the work by Jens Doll for the StatusBarIconView

The ContentObserver class will be a singleton, so there is only
one observer for all buttons.

On my Nexus 10 it reduced the observer count from 48 to 4.

Change-Id: I3223a18fcb5d2c9c2e7de655c514ff751dcd345d
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Reduce observers in SystemUI: BatteryBarController

This is based on the work by Jens Doll for the StatusBarIconView

The ContentObserver class will be a singleton, so there is only
one observer for all instances.

On my Nexus 10 it reduced the observer count from 15 to 3

Change-Id: Ibdd6fca75e5f0245b2897c9d5aebb5a0961cc351
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Merge "hwui: This code should only be enabled with QCOM_BSP" into jb-mr1
Frameworks: TRDS 2.0 (1/3)

After testing with huge success we discovered here
and there small problems (like NFC beam animation is broken,
TRDS was disabled on cardock etc) which mainly was caused
due that we used the already from AOSP introduced uiModes
qualifier which could cause in special conditions this
conflicts. Beside that we want a bit more flexibility.

Result: This commit introduces the inverted qualifier as
complete own qualifier undependent of the already AOSP
used ones.

Beside that it fixes all known issues......features:

- it is now completly working over the AOSP Configuration classes
  Means every app get notice of a change trough onConfiguratioChange
  and restarts it's activity if change was detected.
- app can disable that like some other configuration values
  over AndroidMainfest.xml
- beside "inverted" folder another "notinverted" folder is introduced
  for another themeing (eg white)
- qualifier order is direct before the official uiMode qualifiers
  (see AOSP docs)
- All usual Configuration actions can be used with the inverted
  qualifiers....like BroadcastChange, direct read out from every
  app etc. etc. Note: Only system can change the uiInvertedMode

So as you see a real own qualifier now

NOTE: Apktool as well aapt need to be changed to fit the "new
qualifier"....which means that we need to recompile our gapps
that they react as well on this new behaviour. Think we will get them ready
next 2 or 3 days.

Patchset:
increase support from SDK_HONEYCOMB_MR2
to FROYO to have better compatibillity
to some gapps.

Change-Id: I851740010198c400266d7ca9995eb08dbf7782bc

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/WidgetView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Merge "Navbar buttons spacing for Phablet UI" into jb-mr1
Updated simplified Chinese translations

Change-Id: I1d35591358fe66b5aee843d6601e9ae6b344ff51
Revert "hwui: This code should only be enabled with QCOM_BSP"

This reverts commit 264091bcfb64e834f09915f504597b9a12dd5ed7

Change-Id: I1682ee8d2aa16a2c9353c4e7542eb3f5a06bf96b
Merge "Reduce observers in SystemUI: BatteryBarController" into jb-mr1
Merge "Reduce observers in SystemUI: KeyButtonView" into jb-mr1
Framework: GlowPad Torch

LongPress GlowPad...Torch.
Release...No Torch.

Magical Unicorn Dust Not Included
With Your Purchase

>>>>>>>>>>>>>>>>
checkTorch required for RARE torches not being released.
>>>>>>>>>>>>>>>>

Change-Id: I1e5178822efb10f205d30d059af78ebeba6f39a7
Merge "Revert "hwui: This code should only be enabled with QCOM_BSP"" into jb-mr1
Revert "FW : Allow user selection of Font Size"

This reverts commit 71c4ecdc102ce3c97c7761e470c6a362ce47bf83.

Change-Id: I91f11edc617b79717584d3fb5b3e9339deedc70b
Signed-off-by: Jonathan Steadman <xxwhitehawk@gmail.com>
ClockActions: Dismiss Keyguard

Kanging SteveSpear's Brilliant
    dismissal method here.
    Doesn't require an activity
    as ...OnNextActivity() does.

PS2: TabletStatusBar.java as well

Change-Id: I2e9a3d8e42f2cd2a41f954026d0e38fe40c5da67
Merge "FavoriteToggle: DismissKeyguard" into jb-mr1