2677 Commits

Author SHA1 Message Date
Mike Lockwood
c4308f01c9 Move USB framework support from android.hardware to android.hardware.usb package
Change-Id: I00fd4f0caaa4aebe48f71c576bb211b5f38bf88d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-01 08:07:20 -08:00
Dianne Hackborn
a6cbf50c76 Merge "Add ParcelFileDescriptor APIs to get raw fd." 2011-02-28 18:36:48 -08:00
Dianne Hackborn
c9119f5034 Add ParcelFileDescriptor APIs to get raw fd.
Change-Id: I66ba72ffffd27237e60c9411453eef950ae62705
2011-02-28 18:03:26 -08:00
Mike Lockwood
c93f67c2b7 Merge "Add platform features for USB host and USB accessory support." 2011-02-28 17:05:12 -08:00
Mike Lockwood
fae640b174 Merge "UsbManager: Enhancements for managing USB devices and accessories" 2011-02-28 17:04:23 -08:00
Mike Lockwood
f4ca247158 Add platform features for USB host and USB accessory support.
Also removed config_hasUsbHostSupport framework resource, which is now obsolete.

Change-Id: I6f18cc1c4f68085de8b8363e1b5edff79aff404f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-28 17:00:46 -08:00
Mike Lockwood
02eb8746de UsbManager: Enhancements for managing USB devices and accessories
When a USB device or accessory is connected, the UsbService now asks the
user which application to associate with the device or accessory.
Applications interested in devices or accessories must specify the
devices they work with via meta-data attached to their manifest.
Permission to communicate with the device is assigned when the user chooses
the activity to use for the device.
The user has the option of clicking the "always use this application" checkbox
to make the assignment automatic in the future.
The user may later clear this preference and revoke permission for an application
to have permission to communicate with the device by clicking the "Clear defaults"
button for the activity in the Manage Applications panel in Settings.

Added class UsbResolveActivity (a subclass or ResolveActivity for choosing
an activity for a USB device or accessory)

Added UsbDeviceManager, which manages the mapping between USB devices/accessories
and applications, including default applications for devices and accessories,
and manages application permissions.

Add interface to allow Settings to clear device and accessory
preferences and permissions for an application.

Remove obsolete ACCESS_USB permission.

Add new signatureOrSystem MANAGE_USB permission to allow administrating
preferences and permissions.

Moved UsbService.java to a "usb" subdirectory, along with new classes
UsbResolveActivity and UsbDeviceManager.

Change-Id: I92554381e9779e68ce380daaee4e1401fb875703
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-28 17:00:45 -08:00
Adam Cohen
9611f2ea6c Small change to AppWidgetProviderInfo public field name and docs
Change-Id: Ia799cfc1824ccee1f7fd041ae8ecaa1a0395c3f6
2011-02-28 14:53:09 -08:00
Jeff Brown
8f34567c71 Add scroll wheel support to TextView.
Change-Id: I6e4258c50b0d754dccf07266ff4b2abcbccd733a
2011-02-26 13:35:35 -08:00
Jeff Brown
42c5eec0ce Merge "Add support for mouse hover and scroll wheel." 2011-02-25 17:28:50 -08:00
Jesse Wilson
affe40af3c Merge "Callback on any removal, not just evictions." 2011-02-25 17:15:44 -08:00
Glenn Kasten
506b70c17b Merge "Revert the 11.xml part of bug 3438513" 2011-02-25 17:10:00 -08:00
Jesse Wilson
7db1b40a03 Callback on any removal, not just evictions.
Don't hold locks while running create or remove callbacks. That gets a bit
ugly because it means a create could be unwanted by the time it returns.

Change-Id: I14b2b3ed41a446750f8ee5a7e35cb8d801c4ce6d
http://b/3461302
2011-02-25 17:06:34 -08:00
Jeff Brown
33bbfd2232 Add support for mouse hover and scroll wheel.
Dispatch ACTION_HOVER_MOVE and ACTION_SCROLL through the View
hierarchy as onGenericTouchEvent.  Pointer events dispatched
this way are delivered to the view under the pointer.  Non-pointer
events continue to be delivered to the focused view.

