11825 Commits

Author SHA1 Message Date
Jeff Brown
39bc6197ba Never drag scroll views with no children. (DO NOT MERGE)
Fixes a regression from Froyo.  Previously, when a scroll view
had no children, its onTouchEvent would return because the scroll
view would only start dragging if the user touched one of its children.
In Gingerbread, the user can drag from anywhere within the scroll
view, not just by touching a child.  However, it makes no sense
to drag a scroll view that has no children so an empty scroll view
should just ignore touches like any other empty view group would.

This change fixes applications that for some reason or other happen
to have empty scroll views in strange places.

Bug: 3246230
Change-Id: I76c6136d3cd74968983033014d60deec1718ce30
2011-01-19 11:20:46 -08:00
Nick Pelly
a8ca533d34 Fix javadoc which broke build.
Change-Id: Ie3cac9bec04e80defae44ba02086ad0cdfd301a9
2011-01-18 17:07:05 -08:00
Nick Pelly
e4dd154c08 Merge "hange the default IsoDep timeout to 300ms (docs update)." into gingerbread 2011-01-18 16:11:14 -08:00
Mathias Agopian
12d014fdf4 Merge "fix [3355413] Gyro calls onAccuracyChanged and reports accuracy as UNRELIABLE" into gingerbread 2011-01-18 16:10:08 -08:00
Martijn Coenen
cbec3fb285 hange the default IsoDep timeout to 300ms (docs update).
Change-Id: I4fe5a6bf9fd42a28c9619e6e0bf11885bcc43f91
2011-01-18 15:35:14 -08:00
Jeff Brown
41395459e6 Merge "Filter virtual keys after touches. (DO NOT MERGE)" into gingerbread 2011-01-18 14:31:31 -08:00
Martijn Coenen
07e6f616d1 Check NDEF before calling makeReadOnly().
Change-Id: Iadbaf5c29821eff78ad487b248af529febcdc4ce
2011-01-18 11:35:46 -08:00
Martijn Coenen
a701cf85a0 Implement IsoDep timeout handling (API).
Added a method for setting the timeout on IsoDep transactions.

Change-Id: Ie627e7a826556e46295fefe69b9be83ebf911d93
2011-01-18 11:35:46 -08:00
Jeff Hamilton
0716ea144d Merge "Javadoc updates for NFC." into gingerbread 2011-01-18 11:01:55 -08:00
Jeff Hamilton
3a223404e7 Merge "New APIs for NDEF Push Protocol." into gingerbread 2011-01-18 11:01:05 -08:00
Jeff Hamilton
ce3224cda5 Javadoc updates for NFC.
Change-Id: Ibd91829979576297599fbcc9eb8054924af1d527
2011-01-18 10:57:30 -08:00
Kenny Root
34d2b41e48 Revert "Add the {get,set}PackageObbPaths calls to API"
This reverts commit 6c4d904851772313930f800ac7c323cf90c709bb.

Going with a different tactic that doesn't dump stuff on
PackageManagerService.

Bug: 3214719
Change-Id: I0bbeccf3c21d264deda4256eb53713d2c98284f4
2011-01-17 11:49:22 -08:00
Jeff Hamilton
33ff240558 New APIs for NDEF Push Protocol.
The NPP is only usable by the foregorund
activity to prevent dispatching confusion
on the far end.

Change-Id: I08475a52083fd7f81b79b7fe2faf4e126121a809
2011-01-17 08:07:24 -08:00
Mathias Agopian
c2b4e21320 fix [3355413] Gyro calls onAccuracyChanged and reports accuracy as UNRELIABLE
- make sure to call onAccuracyChanged only when it actually changes
- only call onAccuracyChanged on Magnetic and Orientation sensors, which
  are the only ones to support it.
- for other sensors, call onAccuracyChanged only once with the
  SENSOR_STATUS_ACCURACY_HIGH value

Change-Id: Ic861e3d48d3b98dab74ffebe2746576f5b69f371
2011-01-16 19:11:20 -08:00
Jim Miller
6687ecb447 Merge "Fix 3106227: use WeakReferences for receivers in DigitalClock class" into gingerbread 2011-01-16 16:14:52 -08:00
Nick Pelly
b73203ab7e Merge "Make sure service handles are live before passing to other objects." into gingerbread 2011-01-14 18:18:25 -08:00
Jim Miller
8b886fab54 Fix 3106227: use WeakReferences for receivers in DigitalClock class
This works around a bug in the framework where LockScreen wouldn't
get GC'd under certain circumstances which would lead to an OOM
crash.  It now uses WeakReferences for observers inside the
DigitalClock container class and unregisters them if the containing
DigitalClock goes away.

