Use a content observer for getting the default APN

Instead of executing a query of the database for the
default APN on every network state change, an observer
is used on the database to be notifited when the apn
has changed. This prevents unneccesary queries on the
the database.

CRs-fixed: 662137

Change-Id: I3155bd8b53a1877413ed54a861df1bfb1853b9e4
Conflicts:
services/core/java/com/android/server/location/GpsLocationProvider.java
Add support for BeiDou and Glonass

Add masks for BeiDou amd Glonass
to delete aiding data
CRs-fixed: 582614
Change-Id: I651adcf4f5486c827bea8487e3437f15cd6d8013
Conflicts:
services/core/java/com/android/server/location/GpsLocationProvider.java
framework/base: get proper obb mountpoint based on user handle

Due to invalid obb mount point, CTS test case was failing to mount
obb file at /mnt/shell/emulated/0. Added new API to support user
based mount point for obb.

Change-Id: I9f113bd98ab3a4af00dd7f788b2dc3bc45627d6c
CRs-Fixed: 587497
BootReceiver: Skip subdirectories inside tombstones scan

Properly handle (vendor-specific) subdirs under tombstones
directory by skipping over them.

CRs-Fixed: 407529
Change-Id: I0cecd9fa629fad35d62d508ddaf13968c2e46f93
Fix for framework reboot on format of SD card

MountService is not aware of /storage/emulated/legacy path which is
causing the issue on ExternalStorageFormatter service. We are getting
the a list of non-emulated SD cards and format the first one

Conflicts:
	core/java/android/os/storage/StorageManager.java
	core/res/res/values/symbols.xml

Change-Id: Iba1a9f6e40499f7f6fb095a5ee4e711b02bed439
CRs-fixed: 489037
Auto-Share SdCard on PC on insertion if ums was ON when it was removed

This change will share the sdcard to PC on insertion, if the state
of sd card was SHARED when it was physically removed.

Change-Id: Ie118f8539d011f968ec26ebd4dfebd0499af0239
Ensure to add Persistent Apps to LruProcess List on app restart

This change will ensure to add Persistent Apps to mLruProcesses
if not already present while restarting.Previously, on some
occasions, the process was not getting added to the list
resulting in SecurityException as this process was not found
in the mLruProcesses.

Change-Id: I26813a794e01aae316dffd3cf2bb38ab66ac69a9
Duplicate sounds file names are displayed in notification list

There are few duplicate notification sound files present in
/data/sounds/notifications & data/sounds/notifications/ogg.
- arcturus.ogg
- vega.ogg

Maintain sound files only under /data/sounds/notifications/ogg.

Conflicts:
        data/sounds/AllAudio.mk

Change-Id: Ibe347ed03d19a1ce4cb13c1bce1e4bbc26cb61be
CRs-fixed: 630101
Add a null check in exifParser to avoid crash while setting Wallpaper.

For some images, while setting as Wallpaper, the src array in
System.arraycopy was null in exifParser, which leads to crash.
This change adds null check to the array used in System.arraycopy.
Also, a safe check is made to ensure start index is not negative.

Change-Id: I46a16b6943aaeeb2395e335bf3926988b881be7a
IndexOutOfBoundsException observed in ProcessStats

Sometime, IndexOutOfBoundsException is observed in ProcessStats
while allocating longs array. This could be due to synchronization.
This fix will return if array index is >= size.

Change-Id: I1302e6b88a3e94249f811fe682f1b0944b5d4e8a
base: Enhance Web URL pattern

Support recognize Web URL without space prefix and postfix with
Chinese characters.

Change-Id: I03bf0afa57a031050e66dfdca2dd341d84a6b996
base: Fix the problems for runtime overlay.

 - There is no need to make the string blocking when adding the asset path,
   as it will be made by the resources.
 - After adding the overlay path, it also needs to update the string blocks.
 - Scan all the sub folders for framework overlay res.

Change-Id: Iaad019111ae364c319e58dce57dbf4647b38d4c3
LocationServiceManager: Handle MODE_ASK in location service.

AppOps CheckOp can return MODE_ASK.
Fix location manager service to handle this new mode.

Change-Id: I085f01e992f60456ad24921bf4ce508ece54e8a6