754 Commits

Author SHA1 Message Date
Jean-Baptiste Queru
0315a2c564 am f3894a04: Merge "Tweak setViewport stuff for fwd-compat"
* commit 'f3894a04acb9cdd67a02a1a4c82ba7d178c13000':
  Tweak setViewport stuff for fwd-compat
2011-06-08 14:07:19 -07:00
Jean-Baptiste Queru
de26719153 Tweak setViewport stuff for fwd-compat
Change-Id: I532336eced54544115dfd47d5557cc77bafdfc87
2011-06-08 13:00:58 -07:00
Martijn Coenen
ed1c8d7dc0 am 0aa1017f: Prevent allocation overflows by corrupt NDEF records.
* commit '0aa1017f9183bca752c95af72f73120e102ab2d3':
  Prevent allocation overflows by corrupt NDEF records.
2011-06-01 09:51:15 -07:00
Martijn Coenen
0aa1017f91 Prevent allocation overflows by corrupt NDEF records.
Basic sanity check for the length fields in NdefRecord; this prevents
malformed NdefRecords from crashing the vm and the entire NFC service
with it.

Bug: 4165324
Change-Id: I67b341d445d6647cb76cc24ea49afaf77de0610e
2011-05-31 19:06:59 -07:00
Jaikumar Ganesh
4b41df613d Merge "Use proper type for oob variable in register_agent. Without this change the BluetoothEventLoop crashes on my armv5 arch board." 2011-05-20 13:37:00 -07:00
Derek Sollenberger
0ceb9501b2 Adapt to latest skia
Change-Id: I39247db04ca8b7993b0f5a16fb0324828d04cc3a
2011-05-12 15:05:44 -07:00
Jean-Baptiste Queru
9faa34e603 Ninepatch tweaks for better interop
Change-Id: I96781e2b27fcd6dd05d9726829e8e79ff365cbdc
2011-05-12 14:22:43 -07:00
Jean-Baptiste Queru
c9e22e9aff Switch to SkSafeUnref for better portability
Change-Id: Ia146a4728b5eb92626462effe42521ca73454a7d
2011-05-12 08:22:35 -07:00
Nicu Pavel
75d14c33d7 Use proper type for oob variable in register_agent.
Without this change the BluetoothEventLoop crashes on my armv5 arch board.

Change-Id: Ia10382f0aea4736be268512ccf9d5c5cde052851
2011-05-05 13:11:12 +03:00
Irfan Sheriff
8a14d8b9c0 am 1a5b6098: Handle GET_POWER failures
* commit '1a5b6098d5002ae07ce3f9bc514400a87c2b64fa':
  Handle GET_POWER failures
2011-05-04 21:14:47 -07:00
Irfan Sheriff
1a5b6098d5 Handle GET_POWER failures
Return a failure when GET_POWER returns a non-conforming
format

Bug: 4380317
Change-Id: If1ce73572ae261cd6998e4289e21112c88859437
2011-05-04 14:23:42 -07:00
Conley Owens
9fd8e0579f Merge "Fix memory leak of SkMovie class" 2011-04-29 10:00:00 -07:00
Brad Fitzpatrick
27e00544ea am 9907d161: Merge "Fix data corruption when writing to Bluetooth socket"
* commit '9907d161584415c81de1099678f160da172fd1a6':
  Fix data corruption when writing to Bluetooth socket
2011-04-04 11:03:03 -07: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
Kimiyoshi Kusaka
08d7778f08 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
2011-03-28 11:58:51 +09:00
Dianne Hackborn
cffde30fc1 am 44220a56: Merge "Add some debug code to try to track down issue 3183612" into gingerbread
* commit '44220a56026ead4583a9db96ced5f1113d4b4f07':
  Add some debug code to try to track down issue 3183612
2011-03-15 10:52:27 -07:00
Dianne Hackborn
cf3004a46e Add some debug code to try to track down issue 3183612
java.lang.SecurityException: Neither user 1209 nor current process
has android.permission.WAKE_LOCK.

Change-Id: I3e84f8795941744e697824a5e5b2e651f565b253
2011-03-14 14:24:04 -07:00
TK MUN
c01fd043a9 am 4bdab175: DO NOT MERGE WiMAX support
* commit '4bdab1751f0db3b2f03e8c58ef5c11a543dfa3c7':
  DO NOT MERGE WiMAX support
