15059 Commits

Author SHA1 Message Date
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
Jeff Brown
12511f64a0 Merge "Fix a regression matching intents when action doesn't matter." 2011-02-26 16:07:51 -08:00
Jeff Brown
239f77d20a Fix a regression matching intents when action doesn't matter.
Bug: 3482199
Change-Id: I0960e4396f4e71e9a3fc71146730030a52f96e9f
2011-02-26 16:03:48 -08:00
Jeff Brown
d17247164b Make SHIFT+Backspace be forward delete.
Bug: 3416383
Change-Id: I8f20a6793abd15741aff222edcfe33f7019b9095
2011-02-26 14:58:04 -08:00
Jeff Brown
8f34567c71 Add scroll wheel support to TextView.
Change-Id: I6e4258c50b0d754dccf07266ff4b2abcbccd733a
2011-02-26 13:35:35 -08:00
Mike Lockwood
5053124827 KeyguardManager: Fix copy & paste error in isKeyguardLocked()
Change-Id: If5145e8483d3736d73698b3deb189f2253015543
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-26 11:23:49 -05:00
Jesse Wilson
15b07f4c6b Merge "Handle rename of LruCache.entryEvicted to entryRemoved" 2011-02-25 17:55:00 -08:00
Jeff Brown
42c5eec0ce Merge "Add support for mouse hover and scroll wheel." 2011-02-25 17:28:50 -08:00
Jesse Wilson
32c80a27da Handle rename of LruCache.entryEvicted to entryRemoved
Change-Id: I50e5a8d8c35c4431f42c7483172447ba0e4e125b
http://b/3461302
2011-02-25 17:28:41 -08:00
Jesse Wilson
affe40af3c Merge "Callback on any removal, not just evictions." 2011-02-25 17:15:44 -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
Chet Haase
53c7b1d544 Merge "ViewPropertyAnimator cancels prior animations" 2011-02-25 16:02:34 -08:00
Adam Cohen
54a351ed62 Merge "Adding framework support for resizable widgets" 2011-02-25 15:28:29 -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
Winson Chung
541466f6d6 Merge "Fixing issue where RemoteViewsService.onDestroy() was never being called." 2011-02-25 14:30:37 -08:00
Jaikumar Ganesh
63a2e62a39 Merge "Unset device trust state before unpairing." 2011-02-25 14:25:16 -08:00
Jaikumar Ganesh
cc2c06656c Unset device trust state before unpairing.
a) Device is trusted.
b) Device is unpaired.
c) We need to set the trusted value before unpairing.

Else on the next pairing, the device will be trusted automatically
and we will not show the PBAP authentication dialog.

Change-Id: I8d7c962688885885d37be341e5494069294eb392
2011-02-25 14:16:27 -08:00
Winson Chung
84bbb02021 Fixing issue where RemoteViewsService.onDestroy() was never being called.
Change-Id: I15ad04eee18bc3e09d4846c7f2f2d2d8d168e518
2011-02-25 14:06:47 -08:00
Gilles Debunne
0277c17128 Merge "Code clean-up around ScrollView." 2011-02-25 13:48:19 -08:00
Gilles Debunne
05b5590281 Merge "Removed ViewTreeObserver in TextView when handles are hidden" 2011-02-25 13:47:37 -08:00
Svetoslav Ganov
bc006dc0aa am dc365a36: Merge "resolved conflicts for merge of 66edf2bb to honeycomb-plus-aosp" into honeycomb-plus-aosp
* commit 'dc365a36dac50bccc1411c37839513daec56d335':
  Use different version of CLDR data in DatePicker
2011-02-25 12:45:53 -08:00
Chet Haase
ba592d2003 ViewPropertyAnimator cancels prior animations
The initial approach of VPA was to cancel previous animations
on the same exact set of properties. This worked in most cases,
but if the new animation had a different set of properties
(like animating alpha, x, and y instead of just x and y), then
there was a possible artifact as the old animation continued to
run in the background and could show the button in the wrong
location as a result.

The new approach is to search all running animations for
a property when a new animation is requested on it and to
remove that property from the list of properties being animated
by that previous animation. The prior animations continue to
run, but will no longer update that property, which will now be
controlled solely by the new animation requested.

Change-Id: Ib35d54a5e91be0a1310725be6e2acbaa6ead4a4e
2011-02-25 12:44:42 -08:00
Svetoslav Ganov
f114809031 resolved conflicts for merge of 66edf2bb to honeycomb-plus-aosp
Change-Id: I687ca9b7873890e3b30da16d5dde6b57ce92f0d6
2011-02-25 12:39:59 -08:00
Gilles Debunne
2ed2eacd7e Code clean-up around ScrollView.
Change-Id: Ia110f30279a93c96741e9afbd93ed6231aa97ef1
2011-02-25 11:01:49 -08:00
Gilles Debunne
b7012e841c Removed ViewTreeObserver in TextView when handles are hidden
terminate method is no longer needed since handles are popupWindow
which have their own fade-out animations.

