OSDN Git Service

android-x86/frameworks-base.git
12 years agoMerge remote branch 'aosp/gingerbread-mr4-release' into gingerbread-x86 gingerbread-x86
Chih-Wei Huang [Sun, 30 Oct 2011 08:33:22 +0000 (16:33 +0800)]
Merge remote branch 'aosp/gingerbread-mr4-release' into gingerbread-x86

12 years agokeep history after reconcile of gingerbread-release
The Android Automerger [Tue, 13 Sep 2011 00:16:34 +0000 (17:16 -0700)]
keep history after reconcile of gingerbread-release

12 years agoone more api missed
android-merger [Sat, 10 Sep 2011 01:35:13 +0000 (18:35 -0700)]
one more api missed

Change-Id: Ibfcb9155974edc96b4c98742d8d89987d3b176b6

12 years agomissed part of https://android-git.corp.google.com/g/#/c/104540/
android-merger [Fri, 9 Sep 2011 23:27:36 +0000 (16:27 -0700)]
missed part of https://android-git.corp.google.com/g/#/c/104540/

Change-Id: I0da6d5bd860b1fe9df76b9df372e4ad9ab6e7202

12 years agomissed aidl change in previous merge
android-merger [Fri, 9 Sep 2011 23:15:00 +0000 (16:15 -0700)]
missed aidl change in previous merge

Change-Id: I6c1c55d0b79d5f2d7be538ec3a51c5708522a08f

12 years agobring nfc-extras up to date (same as gingerbread)
android-merger [Fri, 9 Sep 2011 21:49:13 +0000 (14:49 -0700)]
bring nfc-extras up to date (same as gingerbread)

Change-Id: Ia9cfce0a9919d1903b05fc7eda170a3aa97655ee

12 years agowifi: do not disable interface when network connection lost
Chih-Wei Huang [Fri, 19 Aug 2011 09:16:39 +0000 (17:16 +0800)]
wifi: do not disable interface when network connection lost

12 years agoBatteryService: fix unknown status issue
Chih-Wei Huang [Fri, 19 Aug 2011 09:15:37 +0000 (17:15 +0800)]
BatteryService: fix unknown status issue

12 years agoCompute dirty regions aggressively
Julian_Chu [Thu, 26 May 2011 03:29:23 +0000 (11:29 +0800)]
Compute dirty regions aggressively

The exposed region consists of two components:
    1) What's VISIBLE now and was COVERED before
    2) What's EXPOSED now less that was EXPOSED before

However, the first component should be regarded as dirty
region in above layer.  For efficiency reason we compute
dirty region aggressively.

12 years agosurfaceflinger: Compute dirty region aggressively
Chia-I Wu [Thu, 26 May 2011 03:29:19 +0000 (11:29 +0800)]
surfaceflinger: Compute dirty region aggressively

This is to make software cursor work more smoothly.

12 years agoInputReader: fix mouse movements in portrait mode
Chih-Wei Huang [Wed, 10 Aug 2011 03:37:28 +0000 (11:37 +0800)]
InputReader: fix mouse movements in portrait mode

12 years agoMerge branch 'aosp-fix' into gingerbread-x86
Chih-Wei Huang [Fri, 5 Aug 2011 09:27:51 +0000 (17:27 +0800)]
Merge branch 'aosp-fix' into gingerbread-x86

12 years agosurfaceflinger: fix display issue
Chih-Wei Huang [Fri, 5 Aug 2011 08:31:55 +0000 (16:31 +0800)]
surfaceflinger: fix display issue

12 years agoAdded ethernet patch based on Yi Sun from android-x86.org
Nicu Pavel [Mon, 20 Jun 2011 11:08:41 +0000 (14:08 +0300)]
Added ethernet patch based on Yi Sun from android-x86.org

Changes from android-x86.org:
 - ported to gingerbread
 - fixed issue with static IP not being setup correctly
 - changed statusbarpolicy.java
 - added new ethernet icons from Iulian Luca <iulian@mini-box.com>

Change-Id: I92b2a9f9e464662e207fa88f8d581bb3909e6908

12 years agoadd mouse support
Chih-Wei Huang [Tue, 10 May 2011 02:15:35 +0000 (10:15 +0800)]
add mouse support

Contributed by

* Gregoire Gentil from Always Innovating
* Amit Pundir
* Scott Brady
* James Willcox
* Chih-Wei Huang

Change-Id: I22aecfb4d9e699c7992f67b0b5a0ab987c03a1f2

12 years agosurfaceflinger: notify gralloc about console events
Chia-I Wu [Wed, 20 Apr 2011 09:39:44 +0000 (17:39 +0800)]
surfaceflinger: notify gralloc about console events

12 years agoDisable dithering by default for the sake of performance.
Kan-Ru Chen [Fri, 2 Apr 2010 09:18:16 +0000 (17:18 +0800)]
Disable dithering by default for the sake of performance.

This is a workaround for the performance drop on Eclair. Enabling
dithering prevents the fast path in software renderer implementation
thus the performance drops drastically.

Disabling dithering has small impact on the rendering result, but the
performance boosts a lot.

12 years agores: set default disable softkeyboard to be true
Patrick Ferguson [Mon, 31 Jan 2011 09:18:11 +0000 (17:18 +0800)]
res: set default disable softkeyboard to be true

12 years agochange the default screen timeout to 10 minutes
Chih-Wei Huang [Fri, 28 Jan 2011 10:18:07 +0000 (18:18 +0800)]
change the default screen timeout to 10 minutes

