remove old sensor service and implement SensorManager
on top of the new (native) SensorManger API.
Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
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
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.
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
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
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
* 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
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
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
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
Merge commit '38137d7a27b037611c70a9d900aa53b4c15563bf' into gingerbread
* commit '38137d7a27b037611c70a9d900aa53b4c15563bf':
docs: lots of additions to the resources docs
* 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
Merge commit '468c82e4be0630de04a50d88602cd8c6bc745962' into gingerbread
* commit '468c82e4be0630de04a50d88602cd8c6bc745962':
Skip hostname verification when using insecure factory
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
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
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
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
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
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
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
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