2011-03-09 22:54:44 -08:00
TK MUN
4bdab1751f DO NOT MERGE WiMAX support
- In Connectivity service, start WiMAX service
- 4G icon display in StatusBarPolicy
- Add DHCP renew
- Add radio for WiMAX

Change-Id: Iffff012b270d80e84ec8fbd4486921a8adb847dd
Signed-off-by: TK MUN <tk.mun@samsung.com>
2011-03-09 22:37:08 -08:00
Wei-Ta Chen
62cd5c9788 am 61d9ffbf: Merge "Do not merge." into gingerbread
* commit '61d9ffbfd86dfe6bacce431b8ed9eebe1cfd8178':
  Do not merge.
2011-01-13 12:06:38 -08:00
Wei-Ta Chen
25bce3a673 Do not merge.
Backport changes related to BitmapRegionDecoder from HoneyComb to
Gingerbread.

Bug: 3309014

////////////////////////////////////////////////////
This is a combination of 7 commits.
Revert "Do not merge."

This reverts commit f7681f84918c27f6a626681ce37ed2a236c44e82.

Change-Id: I46fd710600b1649773eaea2d9abc2b21a592f9a6

Fix a initialization bug in BitmapRegionDecoder.

Change-Id: I6c1151fd34970a84d4de52d664d9a5dc464892c5

Fix segfault when tring to throw IOException.

Change-Id: I530cc4409ba4ca17cec933afad077c5f60ba554f

Fix 3122139, where previewing an attachment for the second time will
fail.

Use AutoFDSeek to mark and restore the position before we read data from
the descriptor.

Change-Id: I3d4f012dce486e19b113bc90a98b94031cfa8195

Add inPreferQualityOverSpeed into BitmapFactory.Options.

The new field allows a developer to use a more accurate by
slightly slower IDCT method in JPEG decode. This in turns improves the
quality of the reconstructed image.

The field by default is not set and thus does not affect existing
applications.

Bug: 3238925
Change-Id: I93d55b7226e47a43e639325cd1a677694d6f2ee4

Unhide inPreferQualityOverSpeed in BitmapFactory.Options.

The new field allows a developer to use a more accurate by
slightly slower IDCT method in JPEG decode. This in turns improves the
quality of the reconstructed image.

The field by default is not set and thus does not affect existing
applications.

Bug: 3238925

Related changes: https://android-git.corp.google.com/g/#change,83291 and
                 https://android-git.corp.google.com/g/#change,83294

Change-Id: I969f5c413f9b2179454aeb90e18ae8222ee583b4

Correct the API comments.

BitmapRegionDecoder supports PNG as well.
2011-01-11 22:54:10 -08:00
Brad Fitzpatrick
096c4c448d am 251384a7: Merge "Improve performance when getting styled string."
* commit '251384a7595022ddbc53f4ab0fa386f9c040f1f5':
  Improve performance when getting styled string.
2010-11-19 10:25:09 -08:00
Peter Eliasson
ac4a181d2e 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
2010-11-18 07:28:06 +01:00
Jeff Brown
5314335c9e am 00e5dd44: Merge "Fix JNI reference leak in NativeActivity. (DO NOT MERGE)" into gingerbread
* commit '00e5dd44f6d014fff8c65b9c718f5641f5eae4bb':
  Fix JNI reference leak in NativeActivity. (DO NOT MERGE)
2010-11-10 16:04:13 -08:00
Jeff Brown
00e5dd44f6 Merge "Fix JNI reference leak in NativeActivity. (DO NOT MERGE)" into gingerbread 2010-11-10 16:00:37 -08:00
Jeff Hamilton
cc798d9675 am 2e2983c6: Merge "Reduce log clutter." into gingerbread
* commit '2e2983c6efe0e4223086e4675b715ed0e20e8d26':
  Reduce log clutter.
2010-11-09 06:59:33 -08:00
Jeff Brown
8f6068e63e Fix JNI reference leak in NativeActivity. (DO NOT MERGE)
This change ensures that the native activity releases the KeyEvent
objects that it allocates since they will not be released
automatically and eventually the JNI slot table will overflow
and crash the process.

