ProfileManager: fix coding style

Change-Id: Ia0c3dac6b73e2f22bae818f7ab992a9cfcadfa57
Fix getPrivacyGuardSettingForPackage()

Return true only if op mode is not allowed
and is not denied by a user restriction.

Change-Id: I8e58266ea8ed26726a634be523aeeba84adda30f
Frameworks: Redirect appops strings to string references

Based on strings in:

Author: Steve Kondik <shade@chemlab.org>
Date:   Tue Feb 25 13:11:12 2014 +0100
Relocate and cleanup new app ops features and PGify it
Change-Id: I4eb65f6f88c2f2aecdf054ffd52c31c4d5866900

Change-Id: Iba9a45838ee8eb7f5cb6ec6d29776574c86e84b6
[2/2] AppOps: Add alarm wakeup op

Port from cm-10.2 / cm-11.0

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Fri Sep 27 21:30:34 2013 -0700
[2/2] AppOps: Add alarm wakeup op
When alarm wakeups are denied/ignored,
the alarm types are remapped as follows:
RTC_WAKEUP -> RTC
ELAPSED_REALTIME_WAKEUP -> ELAPSED_REALTIME
Change-Id: I3a5023e1f6260004319290e776bdb2daf73e9fdf

Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Thu May 22 19:54:01 2014 +0100
AppOps: Don't apply OP_ALARM_WAKEUP to system components
System can freely invoke and manage alarms. Preventing it from doing
so interferes with remote components like the backupmanager (backing up alarms)
due to the mismatched uids between the invoking app and the running
service that takes the action.
Change-Id: I079df8d2522642d6d9194781207df7dd67b715b2

Change-Id: I399a7f0d0b20c562b94ec978976d5d8ebff12eac
framework: fix screenshot and rotation animation for devices with abnormal hw rotation

port foreward from cm10.1:
https://github.com/CyanogenMod/android_frameworks_base/commit/ac555b9ca9a76d13a26fc9ea40980fe57258761b#diff-d6f7bba268a742c91252cc9e64e2381a

Change-Id: I14b6e2403b9be345a1a591138f8a3a12ca8e4f89
media: Scan FLV files, because why not?

Change-Id: Ia517d3057d843d7306f567cdbdddddd63c472a2b
SettingsProvider: Migrate STATS_COLLECTION to secure.

  Migrate STATS_COLLECTION to secure from system table while
  retaining the user preference. Moving it to secure allows us
  to do per-user settings.

Change-Id: Ia55fdd8c6db418c4eaebf17a54b765d25a878471
SystemUI: make long pressing recent switch to last app

With this patch, long pressing the recents key on the navigation bar
will attempt to switch to your last application in the activity stack
before the active one.

The user's current home launcher package is ignored as well as SystemUI (so that
RecentsActivity does not influence the behavior).

Change-Id: I38771e0fce16b55bb5186af47115b4e812cb60b0
Signed-off-by: Roman Birg <roman@cyngn.com>
Signed-off-by: Adnan Begovic <adnan@cyngn.com>
frameworks: allow last app action to be assigned to hardware keys

Also fix multi-user handling for 'switch to last app' and 'kill
foreground app' actions.

Change-Id: I1fb586d19b1198e6888b0f11e0a2813acf0bcd5b
Signed-off-by: Roman Birg <roman@cyngn.com>
Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: Adnan Begovic <adnan@cyngn.com>
Add change to show Invalid card when erroneous card is inserted.

Add change to show "Invalid card" on UI on CARD_IO_ERROR when
erroneous SIM card is inserted

Change-Id: I94c52ff462c999cdb8dbe742fa0bd3f1019ce335
CRs-Fixed: 715101
platform/framework/base: Fix Half Blank screen issue in Wallpaper

Issue: Start Any Full Screen Activity/ VideoView Activity in
       portrait mode, change to landscape mode and then perform
       suspend and resume. Only Half of the screen has display,
       the other half is blank screen

Fix: Added a check to update surface size on both rotation change
     and surface size change.

Change-Id: Iba77dfdb778ea3c60bbb1df33188fd4f792ab77c
CRs-Fixed: 712741
NFC: Add interface for offhost to associate to secure element

Add an interface for payment application to specify secure element, so
multiple secure elements are supported through Tap&Pay menu

Change-Id: If1548e12ccf5b06f032f5725315ad726a88d9002
CRs-Fixed: 744072
Modify isRoaming to getRoaming from Service state tracker.

Modify isRoaming method to getRoaming from Service state tracker
instead of phone object.

CRs-Fixed: 739327

Change-Id: I4ca0f6df65f38a3a0d64fde647fb8506347414c1
IMS-VT: Peer capabilities support

Add support for querying peer capabilities

Change-Id: Ibfc0f2d4864cb743acc0b7f12aa8ef3e7f41c979
AGPS: Support basic AGPS configurations by user.

1. Add the function for user to config SUPL host and port.
2. User can set position mode for AGPS
3. When in roaming status, user can stop AGPS automatically.
4. User can set the start mode for cold, warm, hot. It will
clean the xtra info when starting in cold mode.

The first two features are controlled by resource
assisted_gps_configurable_list. If carrier open it in overlay,
these two functions can work.

Change-Id: I1e524c4cbf9da8a2535758aee79d62eeafa64808
Download: use "control" column to mark paused/resumed status

Before, column "status" is directly updated when user pauses/resumes
download, this causes status shown to user is not same as real status
because pausing/resuming needs a little time not instantly, and then
causes some status error.

The column "control" is updated instead of "status". When user pauses
download, will update "control" as CONTROL_PAUSED and set "status" as
STATUS_PAUSED_BY_APP until pausing operation is finished; and when
user resumes download, will update "control" as CONTROL_RUN and change
the status as STATUS_RUNNING until DownloadThread is started to run.
Then the status shown to user will be same with real download status.

Change-Id: I2204b972d24b809f7914b0981cad11e9175f4ae6
CRs-Fixed: 737182
androidfw: Use the last package to create idmap.

Overlaid packages contain one or two package groups, the first one is system
package(android), and the second one is application package. So it should use
the last package group to create idmap.

When inspecting the idmap, similar as above.

Change-Id: I97e0179bc5b5acdcacbe6ec5b5b7c22af51d1d0b
MSIM: Retrieve the QS Data icon through PhoneId

While updating the quick settings data icon,
use Msim API to get the icon.

Change-Id: I6d106e2d03c92eabb7be92f0cf1957489beca0fe
CRs-Fixed: 743707
Telepony: Update data icon when sim removed(CDMA)

When sim is removed in CDMA and data camped,
data icons should be updated.

CRs-Fixed: 733233

Change-Id: I01ba6d3060af98120966cafdad03a4288cbe3580
IMS-VT: Modification of data usage aidl

Change data usage aidl interface to take parameter type long
instead of int

CRs-Fixed: 747694

Change-Id: I7cda2a689edb86d025dfe8efc8f573918c4bd6bc