12 years agoskip non Android VT events
Chih-Wei Huang [Mon, 24 Jan 2011 07:58:51 +0000 (15:58 +0800)]
skip non Android VT events

The patch is modified for gingerbread from

http://git.alwaysinnovating.com/cgit.cgi/ai.android/tree/preprocess/froyo/patches/noinput.patch

Change-Id: Ie2b86fa49f2d5b7be78b826d40c14e1ce0586c12

12 years agoadd Eee PC hot keys support for mute, sleep and wifi
Yi Sun [Sun, 23 Jan 2011 17:09:00 +0000 (01:09 +0800)]
add Eee PC hot keys support for mute, sleep and wifi

Change-Id: Iad1c9ec16ec1e153e07b60bc2db48d27ea7bd219

12 years agoadd more keycodes for Android-x86
Chih-Wei Huang [Fri, 21 Jan 2011 10:21:24 +0000 (18:21 +0800)]
add more keycodes for Android-x86

VOLUME_MUTE, SLEEP, WIFI, CTRL_LEFT, CTRL_RIGHT, CAPS_LOCK, MORE_KEY are added.

Change-Id: Icc48c1a13f21fc7792f489e4936a8e86c1bc7b90

12 years agoAdd keycodes F1 - F12
Chih-Wei Huang [Fri, 21 Jan 2011 09:29:21 +0000 (17:29 +0800)]
Add keycodes F1 - F12

With these keycodes we are able to support PC keyboards.

Change-Id: Ia6f6ac93c7bfbe89a0017875d52844676c2b1b33
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
12 years agoBatteryService: update battery status periodically
Stephane Lajeunesse [Mon, 22 Nov 2010 07:07:16 +0000 (15:07 +0800)]
BatteryService: update battery status periodically

12 years agomake audio recorder ok
Wallace Wang [Wed, 20 Jan 2010 09:35:18 +0000 (17:35 +0800)]
make audio recorder ok

12 years agochange the keyword "phone" to "device"
Yi Sun [Wed, 6 Jan 2010 23:30:56 +0000 (15:30 -0800)]
change the keyword "phone" to "device"

12 years agochange the original orientation.
Yi Sun [Sun, 13 Dec 2009 07:12:59 +0000 (23:12 -0800)]
change the original orientation.

12 years agoAdd battery status support for PC and VMs
Yi Sun [Fri, 4 Dec 2009 21:14:49 +0000 (13:14 -0800)]
Add battery status support for PC and VMs

12 years agoadd new wallpaper
Yi Sun [Tue, 17 Nov 2009 19:48:06 +0000 (11:48 -0800)]
add new wallpaper

12 years agoadd an option to enable/disable software keyboard
Kelly2.Blue [Mon, 19 Oct 2009 18:45:22 +0000 (11:45 -0700)]
add an option to enable/disable software keyboard

Change-Id: If407985d26e589c8bc0b31f00c8627bccdefe39b

12 years agoadd reboot item to power button dialog
Yi Sun [Thu, 24 Sep 2009 23:36:41 +0000 (16:36 -0700)]
add reboot item to power button dialog

Change-Id: I6513ed3995c6553c5bffd9c40605f72889cfa344

12 years agofixed a possible crash on WifiStateTracker
Yi Sun [Thu, 6 Aug 2009 01:42:52 +0000 (18:42 -0700)]
fixed a possible crash on WifiStateTracker

12 years agoadd wifi support for x86
Yi Sun [Fri, 24 Jul 2009 23:51:43 +0000 (16:51 -0700)]
add wifi support for x86

12 years agoRemoving dead store; it was likely a relict of debuging code.
Jozef BABJAK [Fri, 29 Apr 2011 11:00:04 +0000 (13:00 +0200)]
Removing dead store; it was likely a relict of debuging code.

Change-Id: I685c6df119212f48f90dd40d01a3638a33ce2800

12 years agoAdjust mBiggerTouchSlopSquare to the suitable value
Masanori Ogino [Fri, 14 Jan 2011 04:24:20 +0000 (13:24 +0900)]
Adjust mBiggerTouchSlopSquare to the suitable value

If the scaling factor is larger than 1.0 (i.e. 1.5),
then mTouchSlopSquare(576) is bigger than mBiggerTouchSlopSquare(400).
The double tap condition should be bigger than a single tap's one.
This causes the fail of the following CTS test cases in the device has
over 240 density.
- android.view.cts.GestureDetectorTest
  * testOnTouchEvent
- android.view.cts.GestureDetector_SimpleOnGestureListenerTest
  * testSimpleOnGestureListener
To fix this issue, I'll add a new public method
ViewConfiguration#getScaledLargeTouchSlop() then the value returned
from that method is used as a slop area of mLargeTouchSlop.

Change-Id: I0e61c13670e1300be1ccf45a89ef89410496fb48

12 years agoScolling using arrow keys with padding
Mattias Petersson [Thu, 7 Apr 2011 13:46:56 +0000 (15:46 +0200)]
Scolling using arrow keys with padding

It was impossible to reach the end of a large test when scrolling down
using the arrowkeys when the ScrollView had padding. A common example
of this would be an AlertDialog with a text that is too long to fit on
the screen.

Change-Id: I55464290a0cdeabde83ccccc76fe8d015ae57a8d

12 years agoCHAR_SEQUENCE_CREATOR cannot handle null string
Martin Wallgren [Thu, 7 Apr 2011 12:45:43 +0000 (14:45 +0200)]
CHAR_SEQUENCE_CREATOR cannot handle null string

