Revert "Keyguard: disable statusbar clock for dashclock, lockclock and desclock"

Apparently this is handled by default on kk

This reverts commit eeee5bbc3383f2a423624f4e2acdf91a68e46be1.

Change-Id: Id04f029fcba7ad92b4ac1f72485d6802493cfc65
Keyguard: do not show maximized on simpin and several fixes

- to show a maximzed widget container on first boot when simpin
  or puk is requested does not make any sense. In this case
  show it as normal view
- fix sometimes unresponsive unlock handle on maximized widgets
  and bring it to front (happened only in combination with
  lock before unlock)
- a bit codecleanup and centralize
- fix animation was visible on screnn turn on. Now it is directly
  maximized visible

Change-Id: I9ba5d8f9537c68d3590826eb8d1483a02cfe3266
fb: Keyguard disable challenge drag down on slimpin/simpuk screen

On simpin, simpuck and as well account change screen it does not make
any sense to give the user the abillity to drag down the challenge to show
the widget maximized (neither if widgets are enabled or disabled)
Reason: simpin/simpuck widget is not shown due of security reasons
and on account change the next expected behaviour is that the user gets a new
setup. So it does not make in this case as well sense

Just check for current securityscreen selection to block this behaviour. As
well move the enable/disable code to a proper place

Change-Id: I0b16d1e590252b537d6c71c4aa9b133ed832be45
trds: improve dialogs and menu popups

Change-Id: I54da4ac0236dfe16ee964ccb070944206d0544e2
trds: consistent glow for menu dropdown and popup

Change-Id: I248872cbd67471495f8b95036d995f25e2ca4459
Revert "Improve AOSP Download/Upload animation"

This reverts commit f02860d0d577e8d380abb93ea4f97ebbafa55303.

Change-Id: I42b9fe1e9ac21a69241ec9f3820ab7f6da6d02bf
Smoother Upload and Download Animation

Change-Id: I6e6409cc85ad951019dbac10156d4aed92f4c5bc
Keyguard: fix codestyle

Change-Id: I3f1fbab0ae5434b09766cd69c39a133f4a7039d0
SystemUI: Pimp-up Media Tile (1/1)

Allow double-click to start a sleep timer
	for the currently playing media.

PS:
- clearer button descriptions on different states
- if timer is in progress restore and show the time the
  user had set up and notify that he is in timer progress

Change-Id: I7848523e7bc3d9577361ff55f010a9909d46e665
Fix dest == src bugs in Matrix.cpp.

The main bug was that the AutoJavaFloatArray autoSrc was not passing in
read only. This meant that the destructor overwrote the data which
the autoDst AutoJavaFloatArray had written in it's destructor.
This case only happened if src == dest and the arrays were copies.
Also improved performance by passing in read only a few other places.

Bug: 12570144

Change-Id: Idc8764087dc165433c584b87a0f9d4ed0ec795e8
AssetManager cookies should be int32_t and not void*.

Cookies are really indices into vectors and arrays, so
they don't need to be void*. We choose int32_t instead
of size_t to allow their width to be well specified.

(cherry picked from commit ebfdd0f467e39c3af8d92cade78263935340acb7)
(cherry picked from commit a7fa2e592e2e579e5acdb903dba83fc074ebc215)
(cherry picked from commit a9d5701b034ed2d9771b3f0943e1add00741d7cd)

Change-Id: I2aed3db568b6fdc487bf99e2c5dd123206736fda
[ActivityManager]: Fix the activity visibility state not sync between ActivityManager and WindowManager

Symptom:
When press Home key to home screen, user is able to see the activity's window shown on top of wallpaper and below launcher(widgets).

