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>
Keyguard: do not play sounds while phone call is active

Change-Id: I834ad52bf7406b92af0840267960bbd959eb8709
Signed-off-by: Roman Birg <roman@cyngn.com>
Fix broken arc drawing in Camera app.

Commit f311e1983741e71e1632044bc8b2356d8688d29c introduced a recursion
abortion threshold, but missed properly handling negative values. Fixit.

Change-Id: I6776371d1567eba0a84d2e1bf702b46879e30332
Attempt to fix CROM-23: Proximity sensor always on while the device is in standby
It seems like this is redundant. This has existed from the very first version of this file, created by David96 on 16-Dec-2013.

Change-Id: If3beff9f6e7d9fd89a3da9e88c1a315aca8be848
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
hwui: Fix a sporadic crash seen during CTS runs

 * It's possible (due to race conditions) that a patch might be
   scheduled for removal twice. Just print a warning and continue
   instead of asserting and crashing.

Change-Id: I42865f6717816a743cc49ba15b839e6c3b57ed83
Fix attribute resolution in theme lookup

[Fixes Known Issues]
1. (CM) Chrome beta crashing w/ Hexo applied and menu button is pressed.
2. (AOSP) TextAppearance - fontFamily attr is incorrect (looked up in wrong package!) when
    a string value is defined in a style, and that style is set as the app's theme.

[Terminology]
1) Theme:    is the standard android definition of a theme.
             e.g in your manifest you may set android:theme="@style/foo"
2) CM-Theme: will be a Cyanogen theme. e.g. "Hexo"

3) Block: Also called index. Can be considered the cookie or ID to lookup a package in the resources.
          When a CM-Theme is applied, block 0 is framework, block 1 is the app, and block 2 is the
          CM-Theme.

[Background]
When a value for an attribute has not been found, the last resort is to look at a theme's base value.
This is done by using theme->getAttribute(...) which will return the value. The value is
unresolved if its a reference type. The block value will also be returned.

Since the value may be a reference and therefore unresolved, a call is then made to
ResTable::resolveReference(..) to do the final resolution. As part of its input, resolveReference
takes a block as a starting point.

In the case where resolveReference(...) is asked to resolve something that is not a reference,
for example, a string type, then it will simply return the same value and block. *Important* The block
value is then saved for the next call to get an attribute value. So if this block value is wrong
it will remain incorrect.

Therefore if resolveReference is passed the wrong starting block with a string value, then the wrong
block will be returned.

[Example]
1. 0x0101009b (android:attr/textColorLink) is first attribute to be looked up.
2. textColorLink has a value of 0x01020123 which maps to theme id 0x01020111. The block for theme
is "2" so block is set to 2. The value for this attribute is put into the array.
3. 0x010103ac (android:attr/fontFamily) is the next attribute to be looked up.
4. fontFamily is found in the theme as type string. The value is 0x7b9 (1977) and newblock variable
   is set to 1 since this value is found in the app's string pool. The block variable still == 2.
5. resolveReference() is called with block=2. The function does nothing and returns block=2.
   The fontFamily thus is stored wtih value=1977 and a block value of "2" instead of "0".

Change-Id: I2b979911b1b8ffb79c4cf310ae60682c84c11fcb
Keyguard: fix chopped keyguard on hdpi MSim devices

Both the CarrierText and MSimCarrierText were in the View, taking
additional space. Remove CarrierText from the view in case of MSim.

Change-Id: I803695044d06470ef9af59863ba92444e41488f5
Support for SEEK on Android

Following apis have been introduced to support
SEEK (Secure Element Evaluation Kit) on Android:
1. transmitIccLogicalChannel
2. transmitIccBasicChannel
3. openIccLogicalChannel
4. closeIccLogicalChannel
5. getLastError
6. transmitIccSimIO
7. getATR

Conflicts:
	telephony/java/com/android/internal/telephony/ITelephony.aidl

Change-Id: Idca9b47daa646902b74e37e7841d9d1506610887
MSim: Add Multi Sim support for SEEK

MSim support for the following apis has been added:
1. transmitIccLogicalChannel
2. transmitIccBasicChannel
3. openIccLogicalChannel
4. closeIccLogicalChannel
5. getLastError
6. transmitIccSimIO
7. getATR

Change-Id: I14fd1ccc08a9c89d655c7eb9f92a194c82138d3b
InputDevices: Move AOSP strings

Change-Id: Ia1c1fcf54a0024f1cb3738ddeb353fa180f14e8c
Merge "Attempt to fix CROM-23: Proximity sensor always on while the device is in standby It seems like this is redundant. This has existed from the very first version of this file, created by David96 on 16-Dec-2013." into kk
FW_Base - ReOrder Audio stuff [1/2]

Change-Id: I9fb3c647727bf9f9223e2e0caf701b04dfc97b16
Signed-off-by: Stefano Mura [STELIX PippoX3] <ssspinni@gmail.com>
Merge "FW_Base - ReOrder Audio stuff [1/2]" into kk
Revert "Frameworks base - Add network stats to status bar [1/2]"

This reverts commit c491576d95913676f85d972d8e6f5587691b9f32.

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/cr_dimens.xml
	packages/SystemUI/res/values/cr_styles.xml

Change-Id: I027b99d63641c61295ee1f063ea8cb503bb9522d
Signed-off-by: Stefano Mura [STELIX PippoX3] <ssspinni@gmail.com>
Rebase to cleaner looking traffic indicator [1/2]

Credit/Thanks to htchoi1995 and liquid0624

- http://i.imgur.com/3NzbfGc.png

AICPfy

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/layout/status_bar.xml
	packages/SystemUI/res/values/dimens_custom.xml
	packages/SystemUI/res/values/styles_custom.xml

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java

Change-Id: I8e9a3e94e2ce4b6abdfd48f08f1beb931009b6fb
Signed-off-by: STELIX <ssspinni@gmail.com>
Themes: Only process themes that are applied during boot

Currently, the PackageManagerService will process all themes and
ensure their resources are compiled and available to the system.
This is highly inefficient and can bog the system down when booting.

This patch will only process the themes that are currently applied
durring boot and lets the ThemeService take care of queuing up the
others for processing.   This reduces boot time considerably,
especially when the user has many themes installed.

Change-Id: I9b6298f5fbd07d7e5a594e94214404e6267c7687
Signed-off-by: STELIX <ssspinni@gmail.com>
Themes: Let ThemeService handle all theme processing [1/3]

Only themes that are applied will be processed inside of the
PackageManagerService, all others will be sent off to the
ThemeService.

Signed-off-by: STELIX <ssspinni@gmail.com>

Change-Id: I5f2ec628e1d22a05accc6727efb0c1387455f82f
Show devices connected to the WiFi hotspot(1/2)

Conflicts:
	core/res/res/values/symbols.xml

Change-Id: I8378e0ae07332f62b92a1681951f1236f6ef5ff9
6-bar signal icon sytle [1/2]

Change-Id: I481a2a82c8644add477ac360f6892b0c37b7ea99
Signed-off-by: STELIX <ssspinni@gmail.com>