OSDN Git Service

android-x86/frameworks-base.git
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

12 years agoNormalize output from aapt d
Shachar Shemesh [Mon, 20 Dec 2010 15:38:33 +0000 (17:38 +0200)]
Normalize output from aapt d

Make the output from aapt dump --values resources and aapt dump xmltree normalized, so that it is unambigously displayed
regardless of the content of the strings.

Change-Id: Ia3bff36c4ee1e9a44f474534e154830948beabdf

12 years agoMake AaptGroupEntry::getMncName accept mnc00
Johan Redestig [Tue, 9 Nov 2010 13:13:31 +0000 (14:13 +0100)]
Make AaptGroupEntry::getMncName accept mnc00

MNC 00 is a valid network code and is used by
some operators, see http://en.wikipedia.org/wiki/Mobile_Network_Code.

Remove the test that checks if atoi returns zero.
The string is validated to contain only numbers
already.

Also discussed here:
https://code.google.com/p/android/issues/detail?id=3657

Change-Id: I3220d7980abe4067c9e7aa4cbc10b5fd0b8c9ea7

12 years agoDelete browerplugin tests - do not merge
Jean-Baptiste Queru [Thu, 27 Jan 2011 21:36:31 +0000 (13:36 -0800)]
Delete browerplugin tests - do not merge

Those don't build in all environments.

Change-Id: Ibeb8ac653f2961131d106864cc417c5ec58f2b36

12 years agoandroid.os.Message: respect sPoolSize
Brad Fitzpatrick [Tue, 25 Jan 2011 22:48:21 +0000 (14:48 -0800)]
android.os.Message: respect sPoolSize

Also rename some static members from mFoo to sFoo.

Bug: http://code.google.com/p/android/issues/detail?id=13866
Change-Id: I5c5075eb6f529d1534c7aa72b6881873cd08676a

12 years agoAvoid using String.format in MediaRecorder
Henrik Backlund [Mon, 24 Jan 2011 16:55:46 +0000 (17:55 +0100)]
Avoid using String.format in MediaRecorder

String.format was used instead of a simple string concatenation.
This is a problem when language is set to Arabic since simple
integers will be converted into Arabic numbers.

Change-Id: I2cbd4c5cd2d09117202e6ae191845fd5fc9154ec

12 years agoaapt: Allow raw "%" in unformatted string-arrays
Josh Stone [Tue, 18 Jan 2011 02:34:11 +0000 (18:34 -0800)]
aapt: Allow raw "%" in unformatted string-arrays