Bug: 3170494
Change-Id: I2ea527f056096fae9bc9e7685dccb56ec7a0e8b4
2010-11-08 16:03:13 -08:00
Jeff Hamilton
5629d51f22 Reduce log clutter.
Change-Id: Ia034b563b028d74b4878f1af7db9188c82d03548
2010-11-08 13:18:49 -06:00
Dianne Hackborn
c2f78020d3 am 23656899: Merge "Fix issue #3126018: No way to specify NativeActivity\'s native method" into gingerbread
Merge commit '236568999411214ef440cabc6d12e3bf5f19d8f4' into gingerbread-plus-aosp

* commit '236568999411214ef440cabc6d12e3bf5f19d8f4':
  Fix issue #3126018: No way to specify NativeActivity's native method
2010-10-24 18:38:11 -07:00
Dianne Hackborn
e21d91c694 Fix issue #3126018: No way to specify NativeActivity's native method
Change-Id: I59de6a543e7f7f45d963a905829a3f56f32bf8cf
2010-10-24 14:56:38 -07:00
Nick Pelly
c81ec79d1f am 0592832c: Merge "Attempt to fix simulator build." into gingerbread
Merge commit '0592832c5e61b9c0008a4410f263ea0b0b991f05' into gingerbread-plus-aosp

* commit '0592832c5e61b9c0008a4410f263ea0b0b991f05':
  Attempt to fix simulator build.
2010-10-22 09:03:21 -07:00
Nick Pelly
1af97f0b78 Attempt to fix simulator build.
Change-Id: I7f912ce58292bdd03fa683d2e5c203480d94e945
Signed-off-by: Nick Pelly <npelly@google.com>
2010-10-22 08:48:48 -07:00
Jeff Hamilton
de8635e4c4 am 389a440a: Backport ParcelFileDescriptor.createPipe() from master.
Merge commit '389a440ad13f7b16e8f7c7f1670bdd55f1e2112a' into gingerbread-plus-aosp

* commit '389a440ad13f7b16e8f7c7f1670bdd55f1e2112a':
  Backport ParcelFileDescriptor.createPipe() from master.
2010-10-21 21:08:20 -07:00
Jeff Hamilton
389a440ad1 Backport ParcelFileDescriptor.createPipe() from master.
This allows content providers to expose arbitraty data
through the ContentResolver open* APIs.

Change-Id: I408a0b7cee9cdba5654a962098386c012d6b3549
2010-10-21 22:39:41 -05:00
Dianne Hackborn
86f1b643d1 am bf5efba2: Merge "Fix issue #3117918: No way to finish a native activity" into gingerbread
Merge commit 'bf5efba238f81330f4b473e92b6931b85baa1cbc' into gingerbread-plus-aosp

* commit 'bf5efba238f81330f4b473e92b6931b85baa1cbc':
  Fix issue #3117918: No way to finish a native activity
2010-10-21 20:17:50 -07:00
Dianne Hackborn
db28a94d49 Fix issue #3117918: No way to finish a native activity
Change-Id: Ic53e712f7ab5412d72a31b96ecba252344b91644
2010-10-21 19:07:37 -07:00
Jean-Baptiste Queru
2cead908f4 am db723ea0: Merge "jni: Remove duplicated jniThrowException()"
Merge commit 'db723ea0f70392f712542edb1114fc15e782cdb7' into gingerbread-plus-aosp

* commit 'db723ea0f70392f712542edb1114fc15e782cdb7':
  jni: Remove duplicated jniThrowException()
2010-10-19 15:22:13 -07:00
Sylvain Fonteneau
824de4b3e3 am dd7341f7: Added missing implementation for NdefRecord.
Merge commit 'dd7341f775ca4d86091f4106d6dfef9214073a7d' into gingerbread-plus-aosp

* commit 'dd7341f775ca4d86091f4106d6dfef9214073a7d':
  Added missing implementation for NdefRecord.
2010-10-18 19:13:29 -07:00
Sylvain Fonteneau
dd7341f775 Added missing implementation for NdefRecord.
Implemented constructor using a byte array to parse.
Added missing exception in method declaration, leading to update api/current.xml

Change-Id: I2660484aef1225e90c2f32a572041a2c3aecf288
2010-10-18 19:09:26 -07:00
Jim Huang
1fc4d88090 jni: Remove duplicated jniThrowException()
Change-Id: I73a910e4efbf84393b3ce5d7f6e58e61ca88d484
2010-10-17 21:08:53 +08:00
Eric Laurent
1a32602212 am 208bb08a: Merge "Fix issue 3098880." into gingerbread
Merge commit '208bb08a8b4896bc51b44aeec41b91d4726007cf' into gingerbread-plus-aosp

