Merge remote-tracking branch 'origin/jb-mr1' into jb-mr1-u8860
Merge remote-tracking branch 'origin/jb-mr1' into jb-mr1-u8860
Revert: Cleanup softap interface to netd

Change-Id: I01e6c5b5a5a8ddaf05b979f9cc6d1293c86e8773 (reverse-merged from commit 90542758d4fef2e5ff8badaf3b40c2a227fbfc47)
Fix softap start

Remove the unncessary "softap start" which was used for broadcom
specific implementation

Change-Id: I79458082a116cd630bd13d1ed1a237eda7daaa88
Merge remote-tracking branch 'medipad/jb-mr1-bluez-mod' into jb-mr1-u8860
bluetooth: sync with upstream and make PBAP complie

Change-Id: I4186b5fa0bf843eecf8c06eb35f86b251eac66ae (reverse-merged from commit 44d3170308f0cef15d4b8223955dca622ac8d04c)
bluetooth: add bluez and dbus build targets

Revert "ISSUE 6849488 Bluedroid stack, remove system/bluetooth."
This reverts commit a3ae43942586e1f2b08fdc46963c73826ad6648c.
bluetooth: remove bluedroid stack

Bluedroid stack is to be removed and replaced later with BlueZ
Bluetooth stack.

Change-Id: I01b01cf6576372d20a373d966e1902925f216d40

Conflicts:
	core/java/android/bluetooth/BluetoothDevice.java
	core/java/android/bluetooth/BluetoothUuid.java
Revert "Delete various Bluetooth files for stack integration."

Reverting this commit essentially pulls back missing BlueZ files from
pre-4.2 AOSP.
This reverts commit 313a2167098ce8498db3a50d70724f260e8169c0.

Change-Id: Ib85b7485f33099076ca0f87a0ffd012dc294750a
bluetooth: add BlueZ files from AOSP version 4.1.2

Pulls back BlueZ Bluetooth stack files from Android
version 4.1.2.

Change-Id: I9c26d369ccdb7c79a443427a3a735ce479992ddc
bluetooth: fix various issues building BlueZ

Change-Id: I3c321593810bf42096483d978633fa9c43bab3bf
bluetooth: change Setting from Secure to Global for BlueZ

Fix issues arising from changing setting location. In AOSP
starting from 4.2 some Bluetooth settting moved from Secure
to Global.
bluetooth: fix memory leak
bluetooth: debug: better debug state machine
bluetooth: improve logging, change magic numbers to strings

Change magic numbers to meaningful constants when logging.
bluetooth: remove unused method and imports
bluetooth: give more time to start EventLoop
bluetooth: hack: enable extensive debug - only for tests (reverse-merged from commit 5f2f5145b72822480512ddeb11d453a2254bf26e)
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