Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event

See b.android.com/55873

Change-Id: I92c549e1a595662d4df8fa0e47675ccb2b8814fd
Frameworks native: Add new configuration qualifier for UI change on the fly (2/3)

last night I got an idea after 5 weeks of breaking stuff and
doing to much complicated things. Together with mnazim we tried
today to realize this idea. So another absolut new unique SlimBean
feature is born.

The aim we wanted at the end was to give a simple and resource friendly
way to change the complete UI of a rom on the fly. So why not use
the great fallback mechanism of AOSP and change/add a new
qualifier into the AOSP core. To explain how it works.....if you want
to add a new UI just add in /res folder of any app or framework you want
folders with the qualifier "inverted". Eg. drawable-inverted-xhdpi
or values-inverted or layout-port-inverted or whatever you want. Put in
only the files you want to modify thats it.

All qualifier in AOSP are following strict rules. You can read here.
Do not forget the order of qualifier is important. The new "inverted"
qualifier we added to the UIMode qualifier. To get more information
about read here

http://developer.android.com/guide/topics/resources/providing-resources.html

So what this commit does:
- add new qualifier "inverted"
- support for API level 13 and higher
- change the custom UI on the fly
- control default UI Mode over config.xml
- working for all apps. They just need to include folders
  with the new qualifier name
- resource friendly....no resource wasting either programmticaly
  then source blow, because you just need to put in the files you
  want to change
- cause of the qualifier structure compatible with every phone,
  language or whatever qualifier you want to use on top
- 100% compatible to theme manager. If a theme misses drawables
  they are replaced with them from the current UIMode which is set.

What is the benefit why not use just a theme? We started half year
ago TRDS which was inverted gapps system base themed....means we
morphed directly the changes into the framework. This methoed was
on of the reasons why trds got so popular. Points for that are easy
first the system is themed, means each theme you activate over
theme engine works on top the themed system. So you have a base
style and can modify more if you want. The other reason is easy
a lot faster and resource friendly. Now this idea went to the
rom to provide two core system based themes and user
can do on top what they want or not without, like you have
to roms in one.

This commit just adds the support for this

cheers

mnazim and kufikugel

Change-Id: I8d6637f81f3a3263ebc43f67e824cfda910df9db
Frameworks_native: TRDS new qualifier push up qualifier number (2/2)

Hey guys,

after this feature is working really well and a lot roms kanged
it we got a hint to change one thing which is indeed a good
idea to have less problems on AOSP updates and tools like
Apktool can provide us better without doing major changes every
AOSP update.

We pushed the number up to 69.....should be enough for
next years.

Please note for the one who are using our gapps at the moment
this will break actuall gapps till we published the new one
which will be end this week as usual.

After that we will begin to publish the apktool after we had
now enough tests....and who knows maybe the "official" Apktool
will provide us all now. So all in all a good time to change
the qualifier now before it is getting more and more
popular (we saw that first themes are providing us)

cheers

Lars

Change-Id: I8253a8a2302032aac8f4b2ea3ca835a1ecf231a5
Frameworks_native: TRDS 2.0 (2/3)

After testing with huge success we discovered here
and there small problems (like NFC beam animation is broken,
TRDS was disabled on cardock etc) which mainly was caused
due that we used the already from AOSP introduced uiModes
qualifier which could cause in special conditions this
conflicts. Beside that we want a bit more flexibility.
Result: This commit introduces the inverted qualifier as
complete own qualifier undependent of the already AOSP
used ones.

Beside that it fixes all known issues......features:

- it is now completly working over the AOSP Configuration classes
  Means every app get notice of a change trough onConfiguratioChange
  and restarts it's activity if change was detected.
- app can disable that like some other configuration values
  over AndroidMainfest.xml
- beside "inverted" folder another "notinverted" folder is introduced
  for another themeing (eg white)
- qualifier order is direct before the official uiMode qualifiers
  (see AOSP docs)
- All usual Configuration actions can be used with the inverted
  qualifiers....like BroadcastChange, direct read out from every
  app etc. etc. Note: Only system can change the uiInvertedMode

So as you see a real own qualifier now

NOTE: Apktool as well aapt need to be changed to fit the "new
qualifier"....which means that we need to recompile our gapps
that they react as well on this new behaviour. Think we will get them ready
next 2 or 3 days.

Change-Id: Ic538219fe86bb7a1f92c3eb9f44057cb249dcbe6
Merge pull request #15 from CyanogenMod/cm-10.2

Cm 10.2
hax: Split the exynos4/tegra legacy code paths

They hang up at different places, and require different fixes.
Tested on t3 and e4

Change-Id: I46257a7e9e6b6e093a5cb92eaaaef4bdd0435a12
Squashed commit of installd changes