* commit '208bb08a8b4896bc51b44aeec41b91d4726007cf':
  Fix issue 3098880.
2010-10-15 18:42:06 -07:00
Jean-Baptiste Queru
36e7790b6b Merge a851d8d0 from gingerbread
Change-Id: Iea0e3fa1662d6326ab337821fe52a65a9dfd989a
2010-10-15 17:02:57 -07:00
Eric Laurent
0e7a4d9edc Fix issue 3098880.
Test value returned by getJNIEnv() in android_media_AudioSystem_error_callback()
and exit if NULL.

Change-Id: If30e5a05c585f34c66e6ad8cece3f7b46ef4be8e
2010-10-15 12:33:16 -07:00
Nick Pelly
bc21fdefdf NFC: Move NFC service implementation out of system_server.
NFC service is now an application service in packages/apps/Nfc.

NFC service is registered through ServiceManager.addService(), and the proxy
object NfcAdapter obtains a handle to it through ServiceManager.getService().

**Important** Had to add new symbols AID_NFC / NFC_UID / android.uid.nfc and
modify service_manager.c, Process.java and PackageManagerService.java in order
to force the com.android.nfc process to take a fixed uid, so that it can use
ServiceManager.addService().

Most of the JNI has moved to packages/apps/Nfc/jni. However NdefRecord and
NdefMessage require some in-process native code, so android_com_NdefMessage.cpp
and android_com_NdefRecord.cpp stay in frameworks/base/core/jni. They link to
a very small library libnfc_ndef.so that implements NDEF message parsing. This
has been added to core.mk so all devices (even without NFC hardware) can work
with NDEF data.

Bug: 3041259
Bug: 3097445
Change-Id: If8f00ce8f2053acfc9319ca366d4a9c02bd396e6
Signed-off-by: Nick Pelly <npelly@google.com>
2010-10-15 02:12:32 -07:00
Kenny Root
8fda1636e3 am bdf8034c: Merge "OBB: use PBKDF2 for key generation." into gingerbread
Merge commit 'bdf8034c657147226b2390eef113ff841e0d6065' into gingerbread-plus-aosp

* commit 'bdf8034c657147226b2390eef113ff841e0d6065':
  OBB: use PBKDF2 for key generation.
2010-10-13 22:54:10 -07:00
Kenny Root
3b1abba6bb OBB: use PBKDF2 for key generation.
Switch to using PBKDF2 for the key generation for OBBs. Any previously
generated OBBs will stop being read correctly. A small pbkdf2gen program
is available to allow generation of appropriate keys with the salts.

Bug: 3059950
Change-Id: If4305c989fd692fd1150eb270dbf751e09c37295
2010-10-13 18:25:33 -07:00
Jeff Brown
22cb4ef8ce am d577cfd7: Merge "Switch Looper back to using poll() instead of epoll()." into gingerbread
Merge commit 'd577cfd73a223279f9a5af698f55edd38a3fe4db' into gingerbread-plus-aosp

* commit 'd577cfd73a223279f9a5af698f55edd38a3fe4db':
  Switch Looper back to using poll() instead of epoll().
2010-10-07 15:46:57 -07:00
Jeff Brown
415d8c3819 Switch Looper back to using poll() instead of epoll().
Added a couple of micro-optimizations to avoid calling wake() unnecessarily
and reduce JNI overhead slightly.

Fixed a minor issue where we were not clearing the "next" field of Messages
returned by the MessageQueue so the Message would hold on to its successor
and potentially prevent the GC from collecting it if the message were leaked
somehow.

Change-Id: I488d29417ce0cdd7d0e447cda76ec978ef7f811c
2010-10-07 13:26:39 -07:00
Wei-Ta Chen
eeac43ad3c am f7681f84: Do not merge.
Merge commit 'f7681f84918c27f6a626681ce37ed2a236c44e82' into gingerbread-plus-aosp

* commit 'f7681f84918c27f6a626681ce37ed2a236c44e82':
  Do not merge.
2010-10-01 12:36:05 -07:00
Wei-Ta Chen
f7681f8491 Do not merge.
Fix 3052285 by not publishing the BitmapRegionDecoder API until the honeycomb release.

Bug: 3052285
Change-Id: Ie339e414c1a5581e1d38684621e0e97162616977
2010-10-01 12:16:38 -07:00