105 Commits

Author SHA1 Message Date
Derek Sollenberger
6062c5912d Skia Merge (revision 808)
This is a companion CL to the one found in /external/skia

Change-Id: If81748545435cab20a5d8479329ab333cb973e16
2011-02-22 16:07:36 -05:00
Brian Carlstrom
929a1c2192 Removing android.security.MessageDigest
Bug: 3392028
Change-Id: I6b9732da17d086ba00c846c3ad1c7fb39baf9502
2011-02-01 22:25:47 -08:00
Mike Lockwood
e7d511e148 New APIs for USB host support:
UsbManager:
- is now a service retrievable via Context.getSystemService(Context.USB_SERVICE).
- provides support for returning a list all connected USB devices
- broadcasts ACTION_USB_DEVICE_ATTACHED and USB_DEVICE_DETACHED when devices
  are added and removed from the USB host bus

UsbDevice:
- represents an attached USB device.

UsbInterface:
- represents an interface on a USB device
- devices may have multiple interfaces if they provide multiple
   sets of functionality (for example, android phones typically have interfaces
   for both USB mass storage and adb)

UsbEndpoint:
- represents an endpoint on a USB interface
- endpoints are used for sending or receiving data
  (only in one or the other direction)

UsbRequest:
- encapsulates a send or receive request to be sent over an endpoint

Change-Id: Ieef3e434c62760770ea839070cf5eba1a705967a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-22 15:56:09 -08:00
Jamie Gennis
6714efc5e0 Add the SurfaceTexture java class.
This class exposes to Java the application-side interface to the
SurfaceTexture C++ class.

Change-Id: I0dba42aad90257c7adbde6fa362658c0717b70d0
2011-01-06 16:05:14 -08:00
Mike Lockwood
264f6cd0b9 Temporarily remove UsbManager support for USB host.
A new USB host API will be added in an upcoming commit

Change-Id: I5816c10c7acd236d31ab8ae255fc83c77121eea0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-06 11:48:19 -05:00
Mike Lockwood
d07c9d5d92 UsbManager: Add methods to convert between USB device names and IDs
Change-Id: I199a47805b629cc7b1714191d6af2fd70c2bda6d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-29 09:44:54 -05:00
Jeff Brown
49ed71db42 Add support for fallback keycodes.
This change enables the framework to synthesize key events to implement
default behavior when an application does not handle a key.
For example, this change enables numeric keypad keys to perform
their associated special function when numlock is off.

The application is informed that it is processing a fallback keypress
so it can choose to ignore it.

Added a new keycode for switching applications.

Added ALT key deadkeys.

New default key mappings:
- ESC -> BACK
- Meta+ESC -> HOME
- Alt+ESC -> MENU
- Meta+Space -> SEARCH
- Meta+Tab -> APP_SWITCH

Fixed some comments.
Fixed some tests.

Change-Id: Id7f3b6645f3a350275e624547822f72652f3defe
2010-12-07 17:35:26 -08:00
Chet Haase
6e0ecb4eed Adding JNI methods as a faster reflection mechanism
This approach is only for the common cases of void-return,
single-argument float/int methods.

Change-Id: Ifb31535a6f717b85417eced93c579be6e461e039
2010-11-04 13:37:45 -07:00
Nick Pelly
cd0e839a24 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: If7f00cd8f2053acfc9319ca366d4a9c02bd396e6
Signed-off-by: Nick Pelly <npelly@google.com>
2010-10-17 18:35:29 -07:00
Nick Pelly
4715bd91f5 resolved conflicts for merge of f4c3b7e9 to master
Change-Id: Idcdc521144f3072058b2bb6cb383e42c852e64f4
2010-09-29 12:20:51 -07:00
Nick Pelly
038cabe024 NFC integration
Source: Trusted_NFC_Device_Host_AA03.01e02_google.zip code drop (23-Sep-2010)

Conflicts:

	core/java/android/app/ApplicationContext.java
	core/java/android/provider/Settings.java
	core/jni/Android.mk
	core/jni/AndroidRuntime.cpp
	core/res/AndroidManifest.xml
	include/utils/Asset.h

Change-Id: I62c92f4c79f5ee65126c97602f6bc1c15794e573
Signed-off-by: Nick Pelly <npelly@google.com>
2010-09-28 22:36:27 -07:00
Wei-Ta Chen
a23cdda0a5 am ac487f70: am 6b849e21: Unhide BitmapRegionDecoder.
Merge commit 'ac487f708f7b58dbd4f3021b520c6ed5975daebe'

* commit 'ac487f708f7b58dbd4f3021b520c6ed5975daebe':
  Unhide BitmapRegionDecoder.
