[test]base: compile lib hwui for performance by default

Change-Id: Ieb6405b9902cd8400e0f8fc7f923ffb3ecc74820
Tunning max allowed background services

The serialize running of background services feature
delay some services startup when system bootup, and
lead some abnormal behaivor at the early of system startup.
Tunning will be disabled after system complete bootup.

Change-Id: I834607d9156253bee13848586a8136e24760fdf4
AndroidRuntime: reduce logcat debug spam

this ought to prevent log messages similar to:
D/AndroidRuntime(12391):
D/AndroidRuntime(12391): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime(12391): CheckJNI is OFF

Change-Id: Ie6948daf552d138c97ade941bedb8714f03145a3
Always call super.onCreate().  Always.

Bug 12991134

(cherrypick of commit 9d6376a1d88ab5b3a41ee4400e3aaa4c4ee69e2a)

Change-Id: Ife16ef93408253e3318a06dc0206ab4b88c7f367
Don't register methods when there's nothing to register.

Change-Id: I6d0233f79bb90089426d702b4076ec5750e82475
Wifi: Adjustments for sleep policy

   The wifi sleep policy "When screen turns off" will switch
off wifi although the USB tethering is active.With this
patch, the sleep policy is removed when the usb tethering is
active.The WifiService maintains a local status variable in
according with the wifi tethering (on,off).If the usb tethering
is on, the alarm, to switch off the wifi, is cancelled.If the
device in unplugged after turning off the display while still
not connected, it's better to directly turn off wifi in order to
reduce power consumption.So when unplugged while screen is
already off, request to go in idle (and so turns off wifi) if
wifi is not connected.
   When USB tethering is enabled, don't care about sleep policy:
- first because DUT is powered by USB
- secondly because DUT is used as wifi card and so used by PC

Signed-off-by: Paul Naoumenko <paulx.naoumenko@intel.com>
Signed-off-by: Cedric IZOARD<cedricx.izoard@intel.com>
Signed-off-by: chenxi2x <xiaolongx.chen@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Change-Id: Ic1af2367a2f73965c32d300450ee76cf5593af78
Add Environment call: get config dir for some user

This returns a read-only directory accessible to any app running as the
same user, containing various configuration files written by the system.

Change-Id: I635de184fc285b8fef166b782bbc1ac79f8f0687
Add support for NETWORK_TYPE_GSM

Add support for NETWORK_TYPE_GSM in TelephonyManager and
corresponding mapping in ServicState.java so that when
application queries for getVoiceNetworkType() and currently
camped rat is GSM, they get network mode as GSM instead
of network mode unknown.

Change-Id: Ibe4672b04a5044710d63499c4cf2b6ebe91444bf
Add missing character combinations for international layouts

Czech: add missing capslock for numbers and shift+ralt
mappings.
Slovak: fix wrong ralt mappings, add missing ralt mappings
and fixed wrong PLUS key character.
US intl: add missing capslock+ralt support.
Swiss French and Swiss German: add missing ralt mapping for key
numbers 4 and 5, and add missing capslock and capslock+
shift for SEMICOLON and APOSTROPHE.

Change-Id: I02c94bf13d5268d5d1e648c96b7251cb7564f233
Signed-off-by: Olivier Gay <ogay@logitech.com>
Signed-off-by: Manuel Carthoblaz <mcarthob@logitech.com>
Signed-off-by: Mathieu Meisser <mmeisser@logitech.com>
Fix the API compatibility of "UriMatcher#addURI"

The previous patch (ef23bf19 Allow leading slash in path...) made
a single slash path unmatchable.
To solve it, this patch stops removing a slash character if the path
only has a slash character.
Now, a single slash is a matchable path for a URI without path string.

Change-Id: I90b357aa48be1a3e0cf36e75ed2a9d6532908972
Freeing frame map

FileMap memory is never released until application exit

Release it now as the texture is already loaded and the memory
used for the packed resource can be released.

Change-Id: Id08a1e466337b3a0179684eb6a444e18147ee343
Use Runtime.gc instead of System.gc for DDMS.

System.gc doesn't always do a GC unless to attempt to run the
finalizers after you call System.gc.

Bug: 14325353
Change-Id: Iebed7fad5576d610cea13a86e7d3d46652c67478
Cast CallVoidMethod's size_t parameters to jint

offset and size variables are passed to set method
of MediaCodec.BufferInfo java class. The corresponding
actual parameters of set method are of int type in java.

These variables are expected to fit in jint as they
indicate the offset and size of data in a media codec
buffer.

The variables are cast to jint, prior to passing to
java method, to avoid problems caused by automatic
type promotion of parameters when passed to a
variadic function, CallVoidMethod.

Change-Id: I39e202306f1b7122448c947f6d275f00251bb33a
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>