TextUtils.writeToParcel can handle null as input CharSequence
but createFromParcel will throw NullPointerException. Transforming
to and from parcel should handle null in the same way.

Change-Id: I707ea9be2091d2655c5f63eaa57c5674befa5ad3

12 years agoFixed to draw texture when loadTexture() is called at first time
Ichitaro Kohara [Fri, 18 Feb 2011 12:15:04 +0000 (13:15 +0100)]
Fixed to draw texture when loadTexture() is called at first time

SW renderer of Stagefright reaches loadTexture() to draw image.
The first time loadTexture() is called, it just initializes OGL
texture, then returns. Thus, the first time call doesn't draw.
This patch fixes to move on to draw stage after the initialization.

Change-Id: I3ec1ad68fb8d376a4ad7aefded1c18a002d175c4

12 years agoFixing wrong Japanese phone formatter.
Keiji Ariyama [Sat, 26 Feb 2011 04:38:55 +0000 (13:38 +0900)]
Fixing wrong Japanese phone formatter.

http://code.google.com/p/android/issues/detail?id=15383

Adding rules that Japanese number start with 050 and 060.

Change-Id: Id324d7ecfb18b348230a3903b356647045700d80

12 years agoFix memory leak of SkMovie class
Kimiyoshi Kusaka [Mon, 28 Mar 2011 02:58:51 +0000 (11:58 +0900)]
Fix memory leak of SkMovie class

Movie class doesn't have finalize method.
So memory leak of SkMovie class of native Skia occurs when Movie class is released.
I add finalize method to Movie class (Movie.java) and jni destructor method to SkMovie class (Movie.cpp).

Change-Id: I4dae9dd95f128cbfade50bef978b219ba99321dd

12 years agoImplement support for ALT and SHIFT modifiers
Johan Redestig [Fri, 25 Feb 2011 15:45:17 +0000 (16:45 +0100)]
Implement support for ALT and SHIFT modifiers

The spec for keymaps and keboard input at
http://source.android.com/porting/keymaps_keyboard_input.html
mentions the stand alone ALT and SHIFT modifiers:

SHIFT: While pressed, the shift key modifier is set
ALT: While pressed, the alt key modifier is set

This commit implements support for these.

Change-Id: I5854ef3df541740cc3443b474a9c41183eb7561c
Ex: key 305   BACK  ALT

12 years agoFix startSearch condition on Dialog, because pressing search key causes ANR popup.
lge-aosp [Tue, 15 Mar 2011 01:25:57 +0000 (10:25 +0900)]
Fix startSearch condition on Dialog, because pressing search key causes ANR popup.
If search key is pressed on Dialog and there is no search item then do nothing.
How to reproduce the issue:
Settings > About phone > Legal information > Google legal > Press search key > Touch list item or press back key > ANR popup is shown

Change-Id: I9c24d83ca3b7c20976bb7daebeff7fd694ce3a2f

12 years agoFixed to call computeVisibleRegions() when transparent value changed
Ichitaro Kohara [Thu, 17 Feb 2011 11:31:23 +0000 (12:31 +0100)]
Fixed to call computeVisibleRegions() when transparent value changed

When some Surfaces are overlapping and one of them changed to
transparent or opaque, the back Surfaces should appear or
disappear. This patch calls SurfaceFlinger::computeVisibleRegions()
to re-calculate region of each Surface to implement the behavior.

Change-Id: Iffb1caf1b4ce28dff252e114fe5b9b07d9c84a6f

12 years agoframeworks/base: acquire lock on am only when needed
Vairavan Srinivasan [Tue, 15 Feb 2011 04:45:59 +0000 (20:45 -0800)]
frameworks/base: acquire lock on am only when needed

appendDropBoxProcessHeaders acquires a lock on am while accessing
ProcessRecord (even if it is null). Watchdog thread ends up invoking
this function (with a null ProcessRecord) to add the stack file to
dropbox. This function would block if and when the watchdog thread is
invoked due to unavailability of lock on am resulting in a deadlock.
This would prevent watchdog from killing system_server.

Change-Id: Ieb34b767779cb587e0c5f536b9b7ba44fb9a28d9

12 years agoAdding a sanity test in the while loop in readHistory()
Per Andersson [Mon, 21 Feb 2011 08:55:42 +0000 (09:55 +0100)]
Adding a sanity test in the while loop in readHistory()

Adding a sanity test in the while loop in readHistory() which
is useful in case the file read (batterystats.bin), is corrupt.
The file can get corrupt (missing end of file marker -1) if
writeHistory fails for some reason. Without this change
readHistory will continue looping untill an OutOfMemory is
thrown.

Change-Id: I3418d258e7cb99aa2f9d934c9449a19806499ce4

12 years agoImproved conversion accuracy of exif geotag data
Oscar Rydhe [Fri, 14 Jan 2011 08:23:48 +0000 (09:23 +0100)]
Improved conversion accuracy of exif geotag data

Changed degrees and minutes of geotag data into double to avoid
data loss during cast.

Also improved error handling if geotag data can't be parsed.

Change-Id: I864843c7fc699fe81e6acba801fe46d10a01925b

12 years agoFixes broken image link in "Tools -> Traceview" documentation page.
Keiji Ariyama [Tue, 1 Feb 2011 13:05:30 +0000 (22:05 +0900)]
Fixes broken image link in "Tools -> Traceview" documentation page.

Change-Id: I0728fdbd91f166d5dd30c23430edc532dc937541

