frameworks/base: Disable H/w GL rendering based on property

"ro.nohardwaregfx" can be set to true to have software
rendering.The property could be set for each board by adding
the 2 lines to device.mk file.

PRODUCT_PROPERTY_OVERRIDES += \
            ro.nohardwaregfx=true

Based on ICS patch from Vishal Bhoj <Vishal.Bhoj@linaro.org>

Change-Id: I547258ee021034102fe8d8e7cc0cdfa8a63df298
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks: Report 100% battery level

On devices without battery,the level is
reported as 0 which causes certain apps
which check battery level before executing
to fail.

The patch ensures that such apps work on devices
without battery driver.

Change-Id: I13b056ff52455f27de52ad1e459aa3d8c44b43a0
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
frameworks/base: Fix various aliasing violations

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
frameworks/base:(Hack)Print the content of textview

This hack allows us to print content of Textview
when ro.debug.textview is set . This allows us
to capture the contents of textview which will help
us capture benchmark results for thirdparty apps
which use TextView to display results.

Change-Id: I3500cc35b37c08d93e24ccaf12dcce359fc84da2
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
frameworks/base: Fix aliasing violations

Fix violations of strict aliasing rules

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Fix error when cpufreq is loaded at runtime

Change-Id: I4691bbfbb1a49b130ba4b9a0ed5ded3601e220fc
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks/base: Fix build in ISO C++11 mode

Fix various incompatibilities with ISO C++11:
- Assumption that char16_t is defined to uint16_t
- constexpr usage
- macro constructs that could be interpreted as string literals
- enum typesafety

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
frameworks/base:(Hack)Print the content displayed with WebView

This hack allows us to print content that displayed with
the loadDataWithBaseURL method of WebViewClassic.java
when ro.debug.loadDataWithBaseURL is set to true.
This allows us to capture the contents of WebView which will help
us capture benchmark results for thirdparty apps
which use loadDataWithBaseURL of WebViewClassic to display results.

Change-Id: Id8e61e072b867501ef2e0e8eb2f6fb30b13206b4
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
frameworks/base:(Hack)Print the content displayed with Canvas.drawText

This hack allows us to print content that displayed with the drawText
method of Canvas.java when ro.debug.drawtext is set to true.

This allows us to capture the contents on the screeen
which will help us capture benchmark results for thirdparty apps
which use drawText of Canvas to display results.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
base: Fix build after Parcel ABI fix in Binder

Adapt code to the fact that writeString16's first parameter
is now an uint16_t* to match the old ABI

Change-Id: I138af645c877f343f0490152b9702698b7d36582
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks/base: Fix compile errors

Fix ISO C++11 incompatibility in TextLayoutCache and
aliasing violation in FontRenderer

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
frameworks/base: Bring back Ethernet Connection Manager

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
load non opengles wallpapers for platforms without hardware graphics

Platforms without a hardware graphics, frequently get
"Unfortunately, System UI Crashed" pop-up message on boot-up, which
is due to an Android Runtime Exception
"java.lang.RuntimeException: eglConfig not initialized" when SystemUI
fail to load OpenGLES wallpapers.

This patch make sure that Android runtime checks for GPU availability
(by checking a build time property "ro.nohardwaregfx") before loading
opengles wallpapers.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
ProcessStats: Handle changes in the scaling frequnency

Switching from MP to IKS mode results increase in number of operating points
and results in bug #1183781 . The patch makes sure that whenever the available
scaling frequency changes it resets the existing values and sets them as per the
new values.

Change-Id: Ic74cdc2015f3c4ddd61cb116d1f4b4ed1204a3bf
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
frameworks/base: Fix build in ISO C++11 mode

Change-Id: I5d3ba44cc9faa5826a5a0a6b37c8f0eb2872e1ac
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Revert "frameworks/base: Bring back Ethernet Connection Manager"

ECM implementation is currently broken on 4.3

This reverts commit 54cd610a7b6c5b104316aec6fdf46b6f6eaeee79.

Change-Id: I23110ec8cd3fdf5bbc4026c3a7c98f5c9c5b5a93
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Revert "frameworks/base:(Hack)Print the content displayed with Canvas.drawText"

This reverts commit acd950f8afadf5d8136f0b27c9d65dba6abce2d0.

android.util.Log usage seem to have changed in 4.3
This patch need to be redone.

Change-Id: Ib15b5becf04639f53a6ca48d2119adbb1ff4984c
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
hwui: Fix build in ISO C++11 mode

Make sure log calls can't be confused with C++11 string literals

Change-Id: I1d458e92e690f6f2b922a05494db8c01da54e460
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
CaptivePortalTracker.java: add Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT

Add the Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT for
ConnectivityManager.ACTION_CAPTIVE_PORTAL_TEST_COMPLETED) action, so
that we will not have the "FATAL EXCEPTION IN SYSTEM PROCESS:
CaptivePortalTracker" error which will cause many services died

Change-Id: I028c51384ee5bb93db6a0b904a4dfe974bf20fa5
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
interrupter: Use LOCAL_LDLIBS rather than LOCAL_LDFLAGS

Change-Id: Ide7d3e7962d8dda6f41ca8ba89acf75fa1c86e40
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>