DockAudio: Route audio via dock for Samsung devices

This patch simply removes the audio routing checks for Samsung
devices and routes audio via the dock when the mobile is docked.

There is no option to disable audio routing out through the dock

Change-Id: Ie3f99101b051326913d06f1c78894d50035f6e62
Core: PT-rPT translation

Change-Id: Ia9614c1162b60284f35f9677fb508a96d2a9694e
Frameworks: refactor, cleanup, centralize, fixes, features

- refactor a lot code
- remove duplicates and centralize
- a lot fixes and some features like diable navring, color mode for notification shortcuts

etc etc

For further information see Settings patch:

Settings: complete overhaul/optimizing + drag drop sort + easy dev life

Change-Id: Ie90f0ccd51d319ec880333289fea6b20642562ba

Conflicts:

	core/java/android/provider/Settings.java
	core/res/res/drawable-hdpi/ic_shortcut_gtalk.png
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
Use proper System Icon identifier for navring

Change-Id: I924fba4776e3953b572445d0701b92d6712e0e67
Do not show up navring on home longpress on navbar

if the user set a custom action on longpress

Change-Id: I659e15e7f9f28e0a0db020e414b99409742c5e2e

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Fix possible QS NPE if navbar was not set

Change-Id: Id66b3afdc1bdb73f827d7a055f6c2926057f3016
Frameworks: Fix navring keyguard + ehancementes for SlimAction in preperation

to allow SlimPie on lockscreen and the complete rewrite of custom
hardware key rebinding.

- fix for not launching applications from keyguard (was broken on 4.3)
- allow app execute only direct from unsecure lockscreen or if the
user put in the credentials from secure (on 4.2 already the apps/actions always
opened in background)
- do not allow actions which does not make sense on locscreen to execute
  differenciate secure and non secure
- close notification drawer on any action so that the action really shows in forground
- code cleanup
- keyguard integration in SlimActions is now the base to open SlimPie
for lockscreen as well the rewrite of hw key rebinding. So two things
on the TODO list now

cheers

Change-Id: I870d19a06bc1935f4356a1cf45b76b1511a11694

Conflicts:

	policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java
Frameworks: better navbar and navring support for ppl without gnow

an installe without google now had some negative effect on our
custom navring/navbar actions

- do not depend on search action on tiny circle lockcreen...check targets available instead
- same for navbar transparency
- fix google typo
- split ontouchlistener for home button and tiny circle due that
it does not make sense to react same like home button if the user
assigned to the home button a custom action

cheers

Change-Id: I8e6a250c3b4ee5f2c17ef48bbe9532511a7737d6
Frameworks: activate PIE on lockscreen apps

currently the situation was that every application started on
lockscreen had disabled pie (because lockscreen disables it). Downside
on incoming call or camera widget the user did not have a navigation.
As well on unsecure lockscreen the user could not navigate further

this commit fixes this behaviour

Change-Id: Ie1aebdc84d1ce075ebaa09dfffd080f38c652b13
fix possible NPE

mTopFullscreenOpaqueWindowState is on certain conditions null
and will throw an NPE....check for it to prevend it

Change-Id: Ibfb9ad375a9bdfc4e759f55934e759b69c448b49
Frameworks: activate PIE on Lockscreen

completly activate it now if navbar is disabled, expanded desktop or
whatever. The bottom trigger can be used on Lockscreen
if the user want (left and right does not make sense due the wigets.
If navigationbar hints are disabled it show instead
the home button the tinny circle which opens search/gnow. Longpress
action is the same like the one which was bind to the homebutton

slight adjust of default values trigger height and overall size

as well colorize and set alpha  on navbar for the tinny keyguard circle
like the other navbar buttons to be consistent

Change-Id: Ia721d02ae44ef0f9886224414c2932f5c24c0de6
Framworks: clean up trigger code

+ small fix

how to reproduce the bug
activate hide trigger on ime.....open ime...pull down notification drawer
close it again.....pie trigger left and right do not change back again

Change-Id: Ibbc1ba8731046b7214f8019f77491c9d2da776b8
Framewors: do not call every time setupTriggers

if pie is disabled

Change-Id: I89772e0df5676e9c951d59881b87cfff8a857c41
Fix: lockscreen bottom trigger on expanded desktop mode

did not show up in expanded mode before. Only on navigation bar disabled
or 0 values

Change-Id: I8a7215438b7205575bfeea99778c6203da47d82f
another cleanup

why complicated when it is easy. I will stop for today lol
just a small code cleanup

cheers

Change-Id: I3a17555fcc613c1466578758446f62b8aba0561f
Frameworks: remove always transparency mode navbar/statusbar 2/2

problem is that the transparency on most app totally break due
that a lot apps do not draw behind navbar and statusbar. Nearly
all user never use always mode and just use it on launcher
and lockcreen. So let us remove it
as well a bit cleanup

Change-Id: Ia5ee97f99102aa2b3833a33eb93b5e428a80b867

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
Frameworks: simplify custom lockscreen background code

- remove observer for transparency and handle it better
- add multisuser handles
- smaller fixes and code cleanup
- simpfliy custom background handling and change to our needs (thanks Danish)

Change-Id: Idf0bbb7bf9e132a3a68d567e3863cce1b6d99742

Conflicts:

	policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java
Improve scrolling cache

Scrolling cache helps make short scrolls/flings smooth but will
cause stutter when long flings are made. This patch disables
scrolling cache when long flings are made.

This patch also fixes a related bug where scrolling cache will
not be enabled properly when transitioning from flinging to scrolling.

Patch Set 2: Calculate threshold based on maximum velocity (Sang Tae Park)

Credits: Pawit Pornkitprasan

Change-Id: I1fdbaad92263c9f983a32900e74eba1f0367902b
Signed-off-by: Arham Jamal <arhamjamal@gmail.com>
NPE in SearchManager.triggerSearch

mAssociatedPackage field is never initialized and cause NPE.

Change-Id: Ibf0d44b2170b7cbfe4a883008254a086e03579c5
Fix to NullPointerException when activity is relaunched

When ChooseTypeAndAccountActivity is relaunched and resumed
by ActivityManager a call is made to onActivityResult without
first triggering onResume. This leads to mAccounts object
still being null.

Fixed by properly setting mAccounts object if it is null prior
to use after function onCreate has been called.

Change-Id: Ife7e1e052c473970d923fa43ee6189eb62a1113b