Keyguard: do not play sounds while phone call is active

Change-Id: I834ad52bf7406b92af0840267960bbd959eb8709
Signed-off-by: Roman Birg <roman@cyngn.com>
Revert "ContentProvider: Avoid duplicate initialization of AsyncTask"

This change leads to soft reboots.
To reproduce:
  *) Take a screenshot
  *) Share it a few times
  *) The chooser dialog should appear but instead the system dies

E/AndroidRuntime( 4993): *** FATAL EXCEPTION IN SYSTEM PROCESS: PowerManagerService
E/AndroidRuntime( 4993): android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
E/AndroidRuntime( 4993): 	at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6027)
E/AndroidRuntime( 4993): 	at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:820)
E/AndroidRuntime( 4993): 	at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 4993): 	at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 4993): 	at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 4993): 	at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 4993): 	at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 4993): 	at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 4993): 	at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 4993): 	at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 4993): 	at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 4993): 	at android.widget.AbsListView.requestLayout(AbsListView.java:1972)
E/AndroidRuntime( 4993): 	at android.widget.AdapterView$AdapterDataSetObserver.onChanged(AdapterView.java:814)
E/AndroidRuntime( 4993): 	at android.widget.AbsListView$AdapterDataSetObserver.onChanged(AbsListView.java:6482)
E/AndroidRuntime( 4993): 	at android.database.DataSetObservable.notifyChanged(DataSetObservable.java:37)
E/AndroidRuntime( 4993): 	at android.widget.BaseAdapter.notifyDataSetChanged(BaseAdapter.java:50)
E/AndroidRuntime( 4993): 	at com.android.internal.app.ResolverActivity$LoadIconTask.onPostExecute(ResolverActivity.java:756)
E/AndroidRuntime( 4993): 	at com.android.internal.app.ResolverActivity$LoadIconTask.onPostExecute(ResolverActivity.java:744)
E/AndroidRuntime( 4993): 	at android.os.AsyncTask.finish(AsyncTask.java:632)
E/AndroidRuntime( 4993): 	at android.os.AsyncTask.access$600(AsyncTask.java:177)
E/AndroidRuntime( 4993): 	at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
E/AndroidRuntime( 4993): 	at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 4993): 	at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 4993): 	at android.os.HandlerThread.run(HandlerThread.java:61)

This reverts commit d22a5b851abf2a06097db51368edfda7616fc34c.

Change-Id: Ibe9c1192ec73eb46e3359da991201f6088e3a78e
Extend SwipeHelper to support vertical gestures

* Un-hardcode CONSTRAIN_SWIPE and FADE_OUT_DURING_SWIPE, define
  through proper callback, per-layout
* Up (GESTURE_NEGATIVE) and down (GESTURE_POSITIVE), mostly needed
  by new Hover hide /w swipe up gesture

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I68c42a8ccabca73a1b241ba7cf264db9c912fccd
HOVER: Implement hide only on swipe up

* Add an Y axis HideHelper, just extend current X axis SwipeHelper and
  change interested methods behaviors
* Some clean up and indenting

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I42a260ea993c614b0b9b4558a95dd44dd517c4f1
Merge remote-tracking branch 'pa/kitkat' into kitkat
Enable unknown sources, disable package verifier

Credit @Cl3Kener

Signed-off-by: anerikg <anerikgames@gmail.com>
Frameworks: apple can do...we can do as well

incredible apple engineers speeded up the overall UI and reduced per default slightly
the animation scales. Well we do as well and reduce it from 1 to 0.75...smooth, looks well
and does not break anything

Change-Id: Icbcc889e49c8d3ab24cf2b1c10bbe0e8bf7e7637
Add dashclock widget by default
AudioService: Show safe volume panel for non-interactive volume adjustments

If safe volume is active, apps calling mp.setVolume() to adjust the
headset to a value higher than the threshold will have the operation
fail silently because no volume dialog is active to pop up the
"do you wish to override" question.
This is particularly bad for peripherals that use the audio jack
(Square readers, Jawbone bands), since they usually require levels
close to maximum for proper communication and the app isn't prepared
to deal with a silent rejection of the requested volume.

Change-Id: I2047d199506106a87841b8b680007c5ab45b527b
Signed-off-by: anerikg <anerikgames@gmail.com>

Conflicts:
	media/java/android/media/AudioService.java
base: update link ring-notifications after read user settings

Change-Id: Ib424124dc20e38243e572333e323ba97aacb1111
JIRA: CYAN-3559
Issue: https://jira.cyanogenmod.org/browse/CYAN-3559
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
MSimNetworkController: disable CHATTY logs

Change-Id: Ic9dd166aa6ac77647dc69acea31d2ebde3a87f0a
MSimNetworkController: Quiet logspam

* Most uses of Slog.d are not protected by the if (DEBUG) they should
  be. Make it so.

Change-Id: I36151113b1bfcdbe84c27abf39918441e23a8e88
Use hidden API to validate APK chains

Bug: 13678484
Change-Id: I28dedab74b0e24d47ab9f2190298156c909e9d54
tether: tethering chooses wrong upstream when mobile_dun is required

When mobile_dun is required, the default mobile type will
be deleted from upstream list, this makes wifi become
the highest priority upstream even whne wifi is not available.

Change-Id: I2c12f6cd6d52331220dce900609ad072f9ec3fbc
CRs-fixed: 671675
Provider: Add multi SIM ringtone support in SettingsProvider

This change will handle multi-sim queries in
SettingsProvider.java when openFile and
openAssetFile APIs are called by other components.
Thus, it will ensure to play the correct ringtone
corresponding to the SIM.

CRs-Fixed: 661216
Change-Id: I7b22c233b9c41669c1ad948b83a7aa2c55442af1
base: fix ACTION_NOTIFICATION_LISTENER_SETTINGS intent name

Although android.provider.Settings#ACTION_NOTIFICATION_LISTENER_SETTINGS has the proper
name (android.settings.NOTIFICATION_LISTENER_SETTINGS), the rest code (Settings fragment,
cts,...) are using the name "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS".
This cause that apps with notification listener services declared could not open the
setting activity from running apps settings fragment (the pending intent isn't found).

For convenience, this change fixes the name here instead of change all the entries in
the rest of the aosp code.

Change-Id: I33f09efae8829d88e1a415f889b699202ebf6440
aosp: https://android-review.googlesource.com/#/c/106960
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
PIE: Turn on HWA only if isHighEndGfx()

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Do not block home button if incoming call is a background call

The user want to navigate ahead if it is a call in background.
So we allow it.

Change-Id: If40b8abba05b600191bfc1403f197e624fd7a360

Signed-off-by: anerikg <anerikgames@gmail.com>

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
On-The-Spot: Add information on how to reset preferences

Info is added to the main On-The-Spot preference dialog.
(As suggested by +Carlo Savignano)

PS 2:
* delete unneeded code

PS 3:
(https://dl.dropboxusercontent.com/u/90317107/on_the_spot_pref_helper.png)
* Unclutter OTS Dialog

Change-Id: Iaf4f67e4b03babd1d6a604c2524781a748dd8025
Signed-off-by: kajuten <julian.kaltenhofer@gmail.com>
Allow translucent navigation bar in landscape mode.

Change-Id: I5388f3f8a34533624619714bacfba52f95fc6d85