2010-09-22 23:06:55 -07:00
Wei-Ta Chen
6b849e2123 Unhide BitmapRegionDecoder.
1. Rename LargeBitmap to BitmapRegionDecoder
2. Move the instantiations of BitmapRegionDecoder out of BitmapFactory.
3. Remove the use of MemoryFile in BitmapRegionDecoder, since MemoryFile's API had been modified in master. Otherwise, the change will break the master build.
4. Move AssetStreamAdaptor, AutoFDSeek and nullObjectReturn to Utils.h because BitmapFactory.cpp and BitmapRegionDecoder.cpp both need to use these utility functions.

Most of the modifications, except for (2) and (3), were reviewed in https://android-git.corp.google.com/g/#change,64716 .
However, that change broke the master build due to (3) and was reverted eventually.
So, instead of withdrawing this change and waiting for that change to be checked in again, I merge the two changes into one.

Change-Id: I2202c0fbbbd6d6676bbd9637e690023ea4099c40
2010-09-23 13:56:52 +08:00
Elliott Hughes
cfa5903926 am 664c48e9: am 4c7d3f28: Merge "Remove dead code: NIOBuffer." into gingerbread
Merge commit '664c48e991a70d07646d54125e97f579f3a33be4'

* commit '664c48e991a70d07646d54125e97f579f3a33be4':
  Remove dead code: NIOBuffer.
2010-09-08 10:38:41 -07:00
Wei-Ta Chen
7b29804ba2 am 8fc6f8b2: am 1b214be9: Merge "Revert "Rename LargeBitmap to BitmapRegionDecoder for having a better API."" into gingerbread
Merge commit '8fc6f8b2152564cab6ede025644f9bc3ee61ce16'

* commit '8fc6f8b2152564cab6ede025644f9bc3ee61ce16':
  Revert "Rename LargeBitmap to BitmapRegionDecoder for having a better API."
2010-09-07 22:10:58 -07:00
Wei-Ta Chen
340ce75b44 Revert "Rename LargeBitmap to BitmapRegionDecoder for having a better API."
This reverts commit 50ba3d2c09a9131f3578d271adf2bc8258ca1742.
2010-09-08 10:44:21 +08:00
Wei-Ta Chen
50cb7dc458 am a295a390: am b356f8ac: Merge "Rename LargeBitmap to BitmapRegionDecoder for having a better API." into gingerbread
Merge commit 'a295a3908befeb9dd30203c612d95411d68492ed'

* commit 'a295a3908befeb9dd30203c612d95411d68492ed':
  Rename LargeBitmap to BitmapRegionDecoder for having a better API.
2010-09-07 18:52:21 -07:00
Elliott Hughes
edf7223bc2 Remove dead code: NIOBuffer.
Working on speeding up our NIO implementation, I came across this suboptimal
code. Happily, it turns out to be unused.

Bug: 2935622
Change-Id: I07ae6e573d63e439f496d55af215b34598d8258a
2010-09-07 15:42:23 -07:00
Wei-Ta Chen
50ba3d2c09 Rename LargeBitmap to BitmapRegionDecoder for having a better API.
Move AssetStreamAdaptor, AutoFDSeek and nullObjectReturn to Utils.h because
BitmapFactory.cpp and BitmapRegionDecoder.cpp both need to use these utility functions.

Change-Id: I3e60c7fe4abd0289e1384e69a08fd20fe6fb0e10
2010-09-07 21:02:13 +08:00
Joseph Wen
1b10d3d235 am 81dcea60: am f1f48bc7: Do JPEG tile-based decoding.
Merge commit '81dcea6093dfcdadd52982505249a5eacf47a81b'

* commit '81dcea6093dfcdadd52982505249a5eacf47a81b':
  Do JPEG tile-based decoding.
2010-08-17 00:35:06 -07:00
Joseph Wen
f1f48bc7f2 Do JPEG tile-based decoding.
Change-Id: I5c1b4ac3c02eb4350ef0ba9a7877b22cfd730cfb
2010-08-17 14:34:02 +08:00
Dianne Hackborn
7b6d0d99b6 am 679ac09a: am a5ae50cd: Merge "More native work." into gingerbread
Merge commit '679ac09a5c22175354f3a04b28456b323839530e'

* commit '679ac09a5c22175354f3a04b28456b323839530e':
  More native work.
2010-08-11 00:50:56 -07:00
Dianne Hackborn
08d5b8fad8 More native work.
Implement save/restore of state, and add native APIs for
configuration information.

Change-Id: I2a3ddc2ba605db58d7c8b2b31b9215fb323f90b5
2010-08-11 00:29:59 -07:00
Romain Guy
1639351139 Make libhwui entirely optional.
The makefile variable USE_OPENGL_RENDERER must be set to true to compile
libhwui and the related code in the JNI layer.

This change also removes obsolete APIs from Canvas that must not be used
and would be confusing if left in. These APIs were remnants of our first
attempt at an OpenGL renderer for the view hierarchy and had not been
taken out before Android 1.0 was released.

