10738 Commits

Author SHA1 Message Date
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
Vasu Nori
a5fe776a79 Merge "fix javadoc error which breaks SDK build in gingerbread" into gingerbread 2010-07-19 15:26:39 -07:00
Vasu Nori
345f39a8a3 fix javadoc error which breaks SDK build in gingerbread
Change-Id: I01b90c71e7088f385a73f51144063a2fbe5d466b
2010-07-19 15:25:32 -07:00
Danica Chang
f23682f128 Merge "fixed parsing issue in BluetoothService so that it parses the UUID property correctly" into gingerbread 2010-07-19 13:47:50 -07:00
Danica Chang
7a9de8b425 fixed parsing issue in BluetoothService so that it parses the UUID property correctly
Change-Id: If46fd3ae1a0e6393cd47a8f0dc913cef45e05441
2010-07-19 10:03:13 -07:00
Vasu Nori
5b31498ba1 add video/audio chat-compatibility modes to ContactsContract
Change-Id: Ic0b04017ad4216f1a1c5f07fa9d27e6970ded931
2010-07-17 18:16:31 -07:00
Jeff Brown
ace999b096 Ignore attempts to finish events on unregistered channels.
This is a common race that happens during application shutdown where the window
may be removed before the input event is finished.  The input dispatcher
already recovers from this condition gracefully so there are no benefits to
throwing an exception on the client side.

Bug: 2834068

Change-Id: I53dcc3230464d7f528ac8a1cc9f01b5bb642f428
2010-07-16 15:41:07 -07:00
Hung Dang
b6761e73ce am 28fe43be: Merge "Add the hook which can set the device to connect to wifi and in airplane mode after reboot. This is for the power test." into froyo
Merge commit '28fe43be5c364a8f7f248a5ac05cf832a83737c2' into gingerbread

* commit '28fe43be5c364a8f7f248a5ac05cf832a83737c2':
  Add the hook which can set the device to connect to wifi and in airplane mode after reboot. This is for the power test.
2010-07-16 15:15:44 -07:00
Hung Dang
28fe43be5c Merge "Add the hook which can set the device to connect to wifi and in airplane mode after reboot. This is for the power test." into froyo 2010-07-16 15:13:12 -07:00
Jamie Gennis
5ee65f0d44 Re-use existing Surface objects when reading them from parcels.
This change adds a process-global cache of previously deserialized Surface
objects so that if a Surface object wrapping the same ISurface gets received
again the same Surface can be used.  This is important because the 'tail'
pointer in the SharedBufferClient is stored only on the client side, and needs
to be the same for all the Surface objects wrapping an ISurface instance.  This
solves the problem by making there only be one Surface object wrapping an
ISurface per process.

Change-Id: I4bf0b8787885c56277622fca053022d2bb638902
2010-07-16 13:03:15 -07:00
Yu Shan Emily Lau
ba1348e3c2 Add the hook which can set the device to connect to wifi and in airplane mode after reboot. This is for the power test.
Change-Id: I42527612764252d1c47bd29a2b88d5e3019cfdf9
2010-07-16 12:00:30 -07:00
Jeff Brown
e33348ba54 Fix bug with phantom input windows.
Add dumpsys integration for the native input dispatcher.
Add some InputDevice API stubs.
Add an appendFormat helper method to String8 for printf style
string formatting mainly for debugging purposes.
Use generic ArrayList<WindowState> everywhere in WindowManagerService
to eliminate unnecessary casts all over.

Change-Id: I9d1e3bd90eb7222d10620200477f11b7bfd25e44
2010-07-16 00:02:48 -07:00
Kenny Root
bd623daff1 Undo IMediaContainerService changes
These should be in the next commit and not the previous one.

Change-Id: I8d13fecf3b978ae2e796dc6e10ef3f969b27a0f4
2010-07-15 22:22:57 -07:00
Dianne Hackborn
75a91389f1 Merge "Implement native key pre-dispatching to IMEs." into gingerbread 2010-07-15 22:22:42 -07:00
Dianne Hackborn
2c6081ce35 Implement native key pre-dispatching to IMEs.
This significantly re-works the native key dispatching code to
allow events to be pre-dispatched to the current IME before
being processed by native code.  It introduces one new public
API, which must be called after retrieving an event if the app
wishes for it to be pre-dispatched.

