AppOps: Don't apply OP_ALARM_WAKEUP to system components

System can freely invoke and manage alarms. Preventing it from doing
so interferes with remote components like the backupmanager (backing up alarms)
due to the mismatched uids between the invoking app and the running
service that takes the action.

Change-Id: I079df8d2522642d6d9194781207df7dd67b715b2
Clear cached locations when location providers disabled Bug: 12118307

(cherry picked from commit b084fef18ee1b5d24d15cff37dc3a053933d361e)

Change-Id: Ief869b9e38858092bfa3f8d6d090a278dee7d86c
AlarmMangerService: Fix the delay of ACTION_TIME_CHANGED for time-services

After boot completed, if low memory condition happens or some ordered
broadcasts have time out, it will cause delay for some receivers to
receive ordered broadcasts. Adding FLAG_RECEIVER_FOREGROUND into
time changed action will make TimeServiceBroadcastReceiver receive
ACTION_TIME_CHANGED in time.

CRs-Fixed: 630982
Change-Id: Id789d0b3c969af6b92f62612602ba119613382ab
ExtMediaPlayer: Increase parcel pool size to 30

Increase MAX_NUM_PARCELS to 30. This is to handle
parcel override issue when textsamples are sent at
a fast pace from mediaplayer.
Usecase: With CEA CC streams, dashplayer sendTextPacket
embedded in each video sample as soon as decoded.
No realtime offset delay sync logic for text samples
as with A/V samples. When samples drained in batch,
can have more than 5 textsamples sent in flurry

Change-Id: I4c4c63b9c9c296dbb387c4da9e70c040b75f92b6
AppOps: fix framework reboot issue when AppOps enabled

When AppOps security feature enabled, there will be a prompt when
someone call the protected operation. If no user click on the
dialog button, it will be always blocked there. This action may
cause watchdog timeout in some service.

Change-Id: I114bfef22502b81887a84b218e1548de29be3f69
Fix socket descriptor leak from Zygote to child app

Due to an API change in LocalSocket, Zygote must now
manually close the FileDescriptor it created when it
registered a LocalServerSocket.  The LocalSocket.close()
routine will no longer do so.
Bug: 12114500
(cherry picked from commit 70ef29b04ee4ef7d7acfec79041dbe800961195e)

Change-Id: Ief23a3c99e007dc4aa6f94dfb47a1b2b6c854dad
Alarm: ignore less than 2 mins upcomming power off alarm

2 minutes is our define for enough boot up time for a power off alarm.
For current design, it can only afford upcoming power off alarm which
is later than 2 minutes. Kernel alarm driver only take care the power
off alarm which is 2 minutes later. And the framework only pass the
first power off alarm to kernel. So we need to find the first 2
minutes later upcomming power off alarm to kernel, otherwise it will
be no power off alarm from kernel's perspective. Fix the bug by
ignoring less than 2 mins upcomming alarm as power off alarm, and
only treat it as a normal alarm.

CRs-Fixed: 624561
Change-Id: I91379ecb2b378441ac2edb36212531ba6f203d8a
AppOps: don't make delay for permission dialog

Permission dialog is unclickable for 1 sec. To remove this delay
for better user experience.

Change-Id: I9dfc90c1fe5b057d4379a8acb05ac21b913b7360
CM11 Themes: Use sendBroadcastAsUser in ThemeService

Change-Id: I2a283318357ece9f6195a9bb825748b4549396af
CM11 Themes: Use package name from AndroidManifest

It is possible for an apk to have a different package
name for the resources than what is defined in the
AndroidManifest.xml of the apk.  Using the resource's
package name for the base package name causes themed
resources to not be properly loaded.

Instead of returning the resource package name we return
the apps package name from AssetManager.

A good example of this is Trebuchet.  The system sees
it as com.cyanogenmod.trebuchet but it's resources use
com.android.launcher3.

Change-Id: Id57e68b27b3c7509e3358a7fd12ae73a03dd6cdf
Don't animate the circle battery meter when battery is fully charged

Rotating a full circle is unnecessary, no need to redraw the battery
meter every 50ms

Change-Id: Ibc7232ccd296ddbcf7c920aa6d8f01baa92a06d7
Fix circle battery opaqueness for the low battery color

Because of the DST_ATOP Xfermode the color was drawn below the full
gray ring resulting in a washed out red. Fix this by not setting an
Xfermode and drawing the color normally.
This does not affect the non-low color as it cannot get any whiter.

Fixes: CYAN-3282

Change-Id: If1183dcb272e84858371be3765ba758fa2560eeb
immersive mode: don't unconfirm a package, that's just dumb

* This is very annoying for specialized apps
* See here for a great explanation http://stackoverflow.com/a/20309721
* The fact that it doesn't even notify the user until the NEXT time they
  run it makes it completely pointless in my opinion anyway.

Change-Id: I423611efc07d467e1d81c66d58adcff331be8b38

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Framework: Ensure Intent.ACTION_USER_PRESENT Is Sent

If the user set a keyguard delay (AOSP-Secure-Delay)
	and the screen turned off, many processes will
	thus assume the user is no longer present (true).
	If the screen is turned on before the keyguard
	enables itself, the USER_PRESENT broadcast is never
	sent and the app/process will not know the user has
	returned to using their device.

Change-Id: I6301848043fbf2d76513a20ae189d28018473202
Framework: All Shake Patches (1/X)

Included:
	Keyguard - Disable Shake if isHidden
	Disabled Shake Apps (1/2)
	Shake Sensitivity (1/2)
	Keyguard Shake Events (1/2)
	Shake To Perform Event (1/2)
	430942 miscellaneous fixes

Change-Id: I47707f51e61ba0d4687e0232d684de7ee6b0eb
SystemUI: Smart Pull-Down - Any Notification (1/2)

Change-Id: I8656b75550ea0d30d4c620160221ca22ffe1af92
Framework: Custom Tile Double-Tap (1/2)

Change-Id: I50461ddea85cb03e5c04b43e6a6b09411dba9a0d
Framework: Fine SeekBar control

Allow user to move their finger in the Y direction
	to change the speed at which the seekbar will seek
	on moving their finger across the X direction

PS2: increase time constraints by a bit
PS3: decrease distance constraints, lol

Change-Id: I1fc8db16820fd3615436ee0be6ce0bf4394c0808
SystemUI: Pimp-up QuickRecord Tile

PS2: Don't close dialog on deletion,
	keep active but notify
	user that file was deleted.

Change-Id: Iafef30a7f75b7131cc8779784bff1ef9f7042fac
Framework: Allow All Widgets On Keyguard (1/2)

Change-Id: I2f25d403740a9ee8822c684436bc28283c356f6c