Also removed mLive variable which was unused and could potentially
leak the receivers.

Left mAttached for debugging so we can use it to determine if the
calls to onAttachToWindow() and onDetachFromWindow() are grossly
unbalanced which may be the root cause of the original problem.

Have cleanUp() explicitly clear unused references to make
tracing through hprof references easier.

Change-Id: I99a7e0c356001b05eab5aa729564553666febfea
2011-01-14 18:01:12 -08:00
Jaikumar Ganesh
a788a94309 Merge "Do Not Merge: Expose insecure rfcomm Bluetooth API." into gingerbread 2011-01-14 16:11:41 -08:00
Dianne Hackborn
29c99aaaae Merge "Added check to make orientation calculations more robust" into gingerbread 2011-01-14 15:36:26 -08:00
Jaikumar Ganesh
a3363ef2cd Do Not Merge: Expose insecure rfcomm Bluetooth API.
This complements the secure rfcomm API.
The link key is unauthenticated and is subject to MITM attacks.
The link key may be encrypted depending on the type of Bluetooth device.
This helps apps which don't need the extra security or
have their own security layer built on top of the rfcomm link.

Bug: 3352266

Change-Id: I633fd0372e5e23288d6fec950dd1abc2896031f1
2011-01-14 13:24:03 -08:00
Niclas Kellgren
a1454becb9 Added check to make orientation calculations more robust
Added check avoid a division by zero resulting in NaN which in turn
makes checkFullyTilted to ignore high tilt angles from then on.
If (x, y, z) == (0, 0, 0) then there is no tilt or rotation and
this vector must be ignored. This check is extended to ignore all
small acceleration values where noise can be of big influence.

Low or zero readings can happen when space travelling free falling,
but more commonly when shaking or getting bad readings from the sensor.
The accelerometer is turned off when not used and polling it too soon
after it is turned on may result in (0, 0, 0).

Change-Id: I19aec653abb8ab6f7126778035c8c96449f1326f
2011-01-14 11:14:03 -08:00
Eric Fischer
5a40b8ef81 Merge "Add date format and map center resources for new locales." into gingerbread 2011-01-13 13:08:18 -08:00
Jeff Hamilton
52d3203ef6 Add dispatching overrides for foreground apps.
Apps can register to override the default dispatching
but only when they're in the foreground.

Change-Id: I8e9a9254d3f79f097fb3c8c677d806043574ba4d
2011-01-13 14:24:07 -06:00
Wei-Ta Chen
61d9ffbfd8 Merge "Do not merge." into gingerbread 2011-01-13 12:02:32 -08:00
Nick Pelly
253c509cb0 Make sure service handles are live before passing to other objects.
Change-Id: Ia3fa799b56463f313da0e84a50c4dc75d584eaca
2011-01-13 09:22:57 -08:00
Eric Fischer
a74de88e8e Add date format and map center resources for new locales.
Change-Id: I62e7724993c160a11b3ece922a50b7b8ebc06c31
2011-01-12 16:44:09 -08:00
Nick Pelly
a29bf14e1d Merge "New Intent defined for RF ON/OFF events" into gingerbread 2011-01-12 16:28:59 -08:00
daniel_tomas
200ca02fca New Intent defined for RF ON/OFF events
Change-Id: Ie1bc056bd36eb999b4678c594a3edc801a0cf6a1
2011-01-12 16:28:34 -08:00
Kenny Root
e8c04db71e Merge "Add the {get,set}PackageObbPaths calls to API" into gingerbread 2011-01-12 15:03:43 -08:00
Jaikumar Ganesh
c8f42fb698 Merge "DO NOT MERGE: Remove auto connection on ACL connection." into gingerbread 2011-01-12 13:56:13 -08:00
Jaikumar Ganesh
d50ac2966e DO NOT MERGE: Remove auto connection on ACL connection.
There is no need for this and causes problems with certian cars.

Fixes bug: 3281016