Added scroll wheel support to AbsListView, ScrollView,
HorizontalScrollView and WebView.  Shift+VSCROLL is translated
to HSCROLL as appropriate.

Added logging of new pointer events in PointerLocationView.

Fixed a problem in EventHub when a USB device is removed that
resulted in a long stream of ENODEV errors being logged until INotify
noticed the device was gone.

Note that the new events are not supported by wallpapers at this time
because the wallpaper engine only delivers touch events.

Make all mouse buttons behave identically.  (Effectively we only
support one button.)

Change-Id: I9ab445ffb63c813fcb07db6693987b02475f3756
2011-02-25 17:06:07 -08:00
Dianne Hackborn
d752c3b3e6 Merge "Implement issue #3426299: Introduce application "stopped" state" 2011-02-25 16:15:27 -08:00
Adam Cohen
d2e20de64b Adding framework support for resizable widgets
-> Added resizeMode to the widget xml
-> Fixed an unexposed bug in AppWidgetHost where
   minWidth and minHeight were never being converted
   from complex type to dp

Change-Id: Ibbc4fc6542d095623ac2a40694b6a3dbfeb279ad
2011-02-25 15:10:40 -08:00
Dianne Hackborn
e7f972122d Implement issue #3426299: Introduce application "stopped" state
The package manager now keeps track of whether an application is
stopped.  There are new intent flags to control whether intent
filters in a stopped application will match the intent.  This is
currently used in one place, sending broadcasts, so that stopped
apps can not be launched due to background processes.

The package manager during first init makes sure no applications
are in the stopped state.  When new applications are installed,
that begin in the stopped state.  When the activity manager is
launching a component of an application, it ensures the application
is taken out of the stopped state.

The "force stop" button in manage applications will now put an
application back in to the stopped state; it can't go back out
of the stopped state until one of its components is launched by
the activity manager.

There will probably be a few more places where we need to filter
stopped applications out of intent matches, but doing this for
broadcast is a very big first step.

This also introduces a new broadcast that is sent to an application
after it is replaced with a new .apk.  But only if the app is not
in the stopped state.  This makes it a lot easier for developers to
implement code to get their application back in proper running shape
after an upgrade.

Finally another new broadcast is added that is sent to a package's
installer at the first time it is launched.  This allows the installer
to tell the package about it being installed only when it is first
actually used.

Change-Id: I589c53ff0e0ece868fe734ace4439c0d202dca2d
2011-02-25 14:46:27 -08:00
Chet Haase
a00f3865f5 Add ViewPropertyAnimator for easy animation of View properties
Change-Id: I2bc52ca16507d8d20004d2d6823e587791272aac
2011-02-25 06:47:53 -08:00
Jesse Wilson
50fc0e5c1b Merge "Remove default constructors from static utility classes." 2011-02-24 19:37:00 -08:00
Svetoslav Ganov
30b1fe07a7 Merge "Exposing the CalendarView of the DatePicker." 2011-02-24 16:48:38 -08:00
Romain Guy
a5364ee894 Add an API to control the distance between a View and its camera.
Change-Id: Ibaf4e7dc827933f7ad2bb7ab50c1dcef45fee83c
2011-02-24 16:49:47 -08:00
Svetoslav Ganov
5f3f6ce154 Exposing the CalendarView of the DatePicker.
bug:3272194

1. Added a getter to DatePicker.

Change-Id: If0c7fee4ab5f6abf6b12a02dbd5d519c00683115
2011-02-24 15:36:19 -08:00
Mike Lockwood
b607b884bd Merge "UsbManager: Remove redundant Intent extras from USB device and accessory broadcasts" 2011-02-24 14:05:02 -08:00
Jesse Wilson
a0f8bc51af Remove default constructors from static utility classes.
Change-Id: Id8dc55a30a03e1da87500b66c429de9268033b9e
http://b/3344646
2011-02-24 10:46:22 -08:00
Kristian Monsen
256d603d11 Merge "Hiding deprecated classes and methods" 2011-02-24 08:02:34 -08:00
Romain Guy
47b8adec39 Add a new Camera API to control the camera's location
Change-Id: Id9a082d2def803eb527e1987875e0d8a22c6e8aa
2011-02-23 19:51:42 -08:00
Kristian Monsen
f0d9731313 Hiding deprecated classes and methods
These have been deprecated for more than a yearm so hiding them.