Currently the native code will only do pre-dispatching of
system keys, to avoid significant overhead for gaming input.
This should be improved to be smarted, filtering for only
keys that the IME is interested in.  Unfortunately IMEs don't
currently provide this information. :p

Change-Id: Ic1c7aeec8b348164957f2cd88119eb5bd85c2a9f
2010-07-15 22:05:33 -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
Jeff Brown
c5ed5910c9 Add support for new input sources.
Added several new coordinate values to MotionEvents to capture
touch major/minor area, tool major/minor area and orientation.

Renamed NDK input constants per convention.

Added InputDevice class in Java which will eventually provide
useful information about available input devices.

Added APIs for manufacturing new MotionEvent objects with multiple
pointers and all necessary coordinate data.

Fixed a bug in the input dispatcher where it could get stuck with
a pointer down forever.

Fixed a bug in the WindowManager where the input window list could
end up containing stale removed windows.

Fixed a bug in the WindowManager where the input channel was being
removed only after the final animation transition had taken place
which caused spurious WINDOW DIED log messages to be printed.

Change-Id: Ie55084da319b20aad29b28a0499b8dd98bb5da68
2010-07-15 18:32:33 -07:00
Christopher Tate
b87e22d300 Fix jni registration typo
Change-Id: I930fe00edec4e19f643a6de5b1bfd0d59e0846db
2010-07-15 17:17:54 -07:00
Brad Fitzpatrick
703e5d3c7f StrictMode: avoid an allocation in common case
Make the initialValue() of the ThreadLocal be null, so checking it doesn't
cause one to be created in the case of an RPC call not using StrictMode.

Change-Id: I3ea19ce444a1b3c39a6e53c5cb5d4faf4b07a6c8
2010-07-15 15:46:36 -07:00
Brad Fitzpatrick
0c36c96f2a Merge "StrictMode: batch drop box writes for system apps" into gingerbread 2010-07-15 15:43:03 -07:00
Brad Fitzpatrick
1772c34e53 Merge "StrictMode: gather and return violating stacks in Binder replies" into gingerbread 2010-07-15 15:42:41 -07:00
Brad Fitzpatrick
c4b204bdc4 Merge "More StrictMode work, keeping Binder & BlockGuard's thread-locals in-sync." into gingerbread 2010-07-15 15:42:12 -07:00
Christopher Tate
6cce32b6ad Add native C APIs for working with the Asset Manager
Change-Id: I493b142c4b35e5cc1a1e85283bb5dfb306a6d261
2010-07-15 14:28:21 -07:00
Brad Fitzpatrick
ad13b9807b StrictMode: batch drop box writes for system apps
Change-Id: Iab49c15ecccefea1d36d86271e1ceb37d79e9449
2010-07-15 13:18:05 -07:00
Brad Fitzpatrick
5b747191ff StrictMode: gather and return violating stacks in Binder replies
Now, when Thread A has a strict mode policy in effect and does a
Binder call to Thread B (most likely in another process), the strict
mode policy is passed along, but with the GATHER penalty bit set which
overrides other policies and instead gathers all offending stack
traces to a threadlocal which are then written back in the Parcel's
reply header.

Change-Id: I7d4497032a0609b37b1a2a15855f5c929ba0584d
2010-07-15 13:18:05 -07:00
Brad Fitzpatrick
727de40c6b More StrictMode work, keeping Binder & BlockGuard's thread-locals in-sync.
Change-Id: Ia67cabcc17a73a0f15907ffea683d06bc41b90e5
2010-07-15 13:18:05 -07:00
Steve Howard
d6343c26b8 Merge "Interface support for custom HTTP headers in DL manager" into gingerbread 2010-07-15 12:24:14 -07:00
Scott Main
5352d2378d am 38137d7a: Merge "docs: lots of additions to the resources docs new drawable resources add <merge> and <include> to layout resource update drawable class descriptioons to point to resources guide add ID resource type" into froyo
Merge commit '38137d7a27b037611c70a9d900aa53b4c15563bf' into gingerbread

