Remove iterators (DO NOT MERGE)

Remove DisplayContentsIterator and AllWindowsIterator. These were cute
but they take up valuable resources. Iterate over ArrayList members
in their place.

Change-Id: Ie0c537608532cfb36f34d976cc6eacd21bad98cd
Fix missing lock in power manager.

The display wake lock and other internal state could become
out of sync if we happened to execute the power manager's update
function concurrently due to the missing lock.

This bug can be trigged due to display state changes or proximity
sensor updated.  Although it would be extremely rare, we have
some evidence of this happening on at least a few devices resulting
in rapid power drain with the screen off or a crash.

Bug: 9880044
Change-Id: I3c674ce429621a50cbb36c3a01883d5f388205b2
(cherry picked from commit d91e417b06388694db213257b4df6b4dd78e0d49)
When a SIM is changed check mobile provisioning.

A simple mechanism for doing this is to take advantage of the fact
that we require the device to reboot after a sim has been changed.
Thus when connectivity service is started we wait to get a connection
then call checkMobileProvisioning once. We also add a check that
the DEVICE_PROVISIONED is true, i.e. SetupWizard has been run.

Bug: 9784024
Change-Id: I5c1936744f6fc55a447ae44cd36eec3849d27e21
Cleaner Tejat notification in Audio Package 11

Add a reworked version of "Tejat", at 48kHz.
 The original asset is "/data/sounds//notifications/wav/Deneb.wav".
Use this new version in Audio Package 11 under its original name.

Bug 9900161

Change-Id: I4d7c73715db4e52f5c89aeca726f8b314e0895d5
Add gservices updater for carrier provisioning url

bug:9623159
Change-Id: I36697ed341353b7a3dbec5afe20241102e76f6f1
(DO NOT MERGE) Fix pub issue #58043: Copy crash in Android 4.3...

...when clipboard listener attached

We need to clear the calling identity before dispatching change
notifications.  Also make this more robust, so that in the face
of any failure we will clean up the broadcast state.

Integrated from master.

Change-Id: I05e1f76ffd486439535631fe4062dabe94bd2ccf
Allow the user to block notifications for foreground services.

Stepping carefully around the fix in change Idc788527, we
perform security (and AppOps, and therefore user block)
checks against the uid passed to enqueueNotificationInternal
rather than the Binder caller.

Bug: 9502541
Change-Id: I91745db92823381df75721c1b8f11013a7fa4ecc
Add version identifier to app ops.

All old versions drop their modes except for the notification op
(which is the only one there is currently a user-visible control for).

Change-Id: I9e09cebe63e9ea81f2adc01aef7d1a5a59f57a56
Revert "Add version identifier to app ops."

This reverts commit 483a6bbfc118409b9c46b226cf0aa6afdc4d9159.

Change-Id: I91d6b8b8d1789089bf9764e734f7fe59d03151a2
Add new app ops method to reset all op modes.

Change-Id: I5ee6764de8dc31d812e5a788914ab0099bbef4c0
Fix issue #10226007: Reset apps restores most of the changed settings...

...to original but not all modified ones

Very stupid mistakes in messing up the iteration when pruning op
entries.

Change-Id: Ie536b9095f797fcd2b86c9a386a72746796430d1
Use hostname verifier directly instead of instance DO NOT MERGE

Instead of local instance of the default HostnameVerifier, use it
directly from HttpsURLConnection. This avoids class preloading creating
an instance of it before it's necessary.

(cherry picked from commit 928ee1e48fa89302d02fdf8a8a2c7315d7195e7c)

Bug: 9984058
Change-Id: I79d8a934bfc390e4cd503fd592e21bc4e5446a7d
Merge tag 'android-4.3_r2.2' into jb43-r2.2

Android 4.3 release 2.2

Signed-off-by: Evan Anderson <evan1124@gmail.com>

Conflicts:
	services/java/com/android/server/NotificationManagerService.java

Change-Id: Ic20e2b9a1e232ca25e6ca52c7584f389f09368ff
Allow multiple emulated storages at the same time.

Only do multiuser mapping for primary emulated storage as per google docs.
Allow all non-primary emulated storage to have id other than 0 so that
it could be distinguished from the primary volume.

Change-Id: I7b70b9067fd6211055fb9074710f48107d7b0e8e
Revert "Allow multiple emulated storages at the same time."

This reverts commit ded476c7a956b38298c3abc6a204b12556a538d1.

NOTE: after about a few failed attempts and cross referencing error start dates, figured this caused sys ui errors upon rom boot.
Revert "Allow multiple emulated storages at the same time."

This reverts commit a83ee097b5c35cefaec2c4b7a8e313816634fd0f.
ScreenShot QuickTrash
Merge remote-tracking branch 'github/jb43' into jb43-r2.2
Merge remote-tracking branch 'github/jb43' into jb43-r2.2
Allow the user to block notifications for foreground services.

Stepping carefully around the fix in change Idc788527, we
perform security (and AppOps, and therefore user block)
checks against the uid passed to enqueueNotificationInternal
rather than the Binder caller.

Bug: 9502541
Change-Id: I91745db92823381df75721c1b8f11013a7fa4ecc

Conflicts:
	services/java/com/android/server/NotificationManagerService.java