13008 Commits

Author SHA1 Message Date
Kenny Root
08d9d9a462 Merge "Runtime resource overlay, iteration 1." 2011-04-11 10:07:15 -07:00
Brad Fitzpatrick
9907d16158 Merge "Fix data corruption when writing to Bluetooth socket" 2011-04-04 10:49:05 -07:00
Brad Fitzpatrick
2ed7204882 Merge "Always return a valid index from Rfc822Tokenizer.findTokenEnd()" 2011-04-04 09:41:10 -07:00
Mattias Niklewski
114f98a753 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
2011-04-04 14:52:35 +02:00
Fredrik Helmer
a20c8ef471 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
2011-04-04 14:38:24 +02:00
Mike Playle
36aa8839d5 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
2011-04-04 08:56:22 +01:00
Mårten Kongstad
57f4b77c89 Runtime resource overlay, iteration 1.
Runtime resource overlay allows unmodified applications to appear
as if they had been compiled with additional resources defined. See
libs/utils/README for more information.

This commit is the first iteration of runtime resource overlay. It
provides the actual overlay modifications and loading of trusted overlay
packages (ie residing in /vendor) targeting framework-res.apk.

This commit loads exactly one overlay package. The overlay,
if present, must target framework-res.apk and be located at
/vendor/overlay/framework/framework-res.apk.

Change-Id: If26ee7754813004a96c043dba37fbe99fa3919db
2011-04-01 14:12:10 +02:00
Henrik Baard
eb0ced7a09 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
2011-03-29 08:54:09 +02:00
Jozef BABJAK
f1aa297b17 Removing dead store; it was likely a relict of debuging code.
Change-Id: I4daab1359d7c4b300ef61e3de1578d9fecb6f8da
2011-03-17 09:23:32 +01:00
Brad Fitzpatrick
8d25eab105 Merge "Releasing lock even if exception is thrown." 2011-03-15 11:23:44 -07:00
Brad Fitzpatrick
8b5345fb36 Merge "Fixing self-assignment in copying code." 2011-03-15 11:18:18 -07:00
Brad Fitzpatrick
9a01a2f272 Merge "Fixing self-assignment in cloning code." 2011-03-15 11:15:19 -07:00
Brad Fitzpatrick
29d75c9a10 Merge "Fixing improper boxing to Integer instead of Long." 2011-03-15 11:03:29 -07:00
Brad Fitzpatrick
40b207c131 Merge "Using proper key for removing object from the map." 2011-03-15 11:00:51 -07:00
Brad Fitzpatrick
b37f7e59ee Merge changes I81fc2f90,I5e7fd759
* changes:
  Using proper key for removing from map.
  Removing wrong equals method in comparator.
2011-03-15 10:56:16 -07:00
Jozef BABJAK
0dbe721d0a 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
2011-03-03 10:09:53 +01:00
Jaikumar Ganesh
9711b9b7aa am 1eefb529: Merge "Phone crash when old callback func is woken up when enabling BT."
* commit '1eefb529c78be5336f6c8a1b8ac2c32e268d4294':
  Phone crash when old callback func is woken up when enabling BT.
2011-02-28 16:00:01 -08:00
Jaikumar Ganesh
1eefb529c7 Merge "Phone crash when old callback func is woken up when enabling BT." 2011-02-28 15:33:34 -08:00
Xavier Ducrohet
6504490cde am dff6b8e7: Merge "Add --non-constant-id to aapt."
* commit 'dff6b8e71dda9f5d841fa26408714aec2aef1505':
  GpsLocationProvider: Clean up HAL initialization/cleanup sequence
  Fixed GSM encoded network initiated position request
  Ensuring thread-safe usage of DateFormat.
  Fixing infinite loop for zero duration.
  Fix for an infinite loop while scrolling lists.
  WAPPushManager, WAP Push over SMS message handler
  Add --non-constant-id to aapt.
2011-02-28 09:16:38 -08:00
Elliott Hughes
904f8a2032 Merge "Ensuring thread-safe usage of DateFormat." 2011-02-22 11:16:04 -08:00
Brad Fitzpatrick
a67191a174 Merge "Fix for an infinite loop while scrolling lists." 2011-02-22 10:55:44 -08:00
Jozef BABJAK
93c5b6a81d 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
2011-02-22 09:33:19 +01:00
Jozef BABJAK
25d8b05fb7 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
2011-02-22 09:17:51 +01:00
Jozef BABJAK
5d29860222 Fixing self-assignment in copying code.
Change-Id: I0799f83dc9d02b9bc31c76e747e6ba1ff58000b0
2011-02-22 08:06:44 +01:00
Jozef BABJAK
a8b9183a7c Fixing self-assignment in cloning code.
Change-Id: I6c918c0c7345678cbb171905eccfca50e59ae41a
2011-02-22 08:05:08 +01:00
Jozef BABJAK
47f13e7c52 Fixing infinite loop for zero duration.
Change-Id: I837478c1598f1d2f99bf773597f0d66d0fc3cf1a
2011-02-22 07:20:30 +01:00
Jozef BABJAK
594b47d592 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
2011-02-21 15:44:06 +01:00
Jozef BABJAK
6fe725ee5d 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
2011-02-21 15:33:59 +01:00
Jozef BABJAK
b62353ad1d 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
2011-02-21 15:19:00 +01:00
Daniel Mladenovic
0b1ab3a277 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
2011-02-21 09:17:40 +01:00
Romain Guy
a2090bea48 am 7118bdec: Merge "Fix for #12945: ProgressBar.setMax() will always redraw."
* commit '7118bdec523568842e70555e353951df9f2596fd':
  Fix for #12945: ProgressBar.setMax() will always redraw.