Change-Id: Idb65bbd4c8573923ebf82195b828ae071cb20aef
2011-01-12 13:50:06 -08:00
Wei-Ta Chen
25bce3a673 Do not merge.
Backport changes related to BitmapRegionDecoder from HoneyComb to
Gingerbread.

Bug: 3309014

////////////////////////////////////////////////////
This is a combination of 7 commits.
Revert "Do not merge."

This reverts commit f7681f84918c27f6a626681ce37ed2a236c44e82.

Change-Id: I46fd710600b1649773eaea2d9abc2b21a592f9a6

Fix a initialization bug in BitmapRegionDecoder.

Change-Id: I6c1151fd34970a84d4de52d664d9a5dc464892c5

Fix segfault when tring to throw IOException.

Change-Id: I530cc4409ba4ca17cec933afad077c5f60ba554f

Fix 3122139, where previewing an attachment for the second time will
fail.

Use AutoFDSeek to mark and restore the position before we read data from
the descriptor.

Change-Id: I3d4f012dce486e19b113bc90a98b94031cfa8195

Add inPreferQualityOverSpeed into BitmapFactory.Options.

The new field allows a developer to use a more accurate by
slightly slower IDCT method in JPEG decode. This in turns improves the
quality of the reconstructed image.

The field by default is not set and thus does not affect existing
applications.

Bug: 3238925
Change-Id: I93d55b7226e47a43e639325cd1a677694d6f2ee4

Unhide inPreferQualityOverSpeed in BitmapFactory.Options.

The new field allows a developer to use a more accurate by
slightly slower IDCT method in JPEG decode. This in turns improves the
quality of the reconstructed image.

The field by default is not set and thus does not affect existing
applications.

Bug: 3238925

Related changes: https://android-git.corp.google.com/g/#change,83291 and
                 https://android-git.corp.google.com/g/#change,83294

Change-Id: I969f5c413f9b2179454aeb90e18ae8222ee583b4

Correct the API comments.

BitmapRegionDecoder supports PNG as well.
2011-01-11 22:54:10 -08:00
Jeff Brown
6f71d0fedb Filter virtual keys after touches. (DO NOT MERGE)
Adds a new virtualKeyQuietTimeMillis configuration resource that sets
the duration for which virtual keys will be dropped after recent touches
on screen.  The default value is 0; it is intended to be overridden
per device using a resource overlay.

This change is designed to help in two cases:

1. Swipes from touchscreen into virtual key area.
2. Accidental taps in virtual key area while using on-screen keyboard.

Bug: 3089163
Change-Id: Id6733c83c2e2bc8d9553aa0e5c1fd74b741bec6e
2011-01-11 20:56:04 -08:00
Kenny Root
1c6e764275 Allow updated system apps to retain priority
Previously any updated system apps would not be able to have a greater
than 0 priority on an activity intent filter. Moving the priority check
later in the package scanning allows it to apply to updated system
packages as well.

Bug: 2572398
Change-Id: I9fdf7906809518b28b49ffec31afec1442d85d3c
2011-01-11 15:51:46 -08:00
Martijn Coenen
25be536521 Implement canMakeReadonly().
The method is needed since makeReadOnly() only works on T1T/T2T. Also removed
makeLowlevelReadonly(), since NFC forum does not allow setting the CC and the lock
bits separately.

Change-Id: I8e6d7c065b1f017ef07d878c41df05e1a8193f5a
2011-01-10 12:11:33 -08:00
Nick Pelly
9293937619 Merge "Remove attemptDeadServiceRecovery() from TagTechnology's." into gingerbread 2011-01-10 12:02:36 -08:00
Nick Pelly
d64d711d45 Merge "Change Tag.getTechnology(NfcAdapter, int) to NfcAdapter.getTechnology(Tag, int)" into gingerbread 2011-01-10 12:02:26 -08:00
Nick Pelly
3dd6c45853 Remove attemptDeadServiceRecovery() from TagTechnology's.
attemptDeadServiceRecovery() is a hack to recover from NfcService dying. It
should be a rare event, and is only needed in NfcAdapter which is a long-lived
object.

TagTechnology objects are transient, it is acceptable for them to go stale
when NFC service dies. Lets not complicate the code with recovery for a rare
event.