Note that this CL was approved in honeycomb, but moved to MR1:
https://android-git.corp.google.com/g/#change,89487
2011-02-23 23:07:42 +00:00
Mike Lockwood
188d00b07e UsbManager: Remove redundant Intent extras from USB device and accessory broadcasts
These extras are also accessable via the UsbDevice and UsbAccessory classes,
which are also included as extras.
Since you can't filter Intents based on extras there is no point in duplicating
this information as separate extras.

Change-Id: I4c8d1e70d66023a1800b3f8f06118898da6b37af
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-23 13:14:33 -08:00
Leon Scroggins
af5b406ad6 New flag to open intent in a new tab.
Bug:3405773

Change-Id: I363bfbfee90e98cd1e6a57452e599a79637a8555
2011-02-23 10:46:35 -05:00
Gilles Debunne
b153bc9d55 Merge "Cursor background attribute made public" 2011-02-22 13:57:36 -08:00
Jeff Brown
cc0c159e9b Add new hover move action and scroll wheel plumbing.
Added support for tracking the mouse position even when the mouse button
is not pressed.  To avoid confusing existing applications, mouse movements
are reported using the new ACTION_HOVER_MOVE action when the mouse button
is not pressed.

Added some more plumbing for the scroll wheel axes.  The values are
reported to Views but they are not yet handled by the framework.

Change-Id: I1706be850d25cf34e5adf880bbed5cc3265cf4b1
2011-02-19 06:14:21 -08:00
Jeff Brown
6f2fba428c Add new axes for joysticks and mouse wheels.
Added API on InputDevice to query the set of axes available.
Added API on KeyEvent and MotionEvent to convert keycodes and axes
to symbolic name strings for diagnostic purposes.
Added API on KeyEvent to query if a given key code is a gamepad button.
Added a new "axis" element to key layout files to specify the
mapping between raw absolute axis values and motion axis ids.
Expanded the axis bitfield to 64bits to allow for future growth.
Modified the Makefile for keyboard prebuilts to run the keymap
validation tool during the build.
Added layouts for two game controllers.
Added default actions for game pad button keys.
Added more tests.
Fixed a bunch of bugs.

Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
2011-02-19 05:23:10 -08:00
Gilles Debunne
363d4913cb Cursor background attribute made public
Since MR1 will get a new API number.

New section in public. Assumed MR1 will be version 3.1

Change-Id: I42d33d17abd6f828ece18a2c774acf341a47c321
2011-02-18 16:16:34 -08:00
Adam Powell
4afd62b18c Add an API to listen for window attach/detach events on a View.
Fix bug 3312949 - inconsistent state in MenuPopupHelper

Change-Id: Ie802ada3f8de4cf71c92fcc7c6abce9ba85e7b75
2011-02-18 15:03:20 -08:00
Chung-yih Wang
6166bacbb0 Merge "Make SIP AuthName APIs public." 2011-02-17 18:29:38 -08:00
Dianne Hackborn
51510388ee Merge "Rework thumbnail API to not suffer from IPC failures." 2011-02-17 12:14:33 -08:00
Chung-yih Wang
9e25df4463 Make SIP AuthName APIs public.
bug:3326867
Change-Id: I766e6e28f6ad3e84de2c9e24850d472ad00271cc
2011-02-17 15:06:08 +08:00
Jeff Brown
45708bf2f0 Merge "Add support for arbitrary axes in MotionEvents." 2011-02-16 20:00:21 -08:00
Dianne Hackborn
d94df45b3d Rework thumbnail API to not suffer from IPC failures.
Thumbnails are now requested separately, so we don't exceed the
IPC buffer size limit.