12 years agoAdded null check on return value for getKeyDispatcherState()
Per Andersson [Mon, 17 Jan 2011 10:16:23 +0000 (11:16 +0100)]
Added null check on return value for getKeyDispatcherState()

The result from getKeyDispatcherState() was used without
checking if it returned null, which resulted in a NullPointerException.

Change-Id: I4b55ad44d5c08b7f729dbbdbcaed0e978a430258

12 years agoEliminating dead logic - bitmap state simply cannot be null here.
Jozef BABJAK [Tue, 19 Apr 2011 11:24:37 +0000 (13:24 +0200)]
Eliminating dead logic - bitmap state simply cannot be null here.

Change-Id: I33fdf650b06242efa22ca30b3f7252f6854b42f6

12 years agoRemoving unnecessary computation.
Jozef BABJAK [Tue, 22 Feb 2011 09:24:34 +0000 (10:24 +0100)]
Removing unnecessary computation.

Change-Id: Id201e56fa60baa64204cd204169d119f7b4db3d7

12 years agoUsing robust equality check.
Jozef BABJAK [Thu, 17 Mar 2011 08:54:51 +0000 (09:54 +0100)]
Using robust equality check.

Change-Id: Ie30684c472bfa38d0432f855f7075c34709958d5

12 years agoWe don't need these local references.
Jozef BABJAK [Thu, 17 Mar 2011 08:43:54 +0000 (09:43 +0100)]
We don't need these local references.

Change-Id: I227c88eb4eb5d2842124e1c944cc18d5b28cccc1

12 years agoEliminating dead code with no other effect than consuming battery life.
Jozef BABJAK [Tue, 22 Feb 2011 09:23:06 +0000 (10:23 +0100)]
Eliminating dead code with no other effect than consuming battery life.

Change-Id: I4376902a4e9c301ff16f74137d86eeaff901bbb7

12 years agoRemove duplicate '=' in exception message
Bernhard Reutner-Fischer [Thu, 28 Apr 2011 18:06:44 +0000 (20:06 +0200)]
Remove duplicate '=' in exception message

Remove duplicate '=' in IllegalArgumentException of MyAdapter::getItem()

Change-Id: I151a1432a9f54c8d42bae295f3967b0be2223026

12 years agoAuto hide virtual keyboard
Mattias Petersson [Wed, 13 Apr 2011 13:09:16 +0000 (15:09 +0200)]
Auto hide virtual keyboard

Sometimes the virtual keyboard was not hidden when switching between
applications. An example of this was when launching the browser from
the Google Search widget:
1) Tap the Google Search widget and enter some text, e.g. "google"
2) Select one search items, e.g. "google maps"
3) Browser opens. Press back button.
4) Select an item again, e.g. "google maps" - Keyboard does not
   close.

When switching application, the virtual keyboard needs to find a new
Z position (window index) among the other windows. Normally it is
placed on top of the first window that is visible and can get focus
(canBeImeTarget()).

With a new application being launched, there is
an exception: a special "starting window" is placed on top of the
Activity window while the application is starting up. Since this
window should not get input, we need to look below that window.
When doing this, the previous implementation assumed that the
first window below always was focusable. If it wasn't, the
input method was placed above the "starting window", which
caused confusion that led to the keyboard not being closed
automatically.

In the case of the Browser, it sometimes has a "fake TitleBar"
window that can not get focus and that is placed above the
Activity window.

With this fix, we now keep looking through the windows below
the "starting window" until we find a window that can receive
input.

Change-Id: I1117846eb0f57603e64329bd955e28182f98f226

12 years agoonDetachedFromWindow is called before onAttachedToWindow
Martin Wallgren [Wed, 13 Apr 2011 13:03:35 +0000 (15:03 +0200)]
onDetachedFromWindow is called before onAttachedToWindow

Multiple threads are adding messages about the current
state of the views to the main looper. This can cause
onDetachedFromWindow to be posted on the looper before
onAttachedToWindow. This change will make sure to only
dispatch onDetachedFromWindow if we have previously
dispatched onAttachToWindow.

Change-Id: Ibc7cbcafb098bc000d2ef5480d2110d3fff4d55a

12 years agoRemove errant tag terminator
Shachar Shemesh [Mon, 11 Apr 2011 10:48:35 +0000 (13:48 +0300)]
Remove errant tag terminator

Element android.widget.QuickContactBadge had two closing markers.

Change-Id: I0ab47e2fc999b4cf09fa10a7f5df58090816e315

12 years agoNormalize output of XMLtree content
Shachar Shemesh [Mon, 11 Apr 2011 10:32:19 +0000 (13:32 +0300)]
Normalize output of XMLtree content

Make the output from aapt dump xmltree normalized, so that it is unambigously
displayed regardless of the content of the strings. Previous patch left out
handling of XML element content.

Change-Id: Ib8016996c769f3dde7a87f7ecbdf850333f2426a

12 years agoAdd lock before calling initEglImage
Kobi Cohen Arazi [Fri, 15 Apr 2011 17:38:33 +0000 (10:38 -0700)]
Add lock before calling initEglImage

Without that lock, there is a chance of race condition
where while composing a specific index, requestBuf with
the same index can be executed and touch the
same data that is being used in initEglImage.
(e.g. dirty flag in texture)

12 years agolibutils: Fix an improper const-cast in RefBase
Josh Stone [Fri, 22 Apr 2011 18:13:35 +0000 (11:13 -0700)]
libutils: Fix an improper const-cast in RefBase

