AppOps: Fix mms control in AppOps.

Add support to check user permission before sending MMS.
Also seperate out SMS operations from MMS operations.

Change-Id: Ia5b73e6b6a2c48b608a0ef1d199429c6c0e21f75
AppOps: Add BOOT_COMPLETED operation

Add BOOT_COMPLETED operation in AppOps.

This operation is used to allow user to control auto start of
applications and services at bootup.

Change-Id: Ie8488ec1b4683c8617ca569cfc858709f0d35ba2
AppOps: Add nfc enable control into AppOps.

Check user permission before enabling nfc.

Change-Id: Ia84e33c299e4fdecfd66ee933d9e7d37ed29c340
AppOps: change MODE_ASK to ALLOWED for receiving sms

SMS is received via broadcast. The operation checking doesn't
popup dialog to users because of broadcast ANR issue. So if the
mode is MODE_ASK and there is no popup dialog, then sms will be
ignored forever.

Meanwhile, receiving sms operation check is not the requirement
of appops. So one solution is to modify default mode for this
operation from MODE_ASK to ALLOWED and doesn't give user the
chance to modify it.

Change-Id: I2b6f90f13d3b2576bcbc6587ab2c6efa47c8dd52
AppOPs: add delete ops for some operations

Delete operation is required to be seprated from modify
operation. Add delete ops for sms, mms, contacts, and
call log.

Change-Id: I19ca4757884ba31a05b403a092796cc03042d31c
AppOps: Add data connect control into AppOps

Check user permission before enabling/disabling mobile data.

Change-Id: I6e1895b130788dfccbc0a8523dadf1559b698988
AppOps: change "modify" to "write" in popup dialog

change "modify" to "write" in popup dialog as request.

Change-Id: I7d451c85fcf80a7b2142fe3acf3c464717e355b1
SystemServer: Do not start Atlas Service on lowram devices.

Provide an on/off switch to control atlas service at start-up. This
service is disabled by default on lowram devices to save memory.
Atlas service is responsible for pre-loading drawables which
can be shareable among the applications. Found that the probability
of using same drawables in different apps concurrently is very less.
However it allocates fixed size of ion buffer based on config.
So by disabling it this memory overhead can be avoided. We are safe
to disable this service as it does not block any functionality.

Change-Id: I14599125c717b61f3ea5cded376fcc1802281756
audio: correct mimetype id of certain audio types

Extra audio type (DTS, 3GPA, AC3, QCP, PCM, EC3) isn't defined with
unique id which has already been occupied by other mimetype. Correct the
corresponding id range to avoid file type mistaken.

Change-Id: I9e69d98f2443c786b4d9ddfd476c656b91a860cb
CRs-Fixed: 735772
Ringtone: return default ringtone if actual one doesn't exist

Improve getActualRingtoneUriBySubId() and getActualDefaultRingtoneUri()
APIs to return default system ringtone when selected one doesn't exist
in media database any more.

This API enhancement is to ensure we can roll back to default ringtone
even if clip is removed, so 3rd party applications don't need to handle
such scenario.

CRs-Fixed: 671624
Change-Id: I516107e88a53eae8aea30a455f834cfd6baeea01
aapt: Support for mxmf file playback

mxmf files couldn't be played.
Added .mxmf file ext to kNoCompressExt array

CRs-Fixed: 465437
Change-Id: I8eb50e09d4a3b0dcf5d60869dc2d69ca924c8dc2
audio: Fixed dead lock in AudioService during volume change

- AudioService goes into dead lock when there is a volume
  change for source stream and the respective aliased stream
  simultaneously from multiple threads
- When setIndex is called for source stream, it also updates
  the index for the aliased streams. Meantime, setAllIndexes
  is called on aliased stream. Initially, it gets index of
  default device of source stream. It requires lock on the
  source stream. This is leading to a dead lock
- Fix is to avoid locking parent while updating child
  streams. Removing lock from method and synchronizing
  parent only when it is updating member variable.

Change-Id: Id38e539e2ec178ea25548312a1dd62d2de3043da
CRs-fixed: 635789
SystemUI: Add sound item in quick settings panel

Add sound item in quick settings panel.

CRs-Fixed: 715258

Change-Id: I090929a3622101edc5413afe4f7c2d1863139d2c
SystemUI: Fix crash issue when slide brightnesslevel in status bar

Getting panel holder by panel_holder in dual sim mode causes a crash.

Get panel holder by msim_panel_holder in dual sim mode and by panel_holder
in single sim mode. Move brightness mirror to front of behind scrim to
avoid it being covered by behind scrim.

CRs-Fixed: 737868

Change-Id: Id3021f879a416525804de5f786a522f4f23dc6f8
P2P: Change supplicant scan intervel during WFD session

During WFD session supplicant scan intervel is one minute. If
there are some saved profiles, then supplicant will issue a scan
for every one minute, this is causing some ping latency in WFD.
Hence supplicant scan intervel should change to five minutes
to improve ping latency in WFD session only.
Change-Id: If827bab6f186ebeaac90f297935bc8b987eb4d09
CRs-Fixed: 669404
SystemUI: Add RAT and translation for carrier SPN/PLMN strings

  - Update SPN/PLMN strings to locale strings on status bar and
    lock screen when system languages change
  - Add 2G/3G/4G RAT after SPN/PLMN string on status bar and
    lock screen
  - Add config to control these features

Conflicts:
core/res/res/values/config.xml
Change-Id: Icbc79bf259ea40792ff59e4fcc04d883e7797f8c
Telephony: Get SIM card capacity count of SMS.

Add one API:
- getSmsCapacityOnIcc: get the capacity of stored SMS on ICC card.

CRs-Fixed: 645022
Change-Id: I8064d694d35c4200074a24ee4159d09ecb2a779c
SystemUI: Fix signal icon overlapped by type icon issue

Mobile type icon layout gravity is center and bottom, it covers
signal icon.

Remove mobile type icon layout gravity to place it to the left
of its container.

CRs-Fixed: 729963

Change-Id: Ieccaa6cc2a8f0b615f13af7164f4e9a1c5edf8c7
SOFTAP: implement SOFTAP new requirement in framework

If framework recevied the STA (dis)connect message from netd,
it will try to read device info from dnsmasq and broadcast
an state change event via intent.
Meanwhile, framework will maintain the conneted Sta list which
can be access from upper layer.

CRs-Fixed: 685913
Change-Id: I61bfb48a9ac51371995b1992b966be6e18633828
Add subscription handling to notify dataconnection

In TelephonyRegistry, to notifyDataConnection method
add subscription based handling to connectedapns list
which keep track of apn type connected.
Without this, when default apn on non-dds sub is notified
as disconnected, data icon on dds sub will be erased.

Change-Id: I7023ac1fcde13bdb5afec684be26fb286a25eb4b
CRs-Fixed: 712007