Remove opaque check in preparing dirty region

Since preserve swap is enabled, we need to clear the color buffer
when the scissor rect is prepared for a new process. This prevents
garbage being present from the previous process in the color buffer.

CRs-Fixed: 549755

Conflicts:
	libs/hwui/OpenGLRenderer.cpp

Change-Id: Icd12ae388077b8c9ed329c37314e896500078543
AlarmManager: Set RTC_POWEROFF_WAKEUP as hidden alarm type

Hide RTC_POWEROFF_WAKEUP type to avoid any conflict with android
CDD.

Change-Id: I13a01f133a1aab2a68b32e92fc91801ceb7d43c7
Add reboot reason to detect device shutdown

This change will detect silent device shutdown

Change-Id: Ia3c13e372b02dd4d3ec4a99d1c1f7c4787977ac3
Applications crash observed while selecting words from suggestion list

While selecting words from suggestion list, applications are crashing as
textview span are going out of index. For textinput where spaces are not
allowed length difference shall be calculated properly to avoid Index
out of bound situations.

Change-Id: I360318cf9241abbb7f58ad1ddf3f3c8d364f17d1
CRs-Fixed: 642057
Telephony: Add TD-SCDMA network modes

1) TD-SCDMA Signal Strength support.
2) Add TD-SCDMA to the list of supported network modes.

CRs-Fixed: 403258, 479310

Conflicts:
telephony/java/android/telephony/SignalStrength.java
Change-Id: I158821574484bfaf47d1660406e591e2afb3be5e
Telephony(MSIM): Add support for MultiSim.

--> Subscription specific for Mobile data, roaming and usage
     - Provide database flags as per subscription for both Mobile
       data and Data roaming options.

--> Add sub based API for getAllCellInfo in TelephonyManager.

--> Use Dds subId to get Sim state, roaming state in NetworkPolicyService.

Change-Id: I6ee5d2a22e44fe7d0d68a41af0481ddbbbe21c3f
Compilation fix for AOSP update

Fixed systemui and device crash on bootup in msim mode

Conflicts:
services/core/java/com/android/server/ConnectivityService.java
Change-Id: Idf836ec01e18f8e64c972e3a54b279618e4d6ed6
Bluetooth: Changes for LPP

This patch includes implementation of a new Bluetooth
Adapter named QBluetoothAdapter for implementing LE
specific tasks that the default adapter doesnt perform.
This patch also implements Low power proximity.

CRs-Fixed: 581289

Conflicts:
	services/core/java/com/android/server/BluetoothManagerService.java

Change-Id: I63e0593f79c8929d4e18cee0472fcb401c8892e7
Server: Add Connectivity Engine (CnE) WQE support.

1. Broadcast netid information
2. Support for dual default network switch

Conflicts:
        services/core/java/com/android/server/ConnectivityService.java

Change-Id: I1b99ff3409758fd3b0b756b3da18e3983fca1ee0
Compiler Fix for new Aosp.

Compiler Fix for new Aosp

Change-Id: I9fc53b52afc890b76a328702882262608a02c16a
SystemUI: Customize StatusBar for Chinese carrier

1. Add support to show sim status on status bar pull down curtain
   if sim is absent or missing.
2. Add values-w320dp to adapt lower resolution device.
3. Update Chinese roaming string.
4. Optionally, disable BT and Wifi switch on quick setting panel if
   it is under airplane mode as Chinese carrier required.
5. Switch positions of sub1 and sub3 on status bar.
6. Redesign the scheme of selecting icons on signal cluster.
   Customized SigalClusterView and MSimSiganlClusterView to adapt
   requirement from Chinese carriers. The customization is controller
   by config values defined in overlayed config.xml.

Change-Id: I92ad6eabbec3b310c75eb2d41b3345a7169c488c
Telephony: Initialize operator separator array properly

We are setting value of only first element in operator separator
array. Instead, Values of all elements in this array should be set

Change-Id: Ia77008b55f77c478708cb718c55c5f65cb31e6f1
Manual CDMA and GSM search in global mode.

Always set preferred network mode as Global

Conflicts:
	core/res/res/values/config.xml

Change-Id: I1a1c0f1a1eb08e756d518f9522b011ef8c2b35ea
STK: add config for sim refresh in dual mode card

Use OEM hook to send sim refresh response from qcril to framework, and
add new parameter app type in the response for dual mode card when the
config enabled.Use the data of sim refresh response without app type
from RILJ when the config disabled.

CRs-Fixed: 543734
Change-Id: I10d01ab43b23f0743367eb6c7511ca2eff2d64a3
Make data call errors configurable

Retry requirements of carriers for ACTIVATION_REJECT_GGSN and
PROTOCOL_ERRORS may be different and should be made configurable
CRs-Fixed: 650922

Telephony:Add config item for regular deactivation
- Default AOSP implementation is to restart the radio for PDP
error cause = 36-Regular deactivation.
- Add xml based option to disable this implementation and treat
error=36 as temp failure

Conflicts:
core/res/res/values/symbols.xml
Change-Id: I9b9e1c808ea66bf35407f6ddca0e1276c8883beb
Sensor: Enable the motion accelerometer for screen orientation change

The screen orientation can be detected by the motion accelerometer
instead of generic accelerometer to save power.

Change-Id: Iaeb3e5958d2ef7cc33080d7091ed8a5462695c67
AppOpsService: Add MODE_ASK support to AppOps.

Add support for new mode(MODE_ASK) in AppOpsService to show a permission
dialog box to user to confirm user permission before allowing or ignoring
that operation.
All strict operations (defined in AppOpsManager) are going to be in
MODE_ASK by default.
Operations will be moved to MODE_ALLOWED or MODE_IGNORED according to
user's choice.

Change-Id: I1314125a2b8be558e422e4a9eea0ff066c21bf94
AppOps: Add support for AppOps policy file

Add support to read AppOps policy file.
AppOps policy file can be used to configure Ops default policy.

Change-Id: Idb4e3501ff9f58e491b06e74152342aa9574afbf
wifi: Confirm user permission before toggling wifi

Check user permissions before enabling/disabling wifi.

Change-Id: I1ddae6e47f42b6d3fc831c2c135ece75cf9e935d
AppOps: Add Bluetooth enable control into AppOps

Check user permission before enabling bluetooth.

Change-Id: I9af341157df05104d3c5a52874538eefdbe14c4b