Under Fedora 15 Beta, gcc 4.6.0 warns:

  frameworks/base/libs/utils/RefBase.cpp: In member function
    ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
  frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing
    ‘const android::RefBase::weakref_impl’ as ‘this’ argument of
    ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’
    discards qualifiers [-fpermissive]

trackMe is not a const function, so don't use const in the static_cast
to a weakref_impl pointer.

Change-Id: I3c9ba73eb127985f5f54197ffecf2939c50f632c

12 years agoRe-assingning local variable if mStringBlocks was initialized here. NPE is thrown...
Jozef BABJAK [Tue, 19 Apr 2011 10:28:22 +0000 (12:28 +0200)]
Re-assingning local variable if mStringBlocks was initialized here. NPE is thrown otherwise.

Change-Id: Ic8648aa5ae6a61348803171243c1c217feb058ec

12 years agoUnable to push files to Windows 7
Erik Ljungberg [Tue, 22 Mar 2011 06:58:43 +0000 (07:58 +0100)]
Unable to push files to Windows 7

Windows 7 says it can handle the maximum OBEX packet size. However
if the maximum packet size is used the transfer will fail. This
should be fixed by Microsoft but until they do the only way to solve
this is to reduce the maximum packet size for the OBEX client.

Change-Id: I51975eec972395ae3f1f21cca236b223d0812ef3

12 years agoFix data corruption when writing to Bluetooth socket
Mike Playle [Fri, 22 Oct 2010 12:58:17 +0000 (13:58 +0100)]
Fix data corruption when writing to Bluetooth socket

Writes to Bluetooth sockets are handled by writeNative() in
android_bluetooth_BluetoothSocket.cpp. This calls asocket_write()
which is implemented in abort_socket.c.

This latter function sleeps until poll() indicates that the socket is
writeable, then calls write() once, returning the number of bytes
written. However writeNative() just returns this byte count to the
caller; it's eventually ignored in BluetoothOutputStream.java. This
doesn't match the semantics of a Java OutputStream, which is required
to block until all bytes have been written.

This fix adds a loop to writeNative() that repeatedly calls the lower
level write function until all the data has been written (or an error
occurred in which case we should exit the loop early). With this
change it is possible to write large amounts of data to a Bluetooth
socket without experiencing data loss.

Change-Id: I0b464382817e15adec32ba0e3cb37e7d1cccc730

12 years agoAlways return a valid index from Rfc822Tokenizer.findTokenEnd()
Mattias Niklewski [Tue, 18 Jan 2011 13:27:23 +0000 (14:27 +0100)]
Always return a valid index from Rfc822Tokenizer.findTokenEnd()

If an invalid input string ends with a backslash inside a comment
or quoted string, the returned index would be past the end of the
string. In one case this would lead to a runtime exception being
thrown from MultiAutoCompleteTextView.performValidation.

Change-Id: If629372b429716c25cdc25764f088e95d4812d57

12 years agoAvoid crash in system server when mounting container
Fredrik Helmer [Wed, 9 Feb 2011 15:16:10 +0000 (16:16 +0100)]
Avoid crash in system server when mounting container

A race condition when mounting a container in PackageHelper may cause
the system_server to crash (uncaught exception). Calling methods are
prepared to handle null, so return null instead.

Change-Id: I852ee21a2d847e37d81c1b900c27ddf94ef24fcb

12 years agoUpdated JBQ's original SurfaceTexture stubs to make webkit MR1 buildable
Russell Brenner [Fri, 1 Apr 2011 00:32:20 +0000 (17:32 -0700)]
Updated JBQ's original SurfaceTexture stubs to make webkit MR1 buildable

Change-Id: If1c1610efcc0e0bc6de88c75712baed91624b1a7

12 years agoAdded include/private/hwui/DrawGlInfo.h
Russell Brenner [Thu, 31 Mar 2011 20:20:52 +0000 (13:20 -0700)]
Added include/private/hwui/DrawGlInfo.h

Change-Id: If50ccabb8761a994fa1f7aef4fbdb668c6160b0c

12 years agoError in compound cache-control header.
Henrik Baard [Mon, 16 Aug 2010 11:18:10 +0000 (13:18 +0200)]
Error in compound cache-control header.

A cache control header containing both no-cache and max-age attribute does not
behave as expected.

Cache-Control: no-cache, max-age=200000

Will set expired to 20000ms seconds, ignoring the no-cache header. My
interpretation is that the no-cache header should not be ignored in
this case.

Change-Id: Iadd1900e4d2c6c0dacc6bb3e7b944cf78ca9b266

12 years agoHandle OutOfMemoryError when decoding images in ThumbnailUtils
Christer Fletcher [Mon, 21 Mar 2011 14:56:27 +0000 (15:56 +0100)]
Handle OutOfMemoryError when decoding images in ThumbnailUtils

Added handling of OutOfMemoryError handling to createImageThumbnail
method in ThumbnailUtils.java. During mediascanner run it would run
out of memory when trying to decode very large images. Now it handles
this error and returns null which is handled by the media scanner.

Change-Id: Ie68722dfa1cedd3c0847bf483baa40c4827ad5a8

12 years agoUnregister callback from binder when vibration is removed
Mathias Jeppsson [Tue, 28 Sep 2010 12:45:23 +0000 (14:45 +0200)]
Unregister callback from binder when vibration is removed

When creating new vibration pattern, a callback is registered
in case binding to caller goes away, by linkToDeath().
Need to unregister this callback when we throw away the vibration.