Change-Id: I2475ff1307212bab26c926724f3c508681c7dae1
2010-08-08 17:45:07 -07:00
Mathias Agopian
50558b9561 resolved conflicts for merge of bc54e63c to master
Change-Id: I4245b15b4cda6963d735442c0c6a04a0477ff5e1
2010-07-21 18:10:22 -07:00
Danica Chang
72a6b1c389 deleted android_bluetooth_ScoSocket.cpp from makefile
Change-Id: I40d107c9efa415de29977fa0998a746d9c24240e
2010-07-20 13:53:21 -07:00
Mathias Agopian
1bf797857e new SensorService
remove old sensor service and implement SensorManager
on top of the new (native) SensorManger API.

Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
2010-07-19 17:57:29 -07:00
Kenny Root
fb4e1e24a9 resolved conflicts for merge of 181bb0ab to master
Change-Id: I2284e7c671d127da0d124fbabae8d887727fd5bf
2010-07-16 09:04:09 -07:00
Kenny Root
02c8730c1b Add API to call to vold for mounting OBBs
* Unhide StorageService class; hide all the USB-related items

* Add application-visible API to StorageManager for OBB files

* Add class for parceling OBB info across binders (ObbInfo)

* Add a JNI glue class to libutils/ObbFile (ObbScanner)

* Add API to MountService to deal with calling into vold and checking
  permissions

Change-Id: I33ecf9606b8ff535f3a2ada83931da6bbef41cfd
2010-07-15 21:31:58 -07:00
Joe Onorato
0dff8d4afd am a6be4e01: am 3a053db2: Merge "The ICU data is no longer compiled directly into the shared library." into gingerbread
Merge commit 'a6be4e01b23610cbcc27c6f26cfa390beabfa1fe'

* commit 'a6be4e01b23610cbcc27c6f26cfa390beabfa1fe':
  The ICU data is no longer compiled directly into the shared library.
2010-07-15 11:53:51 -07:00
Joe Onorato
aa1933ac4c The ICU data is no longer compiled directly into the shared library.
Change-Id: I1f6adf66a28b62a6f45c1622d669cb8c519adcbb
2010-07-13 19:05:51 -07:00
Doug Felt
f7cb1f75fd Support bidi/shaping for getTextPath
Move layout-related code into separate class since it's needed by both
canvas and paint.

Change-Id: Iba89a1d94d7cca650255ffa3cbc952b988a51b54
2010-07-12 13:50:08 -07:00
Mike Lockwood
81ea83d108 Move MTP JNI code from libandroid_runtime to libmedia_jni
Signed-off-by: Mike Lockwood <lockwood@android.com>

Change-Id: I0c54bbe4e6146beba7d22e782e02ded420f50dbd
2010-06-30 17:54:10 -04:00
Mike Lockwood
98ef64e4a8 MTP: Add MtpServer Java class to wrap MTP device support.
Change-Id: I818c2d3b3f52ad5bb515acc4d3288b2b43e11908
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-30 17:02:07 -04:00
Chris Tate
f40e4928b9 am 96725326: am 31e0ffe8: Merge "Native input event dispatching." into gingerbread
Merge commit '96725326149687168937cf62f75364cf9cc3e96b'

* commit '96725326149687168937cf62f75364cf9cc3e96b':
  Native input event dispatching.
2010-06-28 19:16:42 -07:00
Jeff Brown
349703effc Native input event dispatching.
Target identification is now fully native.
Fixed a couple of minor issues related to input injection.
Native input enabled by default, can be disabled by setting
WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH to false.

Change-Id: I7edf66ed3e987cc9306ad4743ac57a116af452ff
2010-06-28 19:10:54 -07:00
Romain Guy
e4d011201c Add libhwui, to hardware accelerate the Canvas API using OpenGL ES 2.0.
This is the initial checkin to setup the library and turn on OEGL ES 2.0
in ViewRoot, not a functional renderer.

Change-Id: I6655c54166e2967da2e21e7d6dcfba78bf113b44
2010-06-17 13:40:11 -07:00
Jeff Brown
8e03b7566c resolved conflicts for merge of 9e660c82 to master
Change-Id: Ic4bd85cbaa5b9a10dcb474a0dad46490bf967e43
2010-06-13 19:16:55 -07:00
Jeff Brown
46b9ac0ae2 Native input dispatch rewrite work in progress.
The old dispatch mechanism has been left in place and continues to
be used by default for now.  To enable native input dispatch,
edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy.

Includes part of the new input event NDK API.  Some details TBD.