2011-02-18 07:53:50 -08:00
Michael Krehan
58e3822b59 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
2011-02-17 20:56:29 -08:00
Gilles Debunne
8e28ab22de am 2050de5b: Text selection is broken.
* commit '2050de5b9a5c097e30545ab822211d49031bd9dc':
  Text selection is broken.
2011-02-09 16:49:42 -08:00
Gilles Debunne
2050de5b9a Text selection is broken.
Bug 3439569

Lazy initialization code was not back-ported.

Change-Id: I9815f649891e2ddc602383488749144686ab1dd3
2011-02-09 14:17:22 -08:00
Jeff Hamilton
c1cc9ba6d1 am 58c9d472: Merge "More documentation updates for NFC." into gingerbread
* commit '58c9d4726ebf3165b0dbbcebb1130dfc5502bfe9':
  More documentation updates for NFC.
2011-02-09 00:36:53 -08:00
Jeff Hamilton
58c9d4726e Merge "More documentation updates for NFC." into gingerbread 2011-02-09 00:34:22 -08:00
Jeff Hamilton
28319c0cec More documentation updates for NFC.
Change-Id: Ie134d4296ee12333e6647ce76126f9767ba1ba34
2011-02-09 17:26:47 +09:00
Nick Pelly
47dac545da am 39cf3a44: Document NFC permissions.
* commit '39cf3a445e507f219ecc8a476f6038f095d9d520':
  Document NFC permissions.
2011-02-08 23:25:29 -08:00
Nick Pelly
39cf3a445e Document NFC permissions.
Change-Id: Ib1b1625058c9c673692f3fbcb3546ec7c2d54a07
2011-02-09 16:10:46 +09:00
Jeff Hamilton
1ac35411f1 am 584afa8d: Merge "Improve the docs a bit for foreground dispatch." into gingerbread
* commit '584afa8dde1777b181e773a491416769f25607a8':
  Improve the docs a bit for foreground dispatch.
2011-02-08 19:33:53 -08:00
Jeff Hamilton
584afa8dde Merge "Improve the docs a bit for foreground dispatch." into gingerbread 2011-02-08 19:30:47 -08:00
Jeff Hamilton
167d9e473f Improve the docs a bit for foreground dispatch.
Change-Id: I4179133a0956bc66a49201c20f1dd2d6d67874d2
2011-02-09 12:30:18 +09:00
Eric Fischer
c1c3143347 am be4b39d2: Merge "Import revised translations. DO NOT MERGE" into gingerbread
* commit 'be4b39d2fde3d34539752b99238ceebd97ccf580':
  Import revised translations.  DO NOT MERGE
2011-02-08 17:32:18 -08:00
Gilles Debunne
63bd55c7bf am cdfe8999: Fix for multiple merge problem.
* commit 'cdfe899991c365d9e197d83f8859089cae082011':
  Fix for multiple merge problem.
2011-02-08 17:31:33 -08:00
Gilles Debunne
e04c14962f resolved conflicts for merge of c0728cc0 to gingerbread-plus-aosp
Change-Id: I1b941e0610e498365d441c7bd23af276d1b5f986
2011-02-08 16:33:58 -08:00
Eric Fischer
dff2fea9b1 Import revised translations. DO NOT MERGE
Change-Id: I9fe35888f8aa02c559949ad8395e8e4f4dffb669
2011-02-07 13:17:26 -08:00
Gilles Debunne
cdfe899991 Fix for multiple merge problem.
Change-Id: I5d9c497f44aa9cdc34c195c41e02c3d7353c3fb4
2011-02-04 16:50:01 -08:00
Kenny Root
c4dfa998b7 am d2a99617: am c94a9998: Merge "JPtextinput: Dont break emoji characters when cutting strings."
* commit 'd2a996173e53e7b38ff9b703cc5986d9715508a1':
  JPtextinput: Dont break emoji characters when cutting strings.
2011-02-04 16:12:14 -08:00
Kenny Root
d2a996173e am c94a9998: Merge "JPtextinput: Dont break emoji characters when cutting strings."
* commit 'c94a99987d8a49ea599c22ffad0e61db591963e0':
  JPtextinput: Dont break emoji characters when cutting strings.
2011-02-04 16:01:13 -08:00
Gilles Debunne
1ba2a47b82 am 893ac28f: Merge "Blinking runnable is created only if text is editable. DO NOT MERGE." into gingerbread
* commit '893ac28f75561061a8f334cbd4e47833d7fd7843':
  Blinking runnable is created only if text is editable. DO NOT MERGE.
2011-02-04 15:50:15 -08:00