Change-Id: Ibdf0bd415a539054ac7a66f49b33a864f729c546

12 years agoMaking it possible to call SIP calls with special allowed chars.
Magnus Strandberg [Tue, 22 Mar 2011 07:03:58 +0000 (08:03 +0100)]
Making it possible to call SIP calls with special allowed chars.

Since String.replaceFirst uses regex and since SIP user names are
allowed to include regex charaters such as '+', the code must
fist convert the string to a literal pattern String before using
replaceFirst method.

Change-Id: I25eac852bd620724ca1c5b2befc023af9dae3c1a

12 years agoFixing the wrong link in YuvImage JavaDoc.
Keiji Ariyama [Fri, 4 Feb 2011 17:37:53 +0000 (02:37 +0900)]
Fixing the wrong link in YuvImage JavaDoc.

Change-Id: Ie6334e16424e59b75274ef265f10d26ba484316a

12 years agoRemoving dead store; it was likely a relict of debuging code.
Jozef BABJAK [Tue, 22 Feb 2011 08:48:18 +0000 (09:48 +0100)]
Removing dead store; it was likely a relict of debuging code.

Change-Id: I4daab1359d7c4b300ef61e3de1578d9fecb6f8da

12 years agoReleasing lock even if exception is thrown.
Jozef BABJAK [Tue, 22 Feb 2011 08:33:19 +0000 (09:33 +0100)]
Releasing lock even if exception is thrown.

However, the whole method needs to be reviewed. It still has several
locking/unlocking places not tied together by try-finally construct,
but they cannot be fixed without deeper understanding.

Change-Id: Iaaf87568d585327654be409377b6d57a1da135eb

12 years agoRemoving self-assignment statement.
Jozef BABJAK [Tue, 22 Feb 2011 07:09:01 +0000 (08:09 +0100)]
Removing self-assignment statement.

Change-Id: I429235093de4539bde3950075fbdaa4ef5bdeedd

12 years agoFixing self-assignment in copying code.
Jozef BABJAK [Tue, 22 Feb 2011 07:06:44 +0000 (08:06 +0100)]
Fixing self-assignment in copying code.

Change-Id: I0799f83dc9d02b9bc31c76e747e6ba1ff58000b0

12 years agoFixing self-assignment in cloning code.
Jozef BABJAK [Tue, 22 Feb 2011 07:05:08 +0000 (08:05 +0100)]
Fixing self-assignment in cloning code.

Change-Id: I6c918c0c7345678cbb171905eccfca50e59ae41a

12 years agoRemoving repetitive conditional; it simply does nothing except slowing down things.
Jozef BABJAK [Tue, 22 Feb 2011 06:57:51 +0000 (07:57 +0100)]
Removing repetitive conditional; it simply does nothing except slowing down things.

Change-Id: I53a176cebae0051a33647317e2f269ebf149f7d2

12 years agoRemoving repetitive conditional; it simply does nothing except slowing down things.
Jozef BABJAK [Tue, 22 Feb 2011 06:55:23 +0000 (07:55 +0100)]
Removing repetitive conditional; it simply does nothing except slowing down things.

Change-Id: Ibe76c1ed49bdf66eb57702e5f89363a5132d9617

12 years agoFixing improper boxing to Integer instead of Long.
Jozef BABJAK [Mon, 21 Feb 2011 14:55:01 +0000 (15:55 +0100)]
Fixing improper boxing to Integer instead of Long.

This is tricky: entry.getMessageBox() returns int, so it is
by default boxed to Integer. Map.get() however accepts Objects,
so it ignores the difference, but nothing is find during lookup,
just because Long and Integer objects are compared using equals(),
which has to lead to 'false' result. So, explicit boxning to Long
is unnecessary here.

Change-Id: I967a7829a8926410a00274c6b5e312e1af567299

12 years agoUsing proper key for removing object from the map.
Jozef BABJAK [Mon, 21 Feb 2011 14:44:06 +0000 (15:44 +0100)]
Using proper key for removing object from the map.

Stored value was used for map removal instead of key. The error was
silently ignore, because remove() method accepts Object type argument
and siletly does nothing when no value identified by such key is
found. Now proper key is used for removal. i.e. the same as for lookup.

Change-Id: I3a61fc219385cd0e7bcd4a33cd6ca23be220efe3

12 years agoUsing proper key for removing from map.
Jozef BABJAK [Mon, 21 Feb 2011 14:33:59 +0000 (15:33 +0100)]
Using proper key for removing from map.

Window object was improperly used as a key for removing record from
map. This was silenly ignored, because remove() method accepts Object.
However, the ID should be used there which is type of String, i.e.
the same ID which was used for lookup.

Change-Id: I81fc2f90926a34414bf9042ddf4a2edff4c1fda1

12 years agoRemoving wrong equals method in comparator.
Jozef BABJAK [Mon, 21 Feb 2011 14:19:00 +0000 (15:19 +0100)]
Removing wrong equals method in comparator.

This implementation of equals method has been likely created by
template in an IDE. It is useless, possibly leading to poor performance
and completely violating the contract of equals method as defined in
Object base class.

Change-Id: I5e7fd759b7bd9370b44d9374b57390c4e9feba02

12 years agoRemove unnecessary SkImageDecoder_libjpeg.cpp
Chih-Wei Huang [Thu, 10 Mar 2011 09:49:03 +0000 (17:49 +0800)]
Remove unnecessary SkImageDecoder_libjpeg.cpp

