don't disable lockscreen widgets on low memory devices (1/2)

Change-Id: I4ed76e259d156be43b85645e1473f35b762f18d7
Don't confuse stat and stat64.

Cherry-picked from AOSP: https://android-review.googlesource.com/#/c/79462/

Change-Id: I45e65036d86c58943b9c273777f3f8be79a6966f
Fix incorrect name in eglSwapBuffers log wrapper

Change-Id: Ica8bae5540e51ce96ab35523049d61a9c621a2da
Remove dead code.

This hasn't been used since at least 2011, and we're no longer
shipping the data supporting it either.

Change-Id: Ibe42057650b49794c65d6f0d54ed7a492f3b594b
FLAG_PRIVILEGED disappears if privileged app is updated and rebooted

Since Kitkat, an app pre-loaded under /system/priv-app/ has
FLAG_PRIVILEGED. However, if the app updated and the device
rebooted, privileged flag is unset from pkgFlags. This patch
fix issue to assign privileged flag when scanning the updated
packages.
Cherry-picked from AOSP: https://android-review.googlesource.com/#/c/79511/

Change-Id: Ic24b5882f65dabdfae9cc39da3d68661bed4fc31
Webkit: add to support file uploading

This change adds one function in WebChromeClient for supporting
uploading file in browser. In Android 4.4, browser is based on
chromium not webkit engine, chromium engine support uploading file
and will callback to client to show file chooser, but android_webview
client has empty implementation within this callback for file chooser.

So we solve this issue by adding implementation in framework chromium
client which extends android_webview client, function in framework
webkit client and corresponding functions in browser app.

Change-Id: I6baef44eef28eb2b380ab6181200bf0b9cc0316c
Drop Lockscreen vibrate option [1/2]

It doesn't make sense to keep haptic feedback on, but
disable it only for that little unlock icon.
This option didn't do anything more than that.
Let's drop it and don't confuse users.

Change-Id: I0211deea61b2d5b048deb118c30fc1397a56d3ee
lights: Add music light support (2/2)

Change-Id: I734e0d09bf9b01c149d456035eaa8ea5db009dad
Set Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED default value

To be able to customize the "WiFi optimization"
setting we need to set a default value.

Change-Id: I9cd2f204cf46c0b4c70a4a147da2f1d73a708308
Keyguard: don't refresh ui when screen off

KeyguardStatusView is doing refresh all the time,
which cause high power when screen off.

Change-Id: Ifabdde4419a23e919cd52fe77e78ec3160575af1
Perform NTP lookup at Mobile data connections

If NITZ isn't supported by the current carrier the Android framework
relies instead on a remote NTP server to set the system clock. The
NetworkTimeUpdateService class polls for NTP time during the first 4
minutes after boot, failing to get NTP time within these minutes will
increase the polling interval to 24 hours. Hence, if a data connection
isn't activated directly after boot it can take a long time for the
system clock to be updated. To prevent this situation, NTP lookup is
scheduled as soon as a Mobile data connection has been established.

Change-Id: I046e0330147e7ace4b720a7e70f9d5047d42cfe6
Fix the screen-off animation ignoring value set in ro.sf.hwrotation

Change-Id: Ib0729440cc76a604ff400cb9c4e8da3350b7d214
UI not updated correctly in expanded statusbar

Sometimes when getting status changes in expanded statusbar the
text disappear. Both NetworkController and PhoneStatusBar handles
UI updates and they are not in sync. This fix allows PhoneStatusBar
to update UI when NetworkController is updating the UI.

Change-Id: I46b8a24ecc732e441f836692c6584a78d8108dff
Appears black screen fix for a while

This issue is side-effect of added google patch on KK MR1.

Fix a couple of issues with mOpeningApps.
https://android.googlesource.com/platform/frameworks/base/+/a8ee262c04749db4f32f73d2b9e7f58989c4638b%5E%21/#F0

[Reproduce path]
Settings -> Location -> Location OFF -> Location ON -> "Location consent Dialog" Popup-> "Agree btn" press
-> Black screen appears for a while

Change-Id: I14efdce87e8d78d38f9aae48568f69937e4fe1fa
Frameworks: Update DocumentsUI for theme chooser combatibility

PS2: credit: djdarkknight96
PS3: this time, use the correct owner info
PS:4 fix typo in styles.xml

Change-Id: I121099de6c09d33ef9f02019996eac1c6f1d3731
Frameworks AppOps: Enable MODE_IGNORED for OP_WAKE_LOCK

  *) Kitkat commit log highlights that the current
     implementation state is for auditing only
     https://android.googlesource.com/platform/frameworks/base/+/713df150b92a0a5eea877f99405e31eefbf93a09

  *) We go one step further and honour MODE_IGNORED
     when for OP_WAKE_LOCK.

Change-Id: I889227ca24a508a0d96bd43594c5179ba758ae3d
Merge remote-tracking branch 'cm/cm-11.0' into HEAD

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
	services/java/com/android/server/power/ElectronBeam.java

Change-Id: I4b9ce321e260a1ec13be7d04330ed78676500052