gps: fixed singleshot session that doesn't stop

When a single shot location is requested and a
location is returned, the location request is
not stopped and so it continues even when the
requestor has stopped listening. This can cause
gps tracking to continue in the backgroud and eat
up battery.

This is fixed by stoping the provider if there
are no more update record associated with it
when a location is returned.

Change-Id: Ie437732ff06231a46724843af30e21ca3a1694ab
Adding operations to reflected Renderscript class

Renderscript expose its native types back to the Android
system through a set of classes defined within the renderscript
package. These classes provides no easy mean to manipulate
data they represent. It would be convinient to be able to manipulate
the data stored within an allocation via these classes directly
instead of having to marshall them into native Java objects.

This commit adds such operations to the existing exposed vector types.

Change-Id: I1845df1368a82f0d39b36416c83938c7160f6a3f
Expose more renderscript native type

Currently, Renderscript only expose a subset of its
datatype within the Android system. For instance, the unsigned
versions of the vector types for bytes, int, long and short are
not defined. In addition, while the signed scalar types for
renderscript have an elementary type equivalent, there is no such
equivalence for unsigned values.

This commit defines these missing classes and defines operations
for these types.

Change-Id: I45353a3b3f304051c072472284e7aefac60d127d
Extend Rs Math library to unsigned types

The RsMath library was created to support mathematical
operations defined upon reflected data type into Java.
Additional reflected types have been introduced but the
math library has not been updated at that time.

This commit extends the math library with new operations
defined for the new reflected types.

Change-Id: I8025976b449f96dcaea90648a8114ee6d5b98e1c
CompoundButton: Let text can be changed by config

Because CompoundButton freezes text inside onSaveInstanceState, the text
can't be changed automatically after locale of device changed.
Bug from such a case reported via url below:
https://code.google.com/p/android/issues/detail?id=24013

It would be better to don't freeze text for default case and let users
to freeze text if they need manually.

Change-Id: I2d6a192b6ff05a95b21487c2362cbc14691c68cf
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Change the way to calculate the native heap size

Previously the native heap size returned by android.os.Debug's
getNativeHeapSize() is mallinfo.usmblks, which is the maximum
total allocated space. But this value is greater than current
total if trimming has occurred. In the output of 'dumpsys meminfo',
as a result, the native heap size dose not equal to the sum of
the allocated native heap size and the free native heap size.

I think this is misleading because actual and current footprint
of the native heap is usually smaller than the max footprint,
a peak number of bytes allocated to the heap.

This commit makes the native heap size returned by
getNativeHeapSize() to be the current footprint, which is the sum
of the allocated and free native heap size.

Change-Id: Ie5eec4ac43b82c8f8d7dcf9c6d7785fd9b4526eb
Signed-off-by: Kyungmin Lee <snailee@gmail.com>
UsbDebuggingManager: Fix possible multiple NPEs toggling USB debugging

This patch fixes two NPEs when toggling fast USB debugging many times.

Change-Id: I7ac039fe51a32d35ef00eaa71accb85cd57d4d8a
Signed-off-by: atl4ntis <atl4ntis@gmail.com>
Fixed some spell error on developer docs

Fixed small spell errors on the developer documentation.

Change-Id: I17aa11bfcbdd5ebd18c69c9a55a4f20abbe81c93
AbsListView: Fix setItemChecked to check for redundant calls

Fix setItemChecked to invoke onItemCheckedStateChanged and
request layout only when a position's checked state changes.

Change-Id: Ib16ec46b157cd6e0e222a2d533b7c353900e6a6d
LightsService: Turn light off after pulse

Turn the light off after a pulse instead of resetting the light
to the pulse color and leaving the light solid on.

Change-Id: I711e8f01c72cc1dd1c80908c74c17ad55d80c57e
Fixed grammar in the comment that introduces the Debug.MemoryInfo class.

Change-Id: Ic021e689b7a8c55367277875b321358535c04e6a
Signed-off-by: justinmuller <justin.muller@acm.org>
webkit-viewcore: Fix not being able to reselect text.

Fixes not being able to select the same text after it has been deselected.
It fixes crash introduced in old (later reverted) patch.

Revert "Revert "Can not mark the same content of browser page after copy""

This reverts commit d45312587878b1496c7586956aac317bd6d053bf.

PS3: Fixed indentation.

Change-Id: Ia3cad7c2948f529f9e58c8571312158212049e6d
frameworks/base: Fix SystemUI crash on Recent Apps list

Issue: SystemUI crash is observed when Context MenuItem "App info"
       is selected on the recent apps activity
       1. Open the rencet apps list
       2. Long press on any one/more recent app(s)
       3. Lock the screen using power key
       4. Unlock the screen using power key
       5. select menu item "App info"
       6. SystemUI process will get crashed.

Fix: Changed the code to make sure that only one context
     menu is active at a time and also dismissed the
     context menu on pause of the RecentsActivity

Change-Id: Ia50bed7bfad6fde7beeaec37fa6402177eee1d40
fix null pointer exception in enqueuing

Change-Id: I6f9b104d06fc18b8465117436279a8e34d1622c2
Fixes a typo.

Change-Id: Iadc7fca539b6d0807981b6b7a14d5a3e49731dab
ExpandableListConnector: Use children count only for expanded groups

Change-Id: Ib737070ac27d7e2fa18d2f940017f872454a6b05
remove unnecessary switchUser call

If userId doesn't change, no need to do switchuser.or it will
introduce some tweak for some poor gps modules in quick off/on.

Change-Id: Ie5e408dc8be69c8a63a18bcb2cfe478cef4d70e6
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
Comment out stubbed attr javadoc

Two attrs in the SizeAdaptiveLayout.checkLayoutParams are simply stubs
and do not document actual attrs.  This causes a warning to be spit out
on every build.

Change-Id: I5420dc34ea6434f6ff538471c0061b42e3929a93
Fixes ViewLocationHolder.compareTo(), guarantees transitive property across comparisons.

Change-Id: I375837241edb6b9b8ccb7a167731398f3af5a2b2