Change-Id: I8354f78ece2ffe9c098ef2f02f0d637fc4c813c0
2011-02-25 11:00:11 -08:00
Shimeng (Simon) Wang
56d9353195 Merge "Make sure pinch zoom and overview scale are within limits" 2011-02-25 10:37:33 -08:00
Leon Scroggins
675ad891b6 Merge "Comment clean up." 2011-02-25 08:21:23 -08:00
Leon Scroggins
31cb0bedc6 Comment clean up.
Bug:3405773
Change-Id: I225cccc637dd0652af2ce58072beac32e56088c7
2011-02-25 10:53:50 -05:00
Chet Haase
a00f3865f5 Add ViewPropertyAnimator for easy animation of View properties
Change-Id: I2bc52ca16507d8d20004d2d6823e587791272aac
2011-02-25 06:47:53 -08:00
Peter Visontay
11f4ae76f0 Removed launch count increase API from Applications.
Bug: 3431684
Change-Id: I5bcf8fc6c917cc0ec60302a6c994e4e47b77c357
2011-02-25 12:37:33 +00:00
Wu-cheng Li
0c74819b76 Merge "Improve camera getSupportedPreviewFormats javadoc." 2011-02-25 01:36:56 -08:00
Svetoslav Ganov
66edf2bb3f am 9e5b1a49: Merge "Use different version of CLDR data in DatePicker" into gingerbread
* commit '9e5b1a49022d08aee8653fd34f3a8cd878618aa5':
  Use different version of CLDR data in DatePicker
2011-02-25 00:09:03 -08:00
Svetoslav Ganov
9e5b1a4902 Merge "Use different version of CLDR data in DatePicker" into gingerbread 2011-02-24 23:56:52 -08:00
Wink Saville
ee4d1a6708 Merge "LTE Changes for Telephony including Multiple PDN support and IPV6 support" 2011-02-24 22:08:41 -08:00
Wu-cheng Li
f9293e7d50 Improve camera getSupportedPreviewFormats javadoc.
bug:3463624
Change-Id: I4151fc7821e9648c6429acca53582f11f35f8813
2011-02-25 13:35:10 +08:00
Jeff Hamilton
098f05e0e2 am 09979bcf: am fd34aa8e: am 5644d0e1: Support for NDEF on iCODE.
* commit '09979bcf730e7df033ab0d8cadf564873c7e624b':
  Support for NDEF on iCODE.
2011-02-24 20:45:27 -08:00
Jeff Hamilton
09979bcf73 am fd34aa8e: am 5644d0e1: Support for NDEF on iCODE.
* commit 'fd34aa8e1386547bcfbaf043f26c054946b92c2b':
  Support for NDEF on iCODE.
2011-02-24 20:43:15 -08:00
Jeff Hamilton
fd34aa8e13 am 5644d0e1: Support for NDEF on iCODE.
* commit '5644d0e18ad847b66a8cb4f185cb28edebe75d88':
  Support for NDEF on iCODE.
2011-02-24 20:30:14 -08:00
Jeff Hamilton
5644d0e18a Support for NDEF on iCODE.
Change-Id: I9ce2ee5e739d34a9047ca494315cbc54b30fefb8
2011-02-24 22:03:20 -06:00
Jesse Wilson
50fc0e5c1b Merge "Remove default constructors from static utility classes." 2011-02-24 19:37:00 -08:00
Wink Saville
2b8bcfe5b7 LTE Changes for Telephony including Multiple PDN support and IPV6 support
Added init for CDMAPhone.java

Change-Id: I2392b5ad3382ee1993537b8477ef00dd036c6fe9
2011-02-24 18:23:36 -08:00
Adam Powell
78b1dc594e Merge "Ensure WebView passes a complete/in-order event stream to ScaleGestureDetector. Prerequisite for several ScaleGestureDetector bugfixes." 2011-02-24 17:19:20 -08:00
Shimeng (Simon) Wang
61bb911938 Make sure pinch zoom and overview scale are within limits
issue: 3482463
Change-Id: I9d746883c03326bdfa7fb0373ffadfbc75f69087
2011-02-24 17:15:46 -08:00
Svetoslav Ganov
30b1fe07a7 Merge "Exposing the CalendarView of the DatePicker." 2011-02-24 16:48:38 -08:00
Svetoslav Ganov
d5623fab34 Merge "The NumberPicker input cotrols are somtimes not shown." 2011-02-24 16:48:26 -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
Jaikumar Ganesh
7d4da25c5c Merge "Refactor android.server.BluetoothService classes." 2011-02-24 16:34:37 -08:00