Adding files outside $(LOCAL_PATH) is a bad idea. It generates output files
to an unexpected directory. In this case, it's

out/target/external/skia/src/images/SkImageDecoder_libjpeg.o

It's not in $(PRODUCT_OUT), which is not correct.
Worse, it makes the build system be unable to build different
architectures (arm and x86) simultaneously, since the output files
conflcit.

Seems we can just remove SkImageDecoder_libjpeg.cpp since it's
already in libskia.

Change-Id: I3e7533126ef60fe2fd424fdc777760e73c93489b

12 years agoFix leak when keylock is recreated.
Kenneth Andersson [Thu, 10 Feb 2011 12:47:29 +0000 (13:47 +0100)]
Fix leak when keylock is recreated.

DigitalClock could sometimes leak when the keylock was recreated.
This happened because onDetachedFromWindow() was called BEFORE
onAttachedFromWindow().
This is the flow that causes the memory leak:
1) The LockPatternKeyGuardView is created and added. This will start
a loop dispatching onAttachedToWindow() to all views involved.
2) PatternUnlockScreen.onAttachedToWindow() is called
3) If the configuration has changed since creation, recreateMe() in
LockPatternKeyguardView.java is called.
4) recreateScreens() is called
5) PatternUnlockScreen is removed (to be re-added later) in
LockPatternKeyguardView.recreateUnlockScreen()
6) Since DigitalClock is a part of PatternUnlockScreen, its
onDetachedFromWindow() will be called.
7) The loop started in 1) will continue to dispatch
onAttachedToWindow() - and will eventually call
DigitalClock.onAttachedToWindow()
8) DigitalClock.onAttachedToWindow() registers a receiver that is
normally unregistered in onDetachedFromWindow(). But since
onDetachedFromWindow was already called in 6), it will not be called
again.
9) The receiver has leaked, and it has a reference to DigitalClock,
so that will leak as well, together with its parents e.g.
PatternUnlockScreen and LockPatternKeyguardView

The fix is to wait with the recreation of the screens (in 4) until
the loop (in 1) is finished. This is done by posting this as an event
instead of calling recreateScreens() immediately.

It is possible that this a fix for the root cause mentioned in
"Fix 3106227: use WeakReferences for receivers in DigitalClock class"
8b886fab5496b0b1f5193f21855220176deddc37 by Jim Miller
<jaggies@google.com>.

Change-Id: I6a5f6f49a565d459bf4e285f34f053cc1022286f

12 years agoPhone crash when old callback func is woken up when enabling BT.
Staffan Lindvall [Wed, 27 Oct 2010 08:34:53 +0000 (10:34 +0200)]
Phone crash when old callback func is woken up when enabling BT.

When the remote Jerry device is powered down the BT link to the
phone is dropped, and the Jerry firmware in the phone quite
immediately tries to re-connect to the Jerry device. Then
SDP and Discover Services is started, fetchRemoteUuids() ->
discoverServicesNative(). This results in an asynchronous dbus
call dbus_func_args_async()  that is provided with a callback
function, onDiscoverServicesResult(), but before this callback
function is used Bluetooth is disabled according to the problem
scenario above. For some reason this discover services activity
is not cleared when Bluetooth is disabled, so when Bluetooth
is enabled again the (old) callback function
onDiscoverServicesResult() is executed, but the following
getAddressFromObjectPath() fails. The reason for this is that
the deviceObjectPath parameter contains an old value,
containg the process id of the old bluetoothd (the one running
before Bluetooth was disabled). Then the new updated
AdapterObjectPath /org/bluez/<new bluetooth hd pid>/hci0/dev_
is not a prefix of the old deviceObjectPath /org/bluez/<old
bluetooth hd pid>/hci0/dev_<BT_ADDR>, which results in that null
will be used as address in sendUuidIntent(), and later on,
ending up in the BluetoothDevice constructor where and
IllegalArgumentExceotion is thrown due to
Bluetooth address = null. Then the phone will crash.

Making sure sendUuidIntent() is not called when address is null
is a work-around for the problem.

Change-Id: I8ff60bad80de3b379cef0970402943dfa4de3cfd

12 years agoFix of tearDown() in SingleLaunchActivityTestCase.
Mikael Andreen [Wed, 1 Dec 2010 11:49:08 +0000 (12:49 +0100)]
Fix of tearDown() in SingleLaunchActivityTestCase.

Before a suite of SingleLaunchActivityTestCase tests are run,
an activity is started. The activity is supposed to close
when all the tests in the suite have run. The activity is
however finished one test too early. This causes problems
for the last test.

Change-Id: Ie9fb2df350a70f827495a0dc30952e30fbe491e0

12 years agoAdd --non-constant-id to aapt.
Xavier Ducrohet [Tue, 15 Feb 2011 00:58:00 +0000 (16:58 -0800)]
Add --non-constant-id to aapt.

This option enbables creating resource constant in the R class
that are not actual constant, but simply static fields.

The goal is to build library projects with these types of
IDs so that the constant does not get inlined in the library
code, since the ID for the library resources only are not
the final values.

The final resource IDs, generated from the main project and
its library(ies), will have proper constant with the final
values.

This allows us to generate binary library bundle (a jar file
and associated resources) that can be distributed. Additionally,
this will let us make the library project support in Eclipse
much more robust and a better user experience overall.

Change-Id: Ibe2f08d68493fde658fc3f7606abf7446f312ad2