Also implement issue #3349553: Please provide a hook to intercept
fragment-breadcrumb clicks

And maybe fix issue #3439199: Music Notification does not turn on
when app switching out of Music app

Change-Id: Ie939e78cc8ded07b18112760e053185947549f61
2011-02-16 18:53:31 -08:00
Irfan Sheriff
88083d4f2b Merge "Make high performance wifi lock public" 2011-02-16 18:18:10 -08:00
Jesse Wilson
f7f9d9c39d Expose an API to get a bitmap's size in bytes.
Change-Id: I960c3b02b1ba8d3a8d92aaa98955a159e6f3a228
http://b/3184897
2011-02-16 17:50:43 -08:00
Irfan Sheriff
652bc96444 Make high performance wifi lock public
gtalk and sip already use the high perf lock. Improve
the comments and make the constant public.

This will allow applications that use voice or video
to keep the connection good even when device screen
is off

Change-Id: I3608cd478175c773bd835b26a686a61b8baf5471
2011-02-16 14:28:45 -08:00
Brian Carlstrom
7343bb5f1d Merge "Deprecate non-X509Certificate SslCertificate constructors" 2011-02-16 12:56:36 -08:00
Brian Carlstrom
cc687c52a0 Deprecate non-X509Certificate SslCertificate constructors
Change-Id: I45541c48b321fbd6054712c08d8ac64108d32674
2011-02-16 12:50:56 -08:00
Mike Lockwood
984dd8a206 Merge "UsbManager: New APIs for USB accessories" 2011-02-16 12:42:35 -08:00
Andy Stadler
b84133740a am 04ddff69: am b1835085: Merge "@hide DPM global proxy settings" into honeycomb
* commit '04ddff6905a72d0d39d791eaba33546fb66b15a6':
  @hide DPM global proxy settings
2011-02-16 12:22:57 -08:00
Andy Stadler
d26727273d @hide DPM global proxy settings
They don't work as advertised, so remove from SDK.

Bug: 3460938

Change-Id: I87f80ebf38b228a4085630f1c2526c1d86b93dd7
2011-02-16 10:53:33 -08:00
Mike Lockwood
9182d3c4eb UsbManager: New APIs for USB accessories
USB accessories are peripherals that connect to android devices as a USB host.

When connected, the accessory will first identify itself to the android device
by sending manufacturer, product, accessory type and version strings
to the device, and then request the device to enter USB accessory mode.
The device will then enable the USB accessory kernel driver and disable
all other USB functionality except possibly adb
(adb can be used while the android device is connected to the PC
and the PC is running software that emulates a USB accessory)

The class android.hardware.UsbAccessory is used to describe the
currently attached USB accessory.
UsbAccessory contains the manufacturer, product, accessory type
and version strings to identify the accessory.
The accessory can be opened as a ParcelFileDescriptor, which can be used
to communicate with the accessory over two bulk endpoints.

The Intents UsbManager.USB_ACCESSORY_ATTACHED and
UsbManager.USB_ACCESSORY_DETACHED are broadcast when accessories are
connected and disconnected to the device.  The USB_ACCESSORY_ATTACHED
contains a UsbAccessory object for the attached accessory as an extra.
The Intent also contains string extras for the manufacturer, product,
accessory type and version strings to allow filtering on these strings.

Change-Id: Ie77cbf51814a4aa44a6b1e62673bfe4c6aa81755
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-16 08:25:16 -05:00
Jeff Brown
91c69ab015 Add support for arbitrary axes in MotionEvents.
This change makes it possible to extend the set of axes that
are reported in MotionEvents by defining new axis constants.

The MotionEvent object is now backed by its C++ counterpart
to avoid having to maintain multiple representations of the
same data.

Change-Id: Ibe93c90d4b390d43c176cce48d558d20869ee608
2011-02-15 19:14:37 -08:00
satok
9c4cc03a35 Add a method to check a string contained in ExtraValue of InputMethodSubtype
Change-Id: I34390537eaacd3ff8cfd336eaf5b9ca0d3e4b802
2011-02-15 17:53:58 +09:00