Prevent a duplicated registration of Observers

If same Observer and same URI are registered, the callback functions are called multiple times
when data identified by a given content URI changes.
It makes system slow and it cause ANR sometimes.
And When run unregisterContentObserver(), just one deleted
but others are remained in mObservers.
So add prevent code to avoid to duplicated registraion of Observers

Change-Id: I5c7845deb682db289ff0d53150ef012174859767
Signed-off-by: muzbit.kim <muzbit.kim@lge.com>
PIE: Turn on HWA only if isHighEndGfx()

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
NFC: getNdefMessage() should throw exception if no tag in field.

According to documentation, an TagLostException should be thrown, if
the tag has been moved out of field when reading NDEF message.

Change-Id: Ib7e485ed442027fdebd5bc7a46101fbca0c88bdb
Fix problem where PhoneWindowManager waits for keyguard to draw

This fixes a problem where PhoneWindowManager times out waiting
for keyguard to draw when it's disabled.  Instead, we pass a null
token back which allows PhoneWindowManager to continue.

Fixes bug 11190932

Change-Id: I041ea1d88dca681476d9477a3aab54559976b312
Keyguard: We need to ensure that keyguard is showing as well to set the token

Google fix

https://github.com/SlimRoms/frameworks_base/commit/021806ec33f5f59567f3bb3af135b2a1d88c0951

fixes what it is meant to fix.

But still we need to ensure if the keyguard eg is disabled by 3rd party
apps or the keyguard is not showing due of other reasons to inform PhoneWindowManager over the token
not to wait to draw for the Keyguard and go ahead.

Fix:
Just check for isShowing in addition to the check if KeyGuard is disabled

Change-Id: I5f017a6ccebf12dc717fb6d44802a1c1fee15abc
Keyguard: don't try to fetch the badgeIcon if remoteClientPackage == null

Logcat shows....if client is lost there is no need to force an exception due that remoteClientPackage
in this case is null.

Change-Id: I80e612610f93c9d70c854b2fcb8fbf0c0d8f9e2a
Keyguard: update correctly track title and info if screen turns on

AOSP issue - Force update both if screen turns on.

Change-Id: I3d3198534c3ccdaa0ad2f40a967cc092a7dc0a0c