Change-Id: I101350e920b075c680eb4f250683f0a2bb878553
2011-01-10 18:14:41 +11:00
Nick Pelly
b4003bf73e Change Tag.getTechnology(NfcAdapter, int) to NfcAdapter.getTechnology(Tag, int)
The later feels less clumsy.

Change-Id: I50f29aef23d2993dcfd25f4c4f2cb0d77bdc0610
2011-01-10 17:28:03 +11:00
Kenny Root
6c4d904851 Add the {get,set}PackageObbPaths calls to API
Add getPackageObbPaths() and setPackageObbPaths() to the public API.

Bug: 3214719
Change-Id: Icb9f2f92f8c59bb3d31317f609854e81abbd1449
2011-01-09 13:20:28 -08:00
Chris Tate
6ec91731cb DO NOT MERGE : Permission fix: don't require BACKUP perm for self-restores
The public API is not supposed to require the BACKUP permission in order
for an application to restore its own last-known-good backup data.  However,
as currently implemented, BackupManager.requestRestore() [the public API
in question] depends on private Backup Manager methods that *do* enforce
that permission.  The net result is that the method cannot be successfully
used by third party applications: it will throw an exception if attempted.
This CL restructures the permission checking involved.

First, the underlying beginRestoreSession() operation can now be passed a
'null' transport name; if this is done, then the restore session is begun
on whatever the currently-active transport is.  Looking up the name of the
active transport is one of the permission-guarded actions that was required
with the initial implementation.

Second, a package name can now be passed to beginRestoreSession().  If
this is done, then the restore session can only be used to perform a
single-package restore of that one application.  The BACKUP permission is
not required if the caller is tying the restore to its own package name.

In combination, these changes permit BackupManager.requestRestore() to
function without the calling app needing to hold any special permission.
The no-permission case is intentionally quite narrow:  the caller must
hold the permission unless they both (a) pass 'null' for the transport
name, thereby accepting whatever the currently active transport is, and
(b) pass their own package name to restrict the restore session only
to their own app.

External bug http://code.google.com/p/android/issues/detail?id=10094
Internal bug 3197202

(Cherrypick from master to gingerbread)

Change-Id: Ie20b0bd2420345ce6eda178f854680b558f6372a
2011-01-09 12:49:47 -08:00
Dianne Hackborn
433863b108 Fix issue #3333958: Package Manager can sometimes mistakenly think...
...an app is disabled!

Ouch.

Change-Id: I5788c5f8edfe2a0d6f4f0f3359e1742f8ed8d98e
2011-01-09 11:46:27 -08:00
Gilles Debunne
9ffb0a0df3 Merge "Ran fixPngMetaTags on all the core/res assets." into gingerbread 2011-01-06 18:30:26 -08:00
Gilles Debunne
976647841c Merge "Asset cleanup. DO NOT MERGE" into gingerbread 2011-01-06 18:29:59 -08:00
Marco Nelissen
ba77a3f9cb Add support for the "compilation" tag in mp3, mp4 and ogg, and also add
support for two common ways of specifying album artist in ogg files.
b/3311831

Change-Id: Iba1152013b7577168af71f947d7249560419fa05
2011-01-06 15:05:06 -08:00
Nick Pelly
f54ad8daf6 Clean up transceive().
BasicTagTechnology.transceive(byte[] raw) should work for most child classes,
except those that want to disable (raw) transceive.

Current plan is not to add transceiveMifare() etc - use explicit methods
instead.

Add package scoped BasicTagTechnology.transceive(byte[] rata, boolean raw)
as a helper to remove code duplication.

Change-Id: Iaea161022751c99058d291e2ed0f8c475d1c7282
2011-01-07 09:21:23 +11:00
Eric Fischer
06d19ef0a0 Merge "Import translations for additional languages." into gingerbread 2011-01-06 14:11:47 -08:00
Jeff Hamilton
0aea183615 Merge "Make the new NFC APIs public." into gingerbread 2011-01-06 11:28:42 -08:00
Jeff Hamilton
be372d6462 Make the new NFC APIs public.
Change-Id: Ia0acd9759d67683eaf1dc199dc2cc55e16a98e77
2011-01-06 13:18:34 -06:00
Eric Fischer
43c8aa3144 Import translations for additional languages.
Change-Id: I8a30fc0f90e22a5ec8d746aaf4b64776a3274016
2011-01-06 10:29:06 -08:00