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
Merge commit 'android-4.3_r2.1' into jb-mr2

Conflicts:
	Android.mk
	api/10.xml
	api/11.xml
	api/12.xml
	api/13.xml
	api/14.txt
	api/15.txt
	api/16.txt
	api/17.txt
	api/8.xml
	api/9.xml
	cmds/servicemanager/Android.mk
	cmds/servicemanager/service_manager.c
	core/java/android/app/ContextImpl.java
	core/java/android/content/ContentProvider.java
	core/java/android/content/Intent.java
	core/java/android/content/SyncManager.java
	core/java/android/content/pm/PackageInfo.java
	core/java/android/content/res/Resources.java
	core/java/android/provider/Settings.java
	core/java/android/webkit/BrowserFrame.java
	core/java/android/webkit/WebSettings.java
	core/jni/Android.mk
	core/jni/AndroidRuntime.cpp
	core/jni/android_media_AudioTrack.cpp
	core/res/AndroidManifest.xml
	core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml
	core/res/res/values-ca/strings.xml
	core/res/res/values-cs/strings.xml
	core/res/res/values-hu/strings.xml
	core/res/res/values-ja/strings.xml
	core/res/res/values-ru/strings.xml
	core/res/res/values-sv/strings.xml
	core/res/res/values-zh-rCN/strings.xml
	core/res/res/values/config.xml
	core/res/res/values/public.xml
	core/res/res/values/strings.xml
	core/res/res/values/symbols.xml
	data/etc/com.stericsson.hardware.fm.transmitter.xml
	data/etc/platform.xml
	data/sounds/AllAudio.mk
	libs/androidfw/AssetManager.cpp
	media/java/android/media/AudioRecord.java
	media/java/android/media/AudioService.java
	packages/SettingsProvider/res/values/defaults.xml
	packages/SystemUI/Android.mk
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/drawable/navbar_search_handle.xml
	packages/SystemUI/res/layout-land/status_bar_search_panel.xml
	packages/SystemUI/res/layout/quick_settings_tile_alarm.xml
	packages/SystemUI/res/layout/quick_settings_tile_ime.xml
	packages/SystemUI/res/layout/quick_settings_tile_media.xml
	packages/SystemUI/res/layout/signal_cluster_view.xml
	packages/SystemUI/res/layout/status_bar.xml
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/res/layout/status_bar_help.xml
	packages/SystemUI/res/layout/system_bar.xml
	packages/SystemUI/res/layout/system_bar_notification_area.xml
	packages/SystemUI/res/layout/system_bar_notification_panel.xml
	packages/SystemUI/res/layout/system_bar_notification_panel_title.xml
	packages/SystemUI/res/layout/system_bar_settings_view.xml
	packages/SystemUI/res/layout/toggle_tile_signal.xml
	packages/SystemUI/res/layout/toggle_tile_user.xml
	packages/SystemUI/res/layout/toggle_traditional_signal.xml
	packages/SystemUI/res/values/config.xml
	packages/SystemUI/res/values/dimens.xml
	packages/SystemUI/res/values/styles.xml
	packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
	packages/SystemUI/src/com/android/systemui/SearchPanelView.java
	packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
	packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsTileView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/SettingsPanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
	packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
	packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsView.java
	packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
	policy/src/com/android/internal/policy/impl/GlobalActions.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetPager.java
	policy/src/com/android/internal/policy/impl/keyguard_obsolete/LockScreen.java
	services/java/com/android/server/DeviceStorageMonitorService.java
	services/java/com/android/server/NotificationManagerService.java
	services/java/com/android/server/SystemServer.java
	services/java/com/android/server/ThrottleService.java
	services/java/com/android/server/VibratorService.java
	services/java/com/android/server/WifiService.java
	services/java/com/android/server/am/ActivityManagerService.java
	services/java/com/android/server/am/ActivityStack.java
	services/java/com/android/server/connectivity/Tethering.java
	services/java/com/android/server/pm/PackageManagerService.java
	services/java/com/android/server/power/ElectronBeam.java
	services/java/com/android/server/wm/WindowManagerService.java
	services/jni/com_android_server_BatteryService.cpp
	telephony/java/android/telephony/SignalStrength.java
	telephony/java/android/telephony/TelephonyManager.java
	telephony/java/com/android/internal/telephony/ITelephony.aidl
	telephony/java/com/android/internal/telephony/RILConstants.java
	voip/java/com/android/server/sip/SipService.java
	wifi/java/android/net/wifi/WifiNative.java
	wifi/java/android/net/wifi/WifiStateMachine.java
	wifi/java/android/net/wifi/p2p/WifiP2pService.java

Change-Id: I08097eb441524de2dd0ce81b38cbd723a9a5a67d
Merge fixes

Change-Id: I8e3ff663dc8900e4ebebc591ccd642ef061e2ebe
DO NOT MERGE: quick hack to let build succeed

Change-Id: I3d97bc08348d4a43797a5d3bc0fbf4a0e8d64742
Framework: Generic Blacklist support (4 of 5)

* Needed for compilation...

Change-Id: Id6c85c9a537713ec77d00deb7f7fe5a9150be2cd
Fix MAP SDP record generation [2/3].

Give the bluetooth app API to register a server socket for a specific
UUID/port pair. It needs that for registering two OBEX server instances.

Change-Id: I6ede7f2777040af4e653eceb14ea47a2c03abfae
Bluetooth: SAP: Add framework changes to support SAP

This change consists of:
SAP Disconnect from server support related changes

Change-Id: I7215f503244c5ee277e83d60d6960f18559acfb9
Ported: Bluetooth Message Access Profile (MAP) from CM9

This was added to CM10 to restore message exchange capabilities with automotive systems.

Change-Id: Ib872bebc5c292b1f84c903b068e59b7eeca6d76f
Revert "core/jni/android/graphics: Cache copy of pre-scaled Bitmaps"

This reverts commit 3083c3c93e12c4548bbe3bee1fecd1a45478657c.
AudioService : Fix NPE

Initialize mVolumePanel prior to registering the receiver,
since 4.3 now invokes the layoutDirection call on it.

Change-Id: I8d00f0886b603d52bc55cba5fd3ba1d86f7ea56c