* commit '38137d7a27b037611c70a9d900aa53b4c15563bf':
  docs: lots of additions to the resources docs
2010-07-15 11:20:32 -07:00
Scott Main
38137d7a27 Merge "docs: lots of additions to the resources docs new drawable resources add <merge> and <include> to layout resource update drawable class descriptioons to point to resources guide add ID resource type" into froyo 2010-07-15 11:16:32 -07:00
Joe Onorato
3a053db284 Merge "The ICU data is no longer compiled directly into the shared library." into gingerbread 2010-07-15 11:08:34 -07:00
Steve Howard
ea9147df00 Interface support for custom HTTP headers in DL manager
* constants for new DB table, keys for including headers in a
  DownloadProvider.insert() call, and new URIs for retrieving headers
* support in DownloadManager to pass headers to the provider
2010-07-15 10:22:50 -07:00
Andrew Stadler
c98e431119 am 468c82e4: Merge "Skip hostname verification when using insecure factory" into froyo
Merge commit '468c82e4be0630de04a50d88602cd8c6bc745962' into gingerbread

* commit '468c82e4be0630de04a50d88602cd8c6bc745962':
  Skip hostname verification when using insecure factory
2010-07-14 22:33:42 -07:00
Dianne Hackborn
ed86eaa730 Merge "Argh oops I didn't mean to delete this." into gingerbread 2010-07-14 17:02:49 -07:00
Jim Miller
9d42c7f75c Merge "Fix 2797185: Re-enable thumbnail generation in framework" into gingerbread 2010-07-14 16:59:52 -07:00
Dianne Hackborn
251fd430c7 Argh oops I didn't mean to delete this.
Change-Id: I3d0877d56f1abab3d0929a086621f4ef1212cecc
2010-07-14 16:56:31 -07:00
Steve Howard
05940b2c04 Merge "Download manager support for file URIs + last modified time" into gingerbread 2010-07-14 11:19:38 -07:00
Dianne Hackborn
1d28f9c0aa Fix docs build.
Change-Id: Ibb8e1e4b18ec1e92e28d354cdcce37676056b348
2010-07-13 20:38:06 -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
Dianne Hackborn
d76b67c340 IME events are now dispatched to native applications.
And also:

- APIs to show and hide the IME, and control its interaction with the app.
- APIs to tell the app when its window resizes and needs to be redrawn.
- API to tell the app the content rectangle of its window (to layout
  around the IME or status bar).

There is still a problem with IME interaction -- we need a way for the
app to deliver events to the IME before it handles them, so that for
example the back key will close the IME instead of finishing the app.

Change-Id: I37b75fc2ec533750ef36ca3aedd2f0cc0b5813cd
2010-07-13 18:36:46 -07:00
Jim Miller
0b2a6d0773 Fix 2797185: Re-enable thumbnail generation in framework
This re-enables thumbnail generation code in the framework
with a few improvements.

In addition to enabling the system to capture thumbnails,
it removes padding from the borders to account for space
overlapped by system widgets (status bar, etc.). Thus,
the contents of the bitmap are only those pixels unique to
the activity.

It also maximizes resolution of the bitmap by capturing the
image in the application's current orientation. In landscape
mode, it captures a bitmap with dimensions w x h.  In portrait,
it captures a bitmap with dimensions h x w. Where w and h are
thumbnail_width and thumbnail_height as defined in dimens.xml.

Though enabled, the change is not currently used in this
branch.  The work is being checked in here to avoid
complicated downstream merges.

Change-Id: Ifc8a4e0075d7d0697d8159589be3816ace31d70c
2010-07-13 18:35:14 -07:00
Steve Howard
adcb697826 Download manager support for file URIs + last modified time
First, in the download manager public API, I'm changing
COLUMN_REQUESTED_TIMESTAMP to COLUMN_LAST_MODIFIED_TIMESTAMP, a field
that already exists in the download manager.  Upon inspection of
existing users of this field, it looks like there are some good use
cases -- for instance, looking at when a download completed.  And if
I'm exposing that timestamp, there's no need to also expose the
requested timestamp.