commit 28d7796cef6dfb1c892b736fc89c5bd9d919ff29
Author: rpcraig <rpcraig@tycho.ncsc.mil>
Date:   Wed Nov 28 09:23:18 2012 -0500

    Proper security labeling of multi-user data directories.

    This patch covers 2 cases. When an app is installed
    and the resulting data directory is created for all
    existing users. And when a new user is created and
    all existing app data directories are created for
    the new user.

    Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>

    Change-Id: I01f2a9084dfe7886087b1497070b0d7f2ad8478e

    Conflicts:
        cmds/installd/commands.c
        services/java/com/android/server/pm/Installer.java
        services/java/com/android/server/pm/PackageManagerService.java
        services/java/com/android/server/pm/Settings.java

commit 91dfb0045a0026b185fa66c5c95289335bd2d543
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Sun Dec 25 17:37:53 2011 +0700

    installd: Delete cache properly for devices using datadata partition

    The java side already checks /data/data for free space but installd
    still checks /data causing it to never reap the cache (because it
    thinks that enough free space is available.)

    Change-Id: I736af6ff7ea0c8ae07900168f6b8ac2f7a4dbe0b

commit 777c17568851e1dc8b02213b2a77a3d7b456fc7d
Author: ctso <ctsoyars@gmail.com>
Date:   Thu Jun 24 02:03:47 2010 +0000

    DexOpt anything on /system in /cache/dalvik-cache

    Change-Id: Id41d37047f2fcb90d513ac091dfcb85492473689

    Allow property to disable dexopt on /cache

    Change-Id: Ic74707c4bead387bbf82e4c6d5037efc2d2ebeaf

Change-Id: Ic74707c4bead387bbf82e4c6d5037efc2d2ebeaf
Surface: Fix gralloc flags conflicting values.

Due to some custom code, unwanted flags (HW) got added with SW flags.
Restrict the flags to custom ones.

Change-Id: I2ab1c75eef4d6d16f0dd7d43aff3c7377486801a
sf: virtual display clean up

  Since HAL allows Virtual devices, remove virtual display id
  check during setup of virtual display.

Change-Id: I6ec93c0f06842b69e6677f05ae8b45fb1f4225f6
libgui: Fix building with QCOM_BSP + CAF display

Change-Id: Iaf0eb69fa7f409144a266ada683fceb835f62aff
fix a possible deadlock when removing a layer and destroying a client

generally the last reference to a Layer is released in commitTransaction()
with mStateLock held. Layer itself only holds weak references to Client,
however, ~Layer() briefly promotes this weak reference -- during that time
the all other strong references to that Client go away, ~Layer is left with
the last one... then hell breaks loose as ~Client is called, which in turn
needs to acquire mStateLock.

We fix this by holding a temporary copy of the drawing state during
the transaction so that the side-effects of copying the current
state into the drawing state are seen only after mStateLock has
been released.

Bug: 9106453
Change-Id: Ic5348ac12283500ead87286a37565e8da35f1db2
fix a dead-lock in sensorservice

sensorservice would deadlock if for some reason
a sensor failed to enable.

simplifed the code a bit, and made it behave a little
closer to mr1.1 -- I couldn't convince myself that
some changes in how locks were used were correct.

Bug: 9794362
Change-Id: I6110f5dbb67e543f1c71d127de2299232badb36a

Conflicts:
	services/sensorservice/SensorService.cpp
[toroplus] Add missing method called by ril which breaks radio

Credit to Randall Rushing for debug and solution

Change-Id: Ib32126737d17ad715841ee0bcadc0859bdb1b62b
Add correct XHDPI heap size
Conflicts:
	build/phone-xhdpi-1024-dalvik-heap.mk
Merge 'cm/cm-10.2' into jb3
For Merge tag 'android-4.3_r2.2' into jb3
Don't use fence sync for qcom legacy

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: Ifecc7af579bfde9d0a7daaaf528ea0773ce6ceb2
surfaceflinger: enable EGL_NEEDS_FNW for qcom legacy

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: Ia6df94e8380062d646e29f293e5dc768e8a138e7
SurfaceFlinger: Dont show Animation on External Display

- With this change the animation effect will not be shown on
  external display.
- It will change from portrait to landscape in one shot.
- Primary would still continue the animation effect
- set property sys.disable_ext_animation to disable animation

Change-Id: Ibd94bf166f08eeab1d504afe69230f7c6a617eb6
CRs-fixed: 453747
surfaceflinger: don't handle EVENT_ORIENTATION when !HWC_DEVICE_API_VERSION_1_0

a184463 causes segfault on boot for the enrc2b (and probably others), this fixes it.

Change-Id: Ic4a7a05b44c8cc44a0d25c56def4acdf5b0939df
Revert "[toroplus] Add missing method called by ril which breaks radio"

This reverts commit db4b27d3681f31dccd6e85cd90b00891d77f6028.