Commit 15fe2cb added format checking for translatable strings, enforcing
the use of positional args.  This check can be disabled on <string>
values with translatable="false" or formatted="false".  But they didn't
check for those attributes on <string-array>, so some of CM's strings
fail when they're not really format strings, just because they contain
percent signs.  (e.g. brightness widget's "Auto/Dim/40%/100%")

So now the formatted/translatable attributes are checked in string-array
too, and we can restore our proper percent signs.

Change-Id: I3478ab7e0b939e61fe0cec20201ac55096264080

12 years agoFix getSwitchState.
Jeff Brown [Thu, 20 Jan 2011 04:35:47 +0000 (20:35 -0800)]
Fix getSwitchState.

InputReader::getSwitchState always returns AKEY_STATE_UNKNOWN
because SwitchInputMapper::getSources() returns 0 which cannot
match any source mask including AINPUT_SOURCE_ANY.  As a result
initial lid switch detection is broken.

This change adds a new source constant AINPUT_SOURCE_SWITCH
that indicates that the source has switches.

Change-Id: I5321ecf0ce84f1c2b4535f6c163d3f4dcf9b7a9b

12 years agoframeworks/base: Track owner in appropriate owners list of Uri
Vairavan Srinivasan [Sat, 22 Jan 2011 02:26:06 +0000 (18:26 -0800)]
frameworks/base: Track owner in appropriate owners list of Uri

The owner isn't kept track it URI's writeOwners when
grantUriPermissionUncheckedLocked is invoked to provide both
read and write access to the URI. Fix is to check for both
read and write permissions and add owner to appropriate lists.

Change-Id: Id23688b96aefeb0a4911ee52ad47124bc5904fa0

12 years agoFixes Keyboard availability in "Providing Resources" documentation page.
Keiji Ariyama [Fri, 21 Jan 2011 16:58:25 +0000 (01:58 +0900)]
Fixes Keyboard availability in "Providing Resources" documentation page.

Added keyshidden value.

Change-Id: I9fb1a06971488f446ccafdfa3b0db17786b33f97

12 years agoFixing memory leak in PreferenceScreen.
Mathias Jeppsson [Tue, 18 Jan 2011 13:34:52 +0000 (14:34 +0100)]
Fixing memory leak in PreferenceScreen.

Every time the PreferenceScreen is displayed a new ListView is
created and bound to the adapter. As the same adapter is used during
the lifetime of PreferenceScreen and the listviews never gets
unbound, the adapter will contain a list of unused views. The old view
should be unbound from adapter when we create a new view.

Change-Id: I13e2d0dc79c8ff79b58efa650653e3f84c6e53c5

12 years agoframeworks/base: remove redundant code in WindowManager
Vairavan Srinivasan [Tue, 18 Jan 2011 20:20:16 +0000 (12:20 -0800)]
frameworks/base: remove redundant code in WindowManager

Change-Id: I8a356ca36129645977d33129e0d56c1b89f97fb0

12 years agoDon't drop the drawable cache completely on configuration change
Christopher Lais [Thu, 13 Jan 2011 21:02:05 +0000 (15:02 -0600)]
Don't drop the drawable cache completely on configuration change

There was a lot of fancy code just above the clear to ensure
that drawables that aren't affected by the change are kept,
then the entire array was cleared.  This patch removes the
clear, so that the drawables that haven't changed are really
kept, matching the logs, comments and larger part of the code.

This patch also fixes the various constant states to return
correct ChangingConfigurations.

Change-Id: Ic11f6179537318d3de16dc58286989eb62a07f15
Old-Change-Id: I22495e6ed232dfe056207ce5155405af1fa82428

12 years agoFix for crash when setting live wallpaper.
Mattias Petersson [Wed, 12 Jan 2011 14:38:55 +0000 (15:38 +0100)]
Fix for crash when setting live wallpaper.

This fix prevents a crash that sometimes happens when setting a
live wallpaper. It happened when pressing "Set wallpaper" button
in the live wallpaper preview activity, before the preview was
fully loaded.

The crash happened in native code while updating the wallpaper
surface when calling mInputChannel.registerInputChannel(),
because the previous call to
mSession.add(mWindow, mLayout, View.VISIBLE, mContentInsets,
             mInputChannel)
had failed. The fix aborts the surface update when it is not
possible to add the window.

Change-Id: I0e79a851e5c7f7b15eb07043c63d1f4d78f14616

12 years agoClosing cursor in finalizer to avoid GREF and fd leak in acore
Johannes Carlsson [Mon, 20 Dec 2010 15:14:52 +0000 (16:14 +0100)]
Closing cursor in finalizer to avoid GREF and fd leak in acore

The finalize() call did not clean up completely, this eventually
caused the android.process.acore to crash since it ran out of fds
and GREF to increased above 2000 if an application forgot to close
its cursor objects. A warning was also added when this happens so
that application developers can correct their mistake. The
included test case tries to verify that the finalizer works as
expected by creating a bunch of Cursor objects without closing
them (without this fix the acore process crashes after about 400
iterations and the test case ends with "Process crashed").

Change-Id: I11e485cef1ac02e718b2742108aa88793666c31d

12 years agoTypo in Javadoc
Christian Mehlmauer [Sat, 8 Jan 2011 17:22:20 +0000 (18:22 +0100)]
Typo in Javadoc

Change-Id: I911ce02cab178f64aab222e4abcd25d113d75ec5

12 years agoaccording to rfc2617, nc-value = 8LHEX
Bin Jin [Sat, 25 Dec 2010 09:53:30 +0000 (17:53 +0800)]
according to rfc2617, nc-value = 8LHEX

Change-Id: I8646fd8d68cfa4786ee6fc24a757b2af93955c4b

12 years agoFix for writing empty strings to Parcel::writeString8()
Pravat Dalbehera [Wed, 15 Dec 2010 07:40:00 +0000 (08:40 +0100)]
Fix for writing empty strings to Parcel::writeString8()

If writeString8 is called with the following sequence:

 writeString8(String8(""));
 writeString8(String8("TempString"));

Then in the readString8, the 2nd String i.e. "TempString" is not read,
instead an empty string is read.

The bug comes because of the write call for String8("") where there are
no String bytes present. In the write Statement, an extra ‘\0’ is
written. During the Marshalling, Following bytes are written:

1        2         3        4       5   ...
0x0      0x0       0xB      ‘T’     ‘e’  ...

The readString8 function has a check that, if String length is 0, don’t
read anything. So the first byte is read as the length for the first
string. The second byte i.e. ‘\0’ is read as the length for the second
string and hence the second string becomes empty too.

Change-Id: Id7acc0c80ae16e77be4331f1ddf69ea87e758420

12 years agoThe phone is crashing when unknown mime content is transferred.
Ola Olsson [Mon, 20 Dec 2010 15:45:35 +0000 (16:45 +0100)]
The phone is crashing when unknown mime content is transferred.

The content resolver does not take care of the IllegalStateException
that is thrown in getType and that needs to be fixed.

Change-Id: I3e66f1aa259ab91fb9233e1ba07faa1ab6c3f2dd

12 years agoframeworks/base: Fix to release references to previous live wallpaper
Vairavan Srinivasan [Thu, 23 Dec 2010 22:05:44 +0000 (14:05 -0800)]
frameworks/base: Fix to release references to previous live wallpaper

The service connection to the previous live wallpaper is unbound when
a new wallpaper is effective. Although the service connection is
unbound it is not disconnected and its reference to wallpaper's
service and engine is still effective. This adds up to the total
JNI references and causes dalvik (hosting system_server) to abort.
Fix is to release the references in clearWallpaperComponentLocked.

Change-Id: Idd2bab83a56d2e6c6dd7ab9be08d5e14887aa384

12 years agoSupport for KSC5601 on SIM.
Erik Zivkovic [Wed, 16 Jun 2010 09:00:29 +0000 (11:00 +0200)]
Support for KSC5601 on SIM.

Korean phones write to the ADN record of the SIM in a non-standard way.
When UCS2 is not used, the alphaTag will be written in the KSC5601
encoding. This contribution adds support for reading that format when
a Korean SIM card is used.

Also adds support for KSC5601 in SMS.

Change-Id: I81a4a6949359b4d23a937ac2d813bafed2b85ff6

12 years agoFix for phone app crash in Icc Card.
Uma Maheswari Ramalingam [Fri, 22 Oct 2010 17:07:41 +0000 (10:07 -0700)]
Fix for phone app crash in Icc Card.

- Check for active phone in ICC handler before processing messages.

- Boundary check for gsm/cdma subscription app index
while retrieving the ICC Card App.

Change-Id: I3d54447e8d48e3482763e78eeb2a737a34cec321

12 years agoframeworks/base/telephony: Release wakelock on RIL request send error
Anshul Jain [Mon, 22 Nov 2010 19:28:36 +0000 (11:28 -0800)]
frameworks/base/telephony: Release wakelock on RIL request send error

Android telephony does not release the partial wakelock right away if
there is an error in sending the RIL request. The wake lock is released
only after EVENT_WAKE_LOCK_TIMEOUT occurs that prevents the phone to go
in power collpase. The change is to release the wake lock as soon as the
error in send is detected.

Also, change RIL#send not not send a request if there is no connection to
vendor RIL, as the request will always fail.

Change-Id: Ia39a4b9ac12f4064e301a65abfd26409d49babe1

12 years agoTelephony: Add support to read 3GPP2 sms from CSIM/RUIM
Rekha Kumar [Tue, 12 Oct 2010 20:26:20 +0000 (13:26 -0700)]
Telephony: Add support to read 3GPP2 sms from CSIM/RUIM

Add parser to parse 3GPP2 format sms stored in CSIM/RUIM card

Change-Id: I4720ba7602fcc1b078de0d5fea34247541242c1c

12 years agoChanging connect and response timeout.
Henrik Baard [Thu, 18 Nov 2010 13:08:36 +0000 (14:08 +0100)]
Changing connect and response timeout.

In bad network conditions and where switches often occur between 2G and
3G the timeout of 20s is too short.

Setting this timeout to 60 seconds will improve functionality in bad conditions
while it will not affect functionality in good networks. This change also aligns
the timeouts with the timeouts used by the Browser (Connection.java).

Change-Id: I0fbe3cbfe734f8d55a41bfa5d8ab6b332a19f912

12 years agoNumberPicker: Set formatter local value to US.
Chen Libao [Mon, 6 Dec 2010 09:32:53 +0000 (10:32 +0100)]
NumberPicker: Set formatter local value to US.

As the Arabic language formatter would make number "1,2,3" to Arabic
language word means one,two,three, NumberPicker won't like to show
any thing other than numbers, add local settings to US, make the
number 1,2,3

Change-Id: If2d161ac4133f6c9c6e1ec284d6d2fbf01855fa0

12 years agoFix crash by "adb shell pm list permissions -f|-s"
Ali Utku Selen [Tue, 30 Nov 2010 09:37:10 +0000 (10:37 +0100)]
Fix crash by "adb shell pm list permissions -f|-s"

pm command makes the assumption that every permission should
contain android:description and android:label attributes while
they are not mandatory. If a permission does not contain these
two attributes, we get "android.content.res.
Resources$NotFoundException: String resource ID #0x0"
followed by a NPE when using -f or -s options.

With the following change, users will get "null" in output for
respective fields.

Change-Id: I4e7f407592fa071abdab1d979775f46ec27dc9d2

12 years agoframeworks/base: Destroy the overlay even if there is an error
Naomi Luis [Thu, 18 Nov 2010 20:48:25 +0000 (12:48 -0800)]
frameworks/base: Destroy the overlay even if there is an error

Allow the overlay object to be destroyed whenever the destroy is
invoked. Currently the destroy call returns if there is an error
encountered, which results in open data and control channels.

Change-Id: I1f2ef4ebb5fb1dcabf05ab50b5bbf6e5e240a63a

12 years agoSearchDialog: Fix for NullpointerException while using Suggestions in
Deepika Sai Amuri [Mon, 22 Nov 2010 09:26:55 +0000 (01:26 -0800)]
SearchDialog: Fix for NullpointerException while using Suggestions in
Browser

Change-Id: Ic208ae51e4f7678363ea6d7de9db97707713bf6d

12 years agoAdded noop unregisterReceiver to complement existing noop registerReceiver.
Jonas Schwertfeger [Thu, 30 Sep 2010 12:04:09 +0000 (14:04 +0200)]
Added noop unregisterReceiver to complement existing noop registerReceiver.

Without this addition, code that is being tested using an isolated context
can cause an exception if it unregisters a previously registered broadcast
receiver.  This is because the isolated context never actually registered
the receiver in the first place.  The fix is to make sure the isolated
context is consistent in ignoring both recevier registration and
unregistration calls.

Change-Id: Ie0ba6f4bb10f5248704327a0ffc8e37ee8b71ae2

12 years agoImprove performance when getting styled string.
Peter Eliasson [Thu, 18 Nov 2010 01:43:30 +0000 (02:43 +0100)]
Improve performance when getting styled string.

The style used in the composing text for input methods
takes a long time to create. This is experienced as a
lag when composing the first word.

The bottleneck lies in the 10 calls to
nativeIndexOfString which does a linear search through
thousands of strings.

Change-Id: I3184b2be3673d384cca19e9a70ad94b4d3085576

12 years agoRelease reference when putting RILRequest back into the pool.
Johannes Carlsson [Wed, 27 Oct 2010 06:28:14 +0000 (08:28 +0200)]
Release reference when putting RILRequest back into the pool.

In order to reduce object creation the RILRequest objects are
stored in an array when it is unused (max 4). This avoids GC
of the object. The object in turn has references to other
objects which sometimes hold large memory chunks. This fix
releases these references since they are not used anyway.

This will make it possible to GC the Message (mResult) which
in some cases holds references to a Bitmap which sometimes
leads to OutOfMemoryException. The reference is cleared
anyway in RILRequest.obtain(...)

Change-Id: I3b895bc39b5e2f3ab7cc8297c3583ea78e0ebc77

12 years agoPrevent system crash when OOM in Binder thread.
Mattias Petersson [Fri, 5 Nov 2010 07:25:38 +0000 (08:25 +0100)]
Prevent system crash when OOM in Binder thread.

When handling large images during an update of a widget,
we can run out of memory in the Binder thread. This will
cause an OutOfMemoryError to be thrown. When an Error is
thrown in the Binder thread, the entire system will crash.
This was fixed by catching this OutOfMemoryError and instead
throw a RuntimeException to keep the system alive.

Change-Id: If27199676c6f8aef23fb249be1197ca5dfe0fe99

12 years agoFramebuffer: Support variable number of framebuffers in the UI
Rodrigo Obregon [Wed, 3 Nov 2010 20:16:18 +0000 (15:16 -0500)]
Framebuffer: Support variable number of framebuffers in the UI

This change defines a macro NUM_FRAME_BUFFERS to set
the desired number of framebuffers to be used by the UI,
instead of hard-coding 2 framebuffers.

Aditional logic has been  added to handle the initialization
and destruction of NUM_FRAME_BUFFERS buffers.

Change-Id: I3a4bfec3e0f453432f2ffebf084c00f574d3be46
Signed-off-by: Rodrigo Obregon <robregon@ti.com>
12 years agoReorder lock acquision vs try.
Daniel Trebbien [Sun, 31 Oct 2010 20:45:02 +0000 (13:45 -0700)]
Reorder lock acquision vs try.

In two places involving locking, reordered the code so that the lock
acquisition is performed outside of the `try` block and everything
else that needs to run while the lock is locked *within* the `try`
block.

Change-Id: I3dad2c4bbf60b219fc6db2aa35e2ed296cb39128

12 years agoDropBox: Read until the end of stream has been reached
Christian Lindeberg [Tue, 16 Nov 2010 08:57:54 +0000 (09:57 +0100)]
DropBox: Read until the end of stream has been reached

Read the requested length or until the end of the input stream
has actually been reached.

Change-Id: I01bc0b81eca0225209bdd288dde6a778a19d1e2c

12 years agoAdding pan behavior on preference dialog.
Peter Eliasson [Fri, 27 Aug 2010 11:07:47 +0000 (13:07 +0200)]
Adding pan behavior on preference dialog.

Changed the preference dialog with text input to pan if
the display area is limited. This helps the user to see
the input better.

Change-Id: I12341546f6f82601ac5a2746153255a9b2d49a1c

12 years agoWithout SD card the shutdown sequence was delayed
Johan Alfven [Tue, 9 Nov 2010 09:32:25 +0000 (10:32 +0100)]
Without SD card the shutdown sequence was delayed

If the memory card is not inserted (or removed) from
the phone the shut down process is very long. It
takes almost 24 seconds. For the phone with memory
card the averige is 5-6 seconds

Make sure to send onShutDownComplete even if an SD
card is not mounted and no unmount is done.

Change-Id: I0e79b82e294a971f5e7144cdd3cc16b7ff414b9c

12 years agoSupport changing style parent in overlays
Martin Nordholts [Wed, 2 Jun 2010 13:42:28 +0000 (15:42 +0200)]
Support changing style parent in overlays

Package overlays makes it possible for vendors to tweak the look of
the platform and the applications without touching any platform or
application code directly. This makes package overlays an important
mechanism in the Android build system.

There is currently a limitation that forbids changing the parent of a
style. If vendors could change the parent of e.g. ‘CalendarTheme’
from Android’s vanilla ‘Theme’ to ‘VendorTheme’, then vendor
specific adjustments could be done without changing any code directly.

From looking at the code it can be seen that the parent value of a
style is stored temporarily in ResourceTable::Entry::mParent while
overlays are gone through in buildResources(), and processed (in
ResourceTable::Entry::assignResourceIds()) at first after all overlays
have been handled, so there aren’t any obvious reasons why changing
parent in an overlay should be forbidden.

Change-Id: I5969bb8aab90df437e1967fc504cc0da79107d13

12 years agoFix the animation disappeared issue
Chih-Wei Huang [Wed, 3 Nov 2010 07:33:00 +0000 (15:33 +0800)]
Fix the animation disappeared issue

The animation movie disappears due to the incorrect logic of
commit c11f46259a1e8f4e7e58925aefd1ed9eaf57a7fc.

Change-Id: I9c0eac2bf2950fe20e931da367036ddf38d81f52

12 years agoNotificationManager: droiddoc documentation improvements
Peter Collingbourne [Wed, 13 Oct 2010 19:04:52 +0000 (20:04 +0100)]
NotificationManager: droiddoc documentation improvements

Specifically, corrects and improves the overview and the documentation
for the NotificationManager.notify(String, int, Notification) method
to reflect the fact that the pair (tag, id) is used for notification
matching.

Change-Id: Ic088a56f457285523d90d296853685393b8c3412

12 years agoDocument per-implementation behaviors of native get* methods
Daniel Trebbien [Sun, 31 Oct 2010 19:21:05 +0000 (12:21 -0700)]
Document per-implementation behaviors of native get* methods

Change-Id: I5d20d7796b85ce62750dd50dd79e47d76716b24c

12 years agoClarify documentation of Cursor get* methods.
Daniel Trebbien [Sun, 31 Oct 2010 19:19:07 +0000 (12:19 -0700)]
Clarify documentation of Cursor get* methods.

Make clear in the Javadoc comments of the `Cursor` get* methods that
implementations thereof can have implementation-defined behavior. In some cases,
these changes actually correct the documentation. For example, in the case of
`getShort` and the `SQLiteCursor` implementation thereof, non-numeric data is
*not* converted to a `short` via Short#valueOf or even in a functionally-
equivalent manner.

Change-Id: Ib2f81811a603680b52fc482eb9c0f3195447566f

12 years agoTabWidget orientation
Roger Olsson [Tue, 26 Oct 2010 12:41:01 +0000 (14:41 +0200)]
TabWidget orientation

TabWidget orientation specified in tab_content.xml instead of TabWidget.java.
Generally, the orientation of the TabWidget should be set in xml-files
and not in TabWidget.java. A sub class of TabActivity may call setContentView()
using a custom layout where the TabWidget orientation is vertical.
This is the case in the UI Enablers Bottom Tab feature, for landscape
display orientation.

Change-Id: Ia677441a0af96a8d2ab47ef3298eb440c34924f6

12 years agoBluetooth OBEX timeout problem.
Anders Petersson [Wed, 27 Oct 2010 06:38:30 +0000 (08:38 +0200)]
Bluetooth OBEX timeout problem.

Long time to show notification of file transfer failed after
canceling transfer via remote part.

Device A is in contact with our device, B. When device A Cancel
a transfer operation, it sends OBEX_OPCODE_DISCONNECT HeaderID
and the length of package to B. B use the length of package to
read remainder bytes from A. If the bytes B read do not meet the
received length it will block and wait for remainder bytes from A.
But when B compute the remainder bytes it forgets to subtract
the three bytes it has already read through HeaderID and the length
of the package. So the operation was blocked until the operation
timeout.

Change-Id: I0f8bf62d3119e081b5c01af9fc05fe586fd4fabc

12 years agoFixes Issue 7907 in the public bugs database (http://code.google.com/p/android/issues...
Daniel Trebbien [Sun, 31 Oct 2010 14:42:35 +0000 (07:42 -0700)]
Fixes Issue 7907 in the public bugs database (code.google.com/p/android/issues/detail?id=7907).

The Javadoc comment for class `android.content.UriMatcher` had four issues:
1. The example calls to `addURI` should not be using a leading forward slash in
   the path parameter (reported by Ester Ytterbrink).
2. The sample code to construct a `UriMatcher` was incorrect because the
   `UriMatcher` constructor takes a parameter (reported by Ross Light).
3. The code example for using `match` was incorrect because it showed two
   parameters being passed, when `match` only takes one (reported by
   Ross Light).
4. The sample `getType` implementations were incorrect because `getType` takes
   a `Uri` object, not an array of `String`s.

Change-Id: I560bff6f021c13cabf736f40ff0f47a205074291

12 years agofix typo
Uwe Voelker [Sun, 31 Oct 2010 09:08:04 +0000 (10:08 +0100)]
fix typo

Change-Id: Ib36aabc68128d1b2b8c41b965a10be2ab2f4cd93

12 years agoIntroduce a list of all the audio files
Jean-Baptiste Queru [Sat, 23 Oct 2010 01:56:52 +0000 (18:56 -0700)]
Introduce a list of all the audio files

Change-Id: Id52870e4d491bf074d5aa6f77d749397710ff316

12 years agoMake the base direction of the Arabic error pages RTL
Shachar Shemesh [Tue, 19 Oct 2010 13:05:40 +0000 (15:05 +0200)]
Make the base direction of the Arabic error pages RTL

Change-Id: I10df9cb92d18850e8893298b2edfd9e57ca5cfef

12 years agoSet the base direction of the Hebrew error pages to RTL
Shachar Shemesh [Tue, 19 Oct 2010 13:04:02 +0000 (15:04 +0200)]
Set the base direction of the Hebrew error pages to RTL

Change-Id: I435e724f9638e294b7e03527e7c6244a307f010e

12 years agoBatteryService: Set bool to true if sysfs entry is not 0
Axel Haslam [Tue, 12 Oct 2010 22:01:23 +0000 (17:01 -0500)]
BatteryService: Set bool to true if sysfs entry is not 0

For the musb to recognized as online, the musbOnline value
has to be set. The battery driver sets the online property
of the sysfs as "3" when the charger type is USB.

The way the current code is, if the value is not 1,
musbOnline would be false and the menu to mount the
sdcard on the pc would not pop-up.

Since the linux driver returns 0 if the cable is not
connected, and 3 if the cable is connected, we should
set the boolean variable to 0 only if the sysfs value
is 0, otherwise we set it to true.

Change-Id: I538d8de446e7ea4f620ffcce156a57cf56b5a4e5
Signed-off-by: Axel Haslam <axelhaslam@ti.com>
12 years agoFix FastScroller overlay position bug
NoraBora [Tue, 12 Oct 2010 13:59:55 +0000 (06:59 -0700)]
Fix FastScroller overlay position bug
after setFastScrollEnabled(false)-->setFastScrollEnabled(true)
the overlay shows up at the top-left instead of center

Change-Id: Idd5d4640398def8391f99962bd1838a3bde98157

12 years agojni: Remove duplicated jniThrowException()
Jim Huang [Sun, 17 Oct 2010 13:08:53 +0000 (21:08 +0800)]
jni: Remove duplicated jniThrowException()

Change-Id: I73a910e4efbf84393b3ce5d7f6e58e61ca88d484

12 years agoFix compile errors in telephony tests
Mark Piper [Fri, 6 Aug 2010 20:18:06 +0000 (21:18 +0100)]
Fix compile errors in telephony tests

Simple fix of package names for two test cases, currently
they do not compile in an IDE.

Change-Id: Ia7cd4df70ff37875a02563cfddbe8dd4a16a5b01

12 years agoCorrected visibility reporting error in WindowManager
Ulf Rosdahl [Wed, 29 Sep 2010 10:34:38 +0000 (12:34 +0200)]
Corrected visibility reporting error in WindowManager

Correction for the error:
When a window is done animating and about to be destroyed,
it is still checked for visibility in the method
updateReportedVisibilityLocked in the WindowManager.
In the case where other windows are ready to be reported as
visible, this, not yet destroyed window which has the state
not visible, will prevent the visibility report message from
being sent.

Change-Id: I9e307a678a204f0883ccd78c2645c373d3f81066

12 years agoHold partial wakelock during shutdown to avoid entering sleep
Mattias Larsson [Tue, 28 Sep 2010 12:34:15 +0000 (14:34 +0200)]
Hold partial wakelock during shutdown to avoid entering sleep

The ShutdownThread can get suspended while in progress if the
device enters sleep by the user pressing the power-key, or if it is
started (in sleep) from the BatteryService upon a dead battery
notification. If the device is woken up before the battery is
drained, the ShutdownThread will resume and finally complete
the shutdown, but if not the phone will stay in sleep until the
battery level is so low that the power is ruthlessly cut.

Change-Id: If64429fd0c98a9136141942be6c337b5c79cf4f1

12 years agoTelephony: Fix radio state printing
Alex Yakavenka [Wed, 29 Sep 2010 00:21:58 +0000 (17:21 -0700)]
Telephony: Fix radio state printing

Decode new radio state before printing its value

Change-Id: Ib6d47fd412e85a7799fe56a49d29af7531de8674

12 years agoFix time zone info in kernel is nothing after reboot
Robert CH Chou [Wed, 4 Nov 2009 13:38:49 +0000 (21:38 +0800)]
Fix time zone info in kernel is nothing after reboot

If sys_tz is not set correctly, the timestamp of
filesystem will be in-consistent with android's time,
until time zone is set from android's UI. Set kernel
timezone while initializing AlarmManagerService.

Change-Id: Ic85def954fc9388e943e3dee45767d8179825a49

12 years agoInclude debugger connection status in error entry
Christian Lindeberg [Tue, 28 Sep 2010 12:52:20 +0000 (14:52 +0200)]
Include debugger connection status in error entry

Include the debugger connection status when adding error entry
to DropBox if debugger is connected, "Debugger: Connected".

This can be useful to sort out crashes comming from developers
vs from regular usage.

Change-Id: Ic309066c63778af1577f2b91a95ffca0bd40338c

12 years agoDon't perform DNS lookup in android.net.Proxy.isLocalHost
Andreas Sandblad [Thu, 30 Sep 2010 10:04:00 +0000 (12:04 +0200)]
Don't perform DNS lookup in android.net.Proxy.isLocalHost

This fixes degrade introduced by:
Switch to using public APIs instead of private ones.
536ff5a6d700a80dbd75adb737ec4b560fbed2dc

Change-Id: I63cbea82d85d55d933bcfc9e7a311d1aa2324955

12 years agoNullPointerException at handleMessage(GSMPhone.java)
Babis Triantafyllou [Fri, 8 Oct 2010 14:02:11 +0000 (16:02 +0200)]
NullPointerException at handleMessage(GSMPhone.java)

NullPointerException at
com.android.internal.telephony.gsm.GSMPhone.handleMessage(GSMPhone.java)
Failing to retrieved the IMSI number from SIM card could lead to
an exception. A null pointer check will prevent this.

Change-Id: I26760543484504c8d35215bfb1e8f1ae664aeade

12 years agoAdd subaddress to SMS fingerprint calculation.
Naveen Kalla [Sun, 26 Sep 2010 22:55:37 +0000 (15:55 -0700)]
Add subaddress to SMS fingerprint calculation.

As per SMS specification in 3GPP2 C.S0015-B, section 4.3.1.6, if the
Subaddress is included in a CDMA SMS message, it needs to be used for
duplicate detection. Subaddress, which is an optional field was omitted
while computing the SMS fingerprint. Hence it was never being used in
duplicate detection if it was included in the SMS. Add subaddress to the
SMS fingerprint.

Change-Id: Iad9e89887a17caba59033ab8f8d94b63b33cb4bb

12 years agoDo not explicity disconnect Data during power down for 1x.
Naveen Kalla [Thu, 9 Sep 2010 20:38:22 +0000 (13:38 -0700)]
Do not explicity disconnect Data during power down for 1x.

In 1x, if the data call is torn down before radio power off, modem will
have to send a data call release and change to initialization state followed
by idle state and send out power down registration. If the power off request is sent
to the modem during Initialization state after call release, there is a chance that
modem does not perform power down registration.

Instead if we directly initiate a power down, modem just sets a power down registration
bit in the release order. This change also optimizes the power down procedure in 1x by
letting the modem handle data call release during power down.

Change-Id: I0f083cc3b005ec1e64105350abb43d10583b0881

12 years agoFix if ACTION_DOWN and lost focus time too close, it will become long press.
Tony Wu [Mon, 13 Sep 2010 11:54:00 +0000 (19:54 +0800)]
Fix if ACTION_DOWN and lost focus time too close, it will become long press.

It will become long press because CheckForTap is still posted in background.
So remove the callback when lose focus, or it will become long press event.

Change-Id: I4f98a6fc077d256edbe555464095b2b81e75dd41

12 years agofix typo in comment @beamsOverlap
madan ankapura [Sun, 12 Sep 2010 16:09:05 +0000 (09:09 -0700)]
fix typo in comment @beamsOverlap

Change-Id: I7c7f8e94391ed71a54b65badea164286281df7e3

12 years agoFix the layouting of the checkbox.
Pal Szasz [Tue, 24 Aug 2010 06:51:29 +0000 (08:51 +0200)]
Fix the layouting of the checkbox.

Sometimes (very rarely) the checkbox is not layouted correctly
(it's partly visible only). The reason is that the checkbox
(and the hint text below it) has layout_width set to
"wrap_content" as well, which means it needs more then one
layout runs to get the final layout.

Change-Id: I460bb29e2d9b4fdcf3df314e2baf9c45b2a6259b

12 years agoFix number counter will keep going after window losed focus.
Tony Wu [Fri, 3 Sep 2010 04:06:20 +0000 (12:06 +0800)]
Fix number counter will keep going after window losed focus.

Use Time pick in AlarmClock, long press on + or -, make an
incoming call or press power key to suspend the device,
after resumed, the counter will keep going without press.

Change-Id: I5e69d5e17d3be9aa78648e6f8e28665ec305b36f

12 years agoAllow two SurfaceViews inbetween the app and the wallpaper.
Pal Szasz [Fri, 3 Sep 2010 09:46:26 +0000 (11:46 +0200)]
Allow two SurfaceViews inbetween the app and the wallpaper.

When two SurfaceViews are used by an application, which is
transparent and uses the wallpaper, only one of the SurfaceViews
will be visible.

The problem is that when trying to find the correct location
for the wallpaper, the window manager locates the activity
window and skips every window below it which is related.
For the first SurfaceView this will be ok, since the
SurfaceViews's attached window is the previous window.
However for the second SurfaceView this condition will fail
(the 2nd SurfaceViews attached window is not the previous
window (which is the 1st SurfaceView)).

The fix adds an extra check which detects this usecase
(the windows are related if the attached window is the same
as the attached window of the previous window).

Change-Id: I368e9dd53455dc310f48d6d8c0be68350ff2b79e

12 years agoMake sure OutOfMemoryError is handled by WallpaperManager
Johan Alfven [Thu, 2 Sep 2010 12:26:54 +0000 (14:26 +0200)]
Make sure OutOfMemoryError is handled by WallpaperManager

Make sure exception OutOfMemoryError is handled when calling
BitmapFactory.decodeFileDescriptor and BitmapFactory.decodeStream
to avoid crash in the system server.

Change-Id: I954a6388d1225dab86d2617ab0602154b2a7f493