Second, this change includes support for file URI destinations:

* add DESTINATION_FILE_URI for use by the DownloadManager wrapper
* make DownloadManager use it appropriately

The backend support is in a separate change (since it's in a separate
project).

Also fixing a bug with file URI construction when DownloadManager
fills in COLUMN_LOCAL_URI.

Change-Id: I5bb93a222cd23215c2a03ed9f68d7f140454f7f2
2010-07-13 18:31:41 -07:00
Jeff Brown
fd03582995 Add initial gamepad support.
Change-Id: I0439648f6eb5405f200e4223c915eb3a418b32b9
2010-07-13 17:04:57 -07:00
Brad Fitzpatrick
c0a7e690bf Add Parcel::readExceptionCode() and Parcel::writeNoException()
Add native Parcel methods analogous to the Java versions.

Currently, these don't do much, but upcoming StrictMode work changes
the RPC calling conventions in some cases, so it's important that
everybody uses these consistently, rather than having a lot of code
trying to parse RPC responses out of Parcels themselves.

As a summary, the current convention that Java Binder services use is
to prepend the reply Parcel with an int32 signaling the exception
status:

     0: no exception
     -1: Security exception
     -2: Bad Parcelable
     -3: ...
     -4: ...
     -5: ...

... followed by Parceled String if the exception code is non-zero.

With an upcoming change, it'll be the case that a response Parcel can,
non-exceptionally return rich data in the header, and also return data
to the caller.  The important thing to note in this new case is that
the first int32 in the reply parcel *will not be zero*, so anybody
manually checking for it with reply.readInt32() will get false
negative failures.

Short summary: If you're calling into a Java service and manually
checking the exception status with reply.readInt32(), change it to
reply.readExceptionCode().

Change-Id: I23f9a0e53a8cfbbd9759242cfde16723641afe04
2010-07-13 15:45:18 -07:00
Steve Howard
a270936066 Initial implementation of the download manager public API.
The implementation is in android.net.DownloadManager, which is
obtained through Context.getSystemService().  Right now this class
acts as a simple wrapper on top of the existing DownloadProvider,
exposing a simple interface to a subset of DownloadProvider's
functionality.  There are several TODOs for features that require
changes to the underlying download manager implementation.

Change-Id: I2f26e51b60b6e82af8478ac7ccd895667df095b6
2010-07-13 11:12:16 -07:00
Andrew Stadler
df27c0c262 Skip hostname verification when using insecure factory
If the factory was obtained by calling getInsecure(), calls to
createSocket() should skip hostname verification (along with all of the
other skipped safety checks.)

This change slightly relaxes the too-strict checking that was introduced
in change 7fc93c36ae235115727296780dbc35101622bbd4.

Bug: 2834174
Change-Id: Iab7ef861ad0ca727f82ee8cdb78b89b9e835740d
2010-07-12 15:31:40 -07:00
David Brown
d1af902c21 Merge "Deprecate some status bar icons that now come from the phone app (and shouldn't have been public in the first place.)" into gingerbread 2010-07-12 13:30:58 -07:00
Dianne Hackborn
289b9b6237 Add ANativeWindow API for directly drawing to the surface bits.
Also other cleanup and fixes:

- We now properly set the default window format to 565.
- New APIs to set the window format and flags from native code.
- Tweaked glue for simpler handling of the "destroy" message.
- Um, other stuff.

Change-Id: Id7790a21a2fa9a19b91854d225324a7c1e7c6ade
2010-07-09 16:58:19 -07:00
David Brown
26c679751d Deprecate some status bar icons that now come from the phone app (and
shouldn't have been public in the first place.)

(And since the changed deprecation state is a public API change, I needed
to do "make update-api" as well.)

Change-Id: I803d5a81ad2363561137be5af4f2b8258df758cd
2010-07-09 16:01:25 -07:00
David Brown
2aaa9e9fc5 Merge "Remove some (unused, non-public) phone-related status bar notification icons" into gingerbread 2010-07-09 12:57:39 -07:00
Daniel Sandler
f99e27da0b Merge "Make android:immersive public." into gingerbread 2010-07-09 06:07:51 -07:00