To wire up input dispatch, as the ViewRoot adds a window to the
window session it receives an InputChannel object as an output
argument.  The InputChannel encapsulates the file descriptors for a
shared memory region and two pipe end-points.  The ViewRoot then
provides the InputChannel to the InputQueue.  Behind the
scenes, InputQueue simply attaches handlers to the native PollLoop object
that underlies the MessageQueue.  This way MessageQueue doesn't need
to know anything about input dispatch per-se, it just exposes (in native
code) a PollLoop that other components can use to monitor file descriptor
state changes.

There can be zero or more targets for any given input event.  Each
input target is specified by its input channel and some parameters
including flags, an X/Y coordinate offset, and the dispatch timeout.
An input target can request either synchronous dispatch (for foreground apps)
or asynchronous dispatch (fire-and-forget for wallpapers and "outside"
targets).  Currently, finding the appropriate input targets for an event
requires a call back into the WindowManagerServer from native code.
In the future this will be refactored to avoid most of these callbacks
except as required to handle pending focus transitions.

End-to-end event dispatch mostly works!

To do: event injection, rate limiting, ANRs, testing, optimization, etc.

Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
2010-06-13 17:42:16 -07:00
Romain Guy
2d6145993e Move OpenGL support out of ViewRoot into a new HardwareRenderer class.
Change-Id: Iffaed924a5defc3c4df26223c390dc27eee115b1
2010-06-09 18:27:08 -07:00
Christopher Tate
7c5ded5d36 am 8207e2fd: am a8ebe8b3: am df2e2eff: Merge "Watchdog now records kernel stacks when it fires" into froyo 2010-06-06 12:14:03 -07:00
Christopher Tate
a8ebe8b3f5 am df2e2eff: Merge "Watchdog now records kernel stacks when it fires" into froyo
Merge commit 'df2e2eff9446c0220515fa7aab7857135e04e12e' into kraken

* commit 'df2e2eff9446c0220515fa7aab7857135e04e12e':
  Watchdog now records kernel stacks when it fires
2010-06-06 12:10:08 -07:00
Christopher Tate
ecaa7b41ca Watchdog now records kernel stacks when it fires
The kernel threads are appended to the usual /data/anr/traces.txt file
and dropboxed along with the usual Dalvik stack dumps.

Change-Id: I120f1f5ee54c965efe9ac0c7f40fdef56385f1fa
NOTE: this change depends on the kernel publishing /proc/$PID/stack
2010-06-04 14:55:02 -07:00
Mike Lockwood
755fd61725 Prototype Content Provider support for MTP/PTP devices.
At this point much of the plumbing is in place, but only a few simple queries
are supported.
This is enough to support a proof of concept sample program that navigates
the file hierarchy of a digital camera connected via USB.

Also removed obsolete ptptest host test program.

Change-Id: I17644344b9f0ce1ecc302bc0478c1f3d44a1647f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-01 22:12:44 -04:00
Mike Lockwood
2807df89af Move CursorWindow class from core/jni to libbinder
To allow use of the native CursorWindow class outside of the core framework jni

Change-Id: I72e8dcb91a2c691130c33cdfd9a25d343da1c592
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-28 10:08:21 -04:00
Christopher Tate
fa9e7c05c7 Sketch of Native input for MessageQueue / Looper / ViewRoot
MessageQueue now uses a socket for internal signalling, and is prepared
to also handle any number of event input pipes, once the plumbing is
set up with ViewRoot / Looper to tell it about them as appropriate.

Change-Id: If9eda174a6c26887dc51b12b14b390e724e73ab3
2010-05-06 17:00:54 -07:00
Dianne Hackborn
69969e48f2 First pass at NativeActivity.
This is a rough sketch of the new pure-native API, which you can
use through a NativeActivity in your manifest (no Java code in
the .apk needed!).

Intentionally no docs yet, the API is still being seriously
messed with.  But it works.

Change-Id: I0e916d58a0d159ecaf3689e41834eb8dc681c0c0
2010-05-05 15:17:26 -07:00
Dan Egnor
a40b3a8d98 am c1420832: am 5945579e: Merge "Change TrafficStats to a new JNI implementation." into froyo
Merge commit 'c1420832a8f9c7fa62b143ce63c71062b3969c1b' into kraken

* commit 'c1420832a8f9c7fa62b143ce63c71062b3969c1b':
  Change TrafficStats to a new JNI implementation.
2010-04-08 14:53:06 -07:00
Dan Egnor
2b4abcd0c7 Change TrafficStats to a new JNI implementation.
Also change phone's ConnectionStateTrackers to use it directly,
rather than through the INetStat binder interface.

Bug: 2578938
Change-Id: I8858e2609cbec3be845a0ce5178cb03f67e01b41
2010-04-07 19:06:29 -07:00
Mike Lockwood
00b74270c9 Move files internal to LocationManagerService from framework.jar to services.jar
Change-Id: Iebbfc49b8300ab59730733efdf489ec87ea45a25
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-04 18:44:05 -04:00