12 years agoGpsLocationProvider: Clean up HAL initialization/cleanup sequence
Mike Lockwood [Wed, 23 Feb 2011 16:21:00 +0000 (08:21 -0800)]
GpsLocationProvider: Clean up HAL initialization/cleanup sequence

Change-Id: Id5467000f3f3da5cbe1f112dad97a032688d2eac
Signed-off-by: Mike Lockwood <lockwood@android.com>
12 years agoEnsuring thread-safe usage of DateFormat.
Jozef BABJAK [Tue, 22 Feb 2011 08:17:51 +0000 (09:17 +0100)]
Ensuring thread-safe usage of DateFormat.

DateFormat is inherently unsafe for multithreaded use. This patch adds
proper synchronization. The 'sLock' is re-used. To avoid two consecutive
lockings, locked version of initFormatStrings() method is created and
used where appropriate, i.e. in original method AND in added synchronized
block.

Change-Id: Id3c34613623e743e703aadb2342aa788679dda8a

12 years agoFix for an infinite loop while scrolling lists.
Daniel Mladenovic [Mon, 21 Feb 2011 08:17:40 +0000 (09:17 +0100)]
Fix for an infinite loop while scrolling lists.

When scrolling in a list it's possible to get stuck in a
loop where the screen is continuously redrawn. This happens
when you are at the end of a list and try to scroll further.
The problem is that you enter a switch statement with the
mState variable set to STATE_PULL_DECAY. This will trigger
code in the switch statement that does some adjustments and
calculations, but it does not change the value of mState to
STATE_IDLE or STATE_RECEDE after it's done. Hence it will
continue to return to the same place and not stop updating
since the update() method signals for completion only when
the mState variable is set to STATE_IDLE.

The fix is changing the value of mState after the
adjustments and calculations have been made.

Change-Id: I57bc84ec12d43ca87a1163d94cb5b206a376a24e

12 years agoFixing infinite loop for zero duration.
Jozef BABJAK [Tue, 22 Feb 2011 06:20:30 +0000 (07:20 +0100)]
Fixing infinite loop for zero duration.

Change-Id: I837478c1598f1d2f99bf773597f0d66d0fc3cf1a

12 years agoFix for #12945: ProgressBar.setMax() will always redraw.
Michael Krehan [Fri, 18 Feb 2011 04:04:27 +0000 (20:04 -0800)]
Fix for #12945: ProgressBar.setMax() will always redraw.

Fix for issue #12945: Changing the maximum of a progress bar does
not cause it to be redrawn, even though a new maximum changes the
position of the current progress in relation to its maximum. With this fix,
setMax() will always cause refreshProgress() to be called if the maximum is
different than it was before.

Change-Id: I971ec3302953bcadc0aac3dd8241481bab2b5a91

12 years agostubs
Steve Block [Fri, 11 Feb 2011 00:04:48 +0000 (16:04 -0800)]
stubs

Change-Id: I6bc0b8e9d4412a0b60c6226fbd2b7a6d15aceb22

12 years agoFix a race condition in NativeDaemonConnector
anga [Tue, 1 Feb 2011 13:10:25 +0000 (14:10 +0100)]
Fix a race condition in NativeDaemonConnector

Fixes a race between the onDaemonConnected callback and setting the
mOutputStream in NativeDaemonConnector.

MountService connects to vold using the NativeDaemonConnector.
Throws a “NativeDaemonConnectorException: No output stream!”
when the onDaemonConnected callback in MountService calls the doListCommand.

Change-Id: Ib895bab37f7df680e4362df6366198c0a673c5e9

12 years agoFixing possible race condition.
Jozef BABJAK [Thu, 20 Jan 2011 07:09:25 +0000 (08:09 +0100)]
Fixing possible race condition.

That return statement is effectively a reading of asynchronously modified
field. The reading and writing is elsewhere protected by locking on thread
instance, except this one occurence. Moving 'return' statement into
synchronized block ensures that it reads updated value.

Don't be afraid of deadlock - wait() releases the lock and acquires it
back when notified.

Change-Id: I940c24c04a1a2d4508d14d11b6174ff4fb2ab7d5

12 years agoJPtextinput: Dont break emoji characters when cutting strings.
Ishibashi Takako [Thu, 4 Nov 2010 07:43:33 +0000 (08:43 +0100)]
JPtextinput: Dont break emoji characters when cutting strings.

In the LengthFilter make sure that we do not cut the
string so a last emoji character gets broken and replaced
by some garbage character.

We need to check if the last char is the high surrogate and
if so drop the high surrogate also.

Change-Id: I210e7e41aa0761ecbb2b32e3ebf680a04382c287

12 years agoInitialize resampling buffer per track.
Yuuhi Yamaguchi [Fri, 4 Feb 2011 14:24:34 +0000 (15:24 +0100)]
Initialize resampling buffer per track.

When resampling too short sound, AudioMixer uses previous
tracks buffer. So we re-initialize the temporary buffer per
loop to avoid it.

Change-Id: I55a59a3b14faa8445e09c450478fe79cef704760

12 years agoDon't crash zygote if webcore fails to load
Jean-Baptiste Queru [Mon, 31 Jan 2011 23:43:19 +0000 (15:43 -0800)]
Don't crash zygote if webcore fails to load

Change-Id: I88271fb62c0cc7c6d768009a713f20d9dfbfb5eb

12 years agostubs
Jean-Baptiste Queru [Sat, 29 Jan 2011 14:19:37 +0000 (06:19 -0800)]
stubs

Change-Id: I829039f3817a172e66eeb9df397e896a488a259d