framework: fix 'port IME selector notification toggle'

Change-Id: I7801cc9edc2341c447e2c3eafd9344216eb6c0c6
Port: Wake on plug (1/2)

Change-Id: I5e50a7fd351857d76c1c2fd13c6e737d8902a2f3
Recents: Port "Development shortcut" (2/2)

This patch includes the equivalent of our Development Shortcuts in
CM11 recents. Recents is very different now and this is mostly a rewrite.

The semantics changed a bit as well. The current code already has special
developer behavior when long-pressing the app icon and that is also where
the developer shortcuts are hooked. If the app icon is long-pressed and
developer shortcuts are active, a menu will be shown with the several available
options.

Fixes CML-61

Change-Id: I391a360b3dd88e179c2315503d18125f8d0b3792
SystemServer: Move sensor init to a new thread.

Move Sensor init to a separate thread so that it doesn't block the
critical booting path.

Initializing Sensors in separate thread has been seen to improve boot
time on customer devices with low-tier / ult chipsets(less cpu cores)

Change-Id: I5c46a5805c04ffe551019b4683523e3bf70274a2
Framework/base: Relocating GC calls at the end of loop during zygote init

Relocating explicit GC calls at the end of the loop during the preloading
the resources and preloading clases, with this changes boottime improved.

Change-Id: I2e05ef68578eddca8cd435b5186e198ee7d71739
Disable config item to support SIM refresh for dual mode card

Set "config_sim_refresh_for_dual_mode_card" to false;
Resetting this config as majority of the targets don't
need it to be set.

Change-Id: I955fead91e4939172a478fba2b79ae11fecda82b
CRs-Fixed: 665741
Telephony: Add a config item to control fetching APN from OMH card

Change-Id: I5c14a6870ea0767cc14ff3addeeb0828cc704a32
CRs-Fixed: 748148
CamcorderProfile: Add 4k DCI timelapse encoder constant

 4k encoder constant during timelapse is added
 for the 4k timelapse use case.

CRs-Fixed: 642013
Change-Id: I901fa362242477dad84130d23055815cdfee6167
security: prevent FDE after PFE

Full-Disk-Encryption (FDE) is not allowed
after Per-File-Encryption (PFE) is activated.

Change-Id: I17e6039f3b33450835fea6ee5e612c079868b71f
QuickBoot: enable poweroff charging under QuickBoot mode

Support poweroff charging by enable/disable qbcharger process under
QuickBoot mode.

Change-Id: I34ee10443564ba3f9ebc7239137958c80e8db6c9
AppOps: Add null pointer check for USERAGENT parameter.

Fix the Java exception which is caused by null pointer issue in
AndroidHttpClient.

Change-Id: If7e36298f94ca164b87e1b0604f49156bdfd4513
Start MountService before performBootDexOpt

This change is to start Mountservice before starting
performBootDexOpt, as in one case, in performBootDexOpt
when system upgrade happens, StorageManager will be started to
get the low threshold of DataDir. But, at this point, as
Mountservice is still not up, StorageManager will end up
having a null object of Mountservice.

Change-Id: I6dec474266faa5de67449c1bbe6ef30791e5ecaa
frameworks/base: No score update to 100 with wqe

When user explicitly selects an AP, the score of this AP will be
set to 100 and this has conflict with wqe. Disable this when wqe
is enabled

Change-Id: I57db8318a4421038d144bc41bd0ff5ae02d9edd3
AlarmMangerService: Fix the delay of ACTION_TIME_CHANGED for time-services

After boot completed, if low memory condition happens or some ordered
broadcasts have time out, it will cause delay for some receivers to
receive ordered broadcasts. Adding FLAG_RECEIVER_FOREGROUND into
time changed action will make TimeServiceBroadcastReceiver receive
ACTION_TIME_CHANGED in time.

CRs-Fixed: 630982
Change-Id: Id789d0b3c969af6b92f62612602ba119613382ab
Override updateBlockedUids method

Override updateBlockedUids method in BridgePowermanager

Change-Id: I8533e55a41bf7a1b69a46277798735bf314d2ef3
Avoid overwriting SYSTEM_ADJ with PERSISTENT_PROC_ADJ

If an application running on system_process has a persistent flag,
the oom_adj value for system_process is unexpectedly overwritten
to PERSISTENT_PROC_ADJ (-12).

We must keep SYSTEM_ADJ (-16) for system_process.
This change guards against overwriting SYSTEM_ADJ with
PERSISTENT_PROC_ADJ

Change-Id: I8f334d93b82271f9a0cfbbef34a75af2dacb186b
Add handling SQLiteDatabaseCorruptException.

When SQLiteDatabaseCorruptException occurred on execute() or executeForString(),
DefaultDatabaseErrorHandler.onCorrupt() is not to be called.
So, Malformed DB file can't be deleted.
Because, Instead SQLiteDatabaseCorruptException, code is throwing SQLiteException.
On boot time, system can't open DB file and it throws RuntimeException.
This causes infinite reset.
So, I modified to throw SQLiteDatabaseCorruptException.

Change-Id: I125b69d62acc4c0690b8dd17d4e14b49be141095
Signed-off-by: muzbit.kim <muzbit.kim@lge.com>
Add window to child window list with correct order

The original logic of comparing with mBaseLayer of two child windows
of the same parent was wrong, because the mBaseLayer is always the
same.

After adding two child windows with the same positive sublayer, the
one added later should have greater z-order. The order should be
consistent with WindowManagerService.addAttachedWindowToListLocked()

Change-Id: I789179aee61d141fad86bd24262fabfb1e517e66
Enable stencil clipping within clearLayerRegions

Previously stencil clipping within clearLayerRegions is disabled by commit
62d307c2402777d5e53b4590af5f32f8c55afd81. However, clearing whole layer
regions causes black-colored triangle regions when a TextView has
RotateAnimation because the draw within clearLayerRegions does not
affected by the current stencil clip.

Change-Id: Id32a0b16754b109905f833e063ebfa156bd953f2
Signed-off-by: Dohyun Lee <dohyun.lee@lge.com>
SystemUI: improve brightness slider behavior

Mimic the brightness slider behavior in the statusbar.
This adds logic to make the statusbar slider also work with automatic
brightness mode enabled and it will instead adjust the temporary automatic
brightness overrride.

Change-Id: I78814a785decc83df94844fcc2f489c8cbec2b65
Signed-off-by: Roman Birg <roman@cyngn.com>