Root Cause:
The ensureActivitiesVisibleLocked() is called pretty often (for example when a new process bound).
If the top activity "B" was finishing, then the previous activity "A" should be visible.
Therefore, the activity "A" window will be set to visible and then launched activity "A", but it does not updates the visible state in ActivityRecord for "A".
There has a timing issue that if a new activity "C" is started, "C" becomes the new top activity and be resumed.
In that case, Activity "A" window will remain visible even if it is behind a full screen activity "C" because the ActivityRecord.visble of "A" is still false, so the window visibility won't be update.
So when user press home key and back to launcher, the surface of activity "A" will be composed on top of wallpaper.

Solution:
Updates ActivityRecord.visible to true for "A". After "C" is started, the "A" will be called WindowManagerService.setAppVisibility() to set invisible, then called onStop() when execute ensureActivitiesVisibleLocked() again.

Change-Id: I536ba04b95d8d274fea6d679a6493e620bc981e2
Frameworks: Fix Derp

Wow oops.
Copy/Paste derp I just found.

Change-Id: I9daa36c63bdde493591a880f3b56837c764bb2d4
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
take account of RotationVector's new extra parameter

Rotation vector has a new 5th parameter introduced in API 18. But the code classified the 5 parameter the same as it would be 3 and overriden the 4th parameter which is unnecessary and also caused an unexpected behavior.

Issue #63268:
https://code.google.com/p/android/issues/detail?id=63268
Signed-off-by: Balint Ureczky <ubalint@gmail.com>

Change-Id: I6f9a5fc401da655695ab03694b4a74dc5be936ed
Hang off call by power button while screen is on

Enable power button end call and screen is off.  User use power button
to turn on screen will end call.  Should turn on screen and not end call

Change-Id: Idf34f7724dbf1796205332c5c7ef663102f8a30c
Signed-off-by: shower <shower929@gmail.com>
NsdService does not clean up after exiting clients

When a client of the NsdService exits, NsdService should
clean up the requests it has sent to the mDNS daemon:
cancel any pending resource-discovery and resource-resolution
queries, and remove any services registered by this client.

If this isn't done, several bad things happen. The daemon will
continue to run unnecessarily, will report service discoveries
that can't be forwarded on to the client, and will continue to
advertise service ports for an application which is no longer
running until the device is rebooted (mDNS pollution).

Bug: 9801184
Change-Id: I0aa7311480322aefcff16f902fbbf34f50985d38
NULL previous background bitmap upon changing wallpaper

Step to reproduce it on Nexus 10 with 4.4.2(KOT49H):
1. Long press on home screen.
2. Choose wallpaper from Wallpapers.
3. Select new wallpaper and set it.
4. Repeat step 1-3 several times.
See black background instead of the wallpaper.

There are two binder objects who hold reference to the
ImageWallpaper$DrawableEngine, which keeps the big chunk
bitmap from being recycled.
One is WallpaperService$IWallpaperEngineWrapper. The client
references went away slowly, maybe several minutes after
changing wallpaper. Then the finalizer has to been executed
to GC it.
The other one is WallpaperService$Engine$BaseIWindow. Don't
know who still held reference to it even after the window
was removed.
Anyway, let the bitmap be GCed first.

Change-Id: I27f6971a3edd26472b69e59b542b27fd7c8e7b90
Signed-off-by: jshe32X<jianchunx.shen@intel.com>
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
remove unnecessary switchUser call

If userId doesn't change, no need to do switchuser.or it will
introduce some tweak for gps modules in quick off/on because
they need cost time in off/on.

Change-Id: Ie5e408dc8be69c8a63a18bcb2cfe478cef4d70e6
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
Fix to memory leak leaving WallpaperCropActivity.

After running wallpaper cropper serveral times it crashes with
an OutOfMemotyException.

When leaving WallpaperCropActivity all textures are leaking until end
of process lifetime. This is due to a missing call to function
TiledImageView.destroy which in turn assures TiledImageRenderer
releases held resources.

Resolved by assuring WallpaperCropActivity calls TiledImageView.destroy
from WallpaperCropActivity.onDestroy. In case where onDestroy is not
called resources will be released anyway by process being brought down.

Change-Id: I016b1b9da5f4db8d2b14767edb59fe742415e074