3624 Commits

Author SHA1 Message Date
James Dong
029d7e15f3 Hide deprecated MediaRecorder.java APIs
o related-to-bug: 6085208

Change-Id: I6d4d2c20756b317661c94ebe35752a040ece8283
2012-03-12 12:33:10 -07:00
Fabrice Di Meglio
05f692e805 Merge "Make Gravity RTL APIs public" 2012-03-12 10:54:42 -07:00
Fabrice Di Meglio
e8dc07dcdb Make Gravity RTL APIs public
- also move unit tests to CTS
- also small improvement for View Javadoc

Change-Id: I166d5a10f4a00f1b46c90468c8b11906b438e1ea
2012-03-09 17:32:16 -08:00
Fabrice Di Meglio
73ba0df14f Merge "Make Drawable RTL APIs public" 2012-03-09 17:02:56 -08:00
Fabrice Di Meglio
06e1ec6462 Make Drawable RTL APIs public
- also optimize imports

Change-Id: I2649a539a5784293d09179981a5d57e900219246
2012-03-09 16:37:45 -08:00
Svetoslav Ganov
2bff640779 Merge "Adding an announcement type accessibility event and a method on View to announce." 2012-03-09 12:00:13 -08:00
Svetoslav Ganov
51ab90cab1 Adding an announcement type accessibility event and a method on View to announce.
1. The need for sending an accessibility event to announce a context change
   which does not cleanly fit into the existing UI transition UI events has
   come quite a few time in application development. To avoid retrofitting
   accessibility event types that do not semantically match the intent to
   just announce a short message this patch is adding specialized event type.
   Also a helper method on View is added to sheild developers from knowing
   how to construct and send such an event.

bug:5977979

Change-Id: Iaf5f620426f8616be67fbf243a02ad5b606c949b
2012-03-09 11:47:17 -08:00
Adam Powell
d9c7be6cc7 Public API for android.widget.Spinner properties
Bug 6104467

Add properties that can be set/retrieved programmatically to match the
XML attributes available.

Also add resource ID versions of Drawable setters for Switch.

Change-Id: I198cfd9701189ab200c3190f61d18c459b7e4591
2012-03-08 19:49:39 -08:00
Adam Powell
787f2699f1 Merge "Public API for android.widget.Switch properties" 2012-03-08 17:18:10 -08:00
Romain Guy
754682e513 Merge "Fix the build." 2012-03-08 15:41:29 -08:00
Romain Guy
43e8eb1e21 Fix the build.
That's twice today. I am ashamed.

Change-Id: I0ec7ab2b742e8054980a1ab7790c4896da9e2729
2012-03-08 15:40:14 -08:00
Adam Powell
6c86e1ba41 Public API for android.widget.Switch properties
Bug 6104562

Add properties that can be set/retrieved programmatically to match the
XML attributes available.

Change-Id: Ief28e5cad9ec3e6c2d12dd11ff9fa24f22eecec3
2012-03-08 15:12:48 -08:00
Romain Guy
583fcb9175 Merge "Dispatch screen state change events to Views Bug #6120957" 2012-03-08 15:06:50 -08:00
Romain Guy
bb9908b828 Dispatch screen state change events to Views
Bug #6120957

Using this new callback, views can interrupt and resume their
animations or other periodic tasks based on the current state
of the display.

Change-Id: I398f4abd421e9c5f207107bf1009a7b92cf45daa
2012-03-08 15:05:12 -08:00
Dianne Hackborn
21c241e061 Add new Intent API for associating a ClipData with an Intent.
Allows applications to propagate multiple URI grants through an
Intent.

Later on, we should probably redefine the share actions to be
based on this ClipData with the old extras-based approach only
there for compatibility.  Even if we don't do that, though, this
allows you to do a multi-select share that grants multiple URI
permissions by stuffing the URIs in a ClipData.

Also add some documentation in various places telling people how
they can grant URI permissions.

Change-Id: Id4ba8e72c11caf7e1f1f438cb7af058d1586a37c
2012-03-08 14:34:03 -08:00
Fabrice Di Meglio
0c245fb201 Merge "Make more TextView RTL APIs public" 2012-03-08 11:13:27 -08:00
Fabrice Di Meglio
d159109bd8 Make more TextView RTL APIs public
- padding related APIs
- drawable related APIs

Change-Id: If926ba1658431f826153128553f1ff429275f948
2012-03-07 15:34:38 -08:00
Eino-Ville Talvala
d5f0799082 Merge "NEW_API: Rework CameraSound into MediaActionSound, and unhide it." 2012-03-07 13:54:43 -08:00
Dianne Hackborn
5eb37241fe Merge "Work on more low memory reporting to apps." 2012-03-06 19:06:25 -08:00
Dianne Hackborn
27ff913d56 Work on more low memory reporting to apps.
There are now some new trim memory levels that are sent to
non-background applications as RAM becomes low.

There is a new API for an application to retrieve information
about memory trimming and such on demand.

Fixed various checks against the memory trim level to be
robust (not compare against exact values).

Change-Id: Ifd1c6151124350168aef20a94e517166fd2e03eb
2012-03-06 18:46:32 -08:00
Jeff Brown
03bd302aeb Don't close the database until all references released.
SQLiteDatabase.close() should call releaseReference() rather than
closing the database immediately.  SQLiteDatabase should also hold
a reference to itself while performing certain operations to
ensure that they complete normally even if another thread closes
the database at the same time.

Fixed a couple of missing or redundant uses of acquireReference()
related to CursorWindows.

To be honest, the reference counting performed by SQLiteClosable should
not be needed, but we're stuck with it in the API.

Bug: 6104842
Change-Id: I3444a697409905d4a36b56418dc7766f5ba76b59
2012-03-06 16:42:56 -08:00
Eino-Ville Talvala
e69095869c NEW_API: Rework CameraSound into MediaActionSound, and unhide it.
MediaActionSound is a helper class for applications that use the
camera, or include camera-like behavior such as taking
screenshots. This class helps applications match the sound-playing
behavior of the Camera.takePicture, MediaRecorder.start, and
MediaRecorder.stop methods.

This is useful for applications that don't use the above methods, but
still logically capture images or video, such as the panorama capture
feature and the video effects in the platform camera application.

Bug: 5029099
Change-Id: I829f6e2941f167f91f9cb506215b7232cb054958
2012-03-06 16:33:50 -08:00
Jeff Brown
faeac2737d Merge "Change widgets to post invalidate to the animation timer." 2012-03-05 15:38:47 -08:00
Jeff Brown
6cb7b46c56 Change widgets to post invalidate to the animation timer.
Change-Id: I8377e924529fb9d8afd8a834003a17de616e8e87
2012-03-05 15:19:31 -08:00
Jeff Brown
7bcbeb789d Merge "Make SQLiteDatabase final." 2012-03-05 13:38:59 -08:00
Jeff Brown
baefdfad6e Make SQLiteDatabase final.
The SQLiteDatabase constructor is inaccessible so it is not
possible for applications to subclass it.  To remove all possible
remaining temptation to do so, make the class final.

Change-Id: I4148e9b06f0661ec22aab8e45afde38498d2375a
2012-03-05 13:24:02 -08:00
Jeff Sharkey
09c8f48c10 Merge "Report leaked Context registrations to StrictMode." 2012-03-05 10:49:11 -08:00
Jeff Sharkey
eb00769e89 Merge "Allow disk I/O while performing dump()." 2012-03-02 18:07:35 -08:00
Svetoslav Ganov
3ee7ce2be3 Merge "Fixing the build for real." 2012-03-02 14:57:42 -08:00
Svetoslav Ganov
4b3cdbb2cf Fixing the build for real.
Change-Id: I6400e599cdf0d2e94d3ac024b9b32de55b1e3760
2012-03-02 14:56:27 -08:00
Svetoslav Ganov
45e96fd28a Merge "Adding getter/setter for all public attributes in CalendarView." 2012-03-02 13:12:22 -08:00
Jeff Sharkey
e861b42379 Allow disk I/O while performing dump().
Add Closeable to ParcelFileDescriptor, and always close any incoming
PFDs when dumping.

Bug: 6106309
Change-Id: I25b465692d5e1da0a5980a307cb48a058bc2bca7
2012-03-02 12:31:27 -08:00
Alon Albert
e6e47f0517 Merge "Add a displayColor column to view_events" 2012-03-02 11:25:54 -08:00
Jeff Brown
d2cca91e92 Merge "Add an API for deleting databases." 2012-03-02 11:15:41 -08:00
Adam Powell
1a7dd039f1 Unhide transient state APIs on View
Change-Id: I0f14728c94cd3461431352e6f01311934aec9858
2012-03-02 10:44:36 -08:00
Alon Albert
dc927307ec Add a displayColor column to view_events
Change-Id: I0f73685ec75e56929553b01d6ede0ad11fba55f4
2012-03-02 09:43:17 -08:00
Svetoslav Ganov
ff37505cb1 Adding getter/setter for all public attributes in CalendarView.
bug:6094713

Change-Id: Iff4a1d903d597ae8a3d74a4e4734376acca417f3
2012-03-01 21:31:34 -08:00
Jeff Sharkey
d7026f1612 Report leaked Context registrations to StrictMode.
When tearing down any leaked BroadcastReceiver or ServiceConnection
Context registrations, report through StrictMode.

Bug: 6084353
Change-Id: I5e78039299e2c9c1440cd1fd09317da78ffee82a
2012-03-01 21:10:05 -08:00
Jeff Brown
79087e4b96 Add an API for deleting databases.
Add SQLiteDatabase.deleteDatabase to delete a database and all
of its auxiliary files.

This method is also used by Context.deleteDatabase and resolves issues
where auxiliary files would get left behind.

Bug: 5972489
Change-Id: I3633b9b4978972a1d240ac0a9861420ecf989149
2012-03-01 19:56:53 -08:00
Fabrice Di Meglio
dd3ef2c573 Improve RTL APIs
- follow changed / reset pattern

Change-Id: I1c5e9b39196029bd78add2ab13b984da124822ca
2012-03-01 17:34:56 -08:00
Fabrice Di Meglio
ac5a3a1c12 Merge "Make layoutDirection API public" 2012-03-01 16:23:29 -08:00
Fabrice Di Meglio
98aec1c7ef Make layoutDirection API public
Change-Id: Ie125513e4ea72b33b42355dbc43f9b9b6d46d7eb
2012-03-01 16:21:55 -08:00
Jean-Baptiste Queru
7edb9a9490 am f73222a3: am 964955e0: am 8a9b14d8: am 5aeb8587: Merge "DRM framwork bug fix: add an API to release resources"
* commit 'f73222a39e0fa294d9105fd7464943aed6e77cd7':
  DRM framwork bug fix: add an API to release resources
2012-03-01 15:35:39 -08:00
Irfan Sheriff
43d8a95fa8 Merge "Improve Wi-Fi hand-off" 2012-02-29 19:33:06 -08:00
Irfan Sheriff
07573b3249 Improve Wi-Fi hand-off
When Wi-fi connects at L2 layer, the beacons reach and the device
can maintain a connection to the access point, but the application
connectivity can be flaky (due to bigger packet size exchange).

We now use Watchdog to monitor the quality of the last hop on
Wi-Fi using signal strength and ARP connectivity as indicators
to decide if the link is good enough to switch to Wi-Fi as the uplink.

ARP pings are useful for link validation but can still get through
when the application traffic fails to go through and thus not best indicator
real packet loss since they are tiny packets (28 bytes) and have
much low chance of packet corruption than the regular data
packets.

Signal strength and ARP used together ends up working well in tests.
The goal is to switch to Wi-Fi after validating ARP transfer
and RSSI and then switching out of Wi-Fi when we hit a low
signal strength threshold and waiting until the signal strength
improves and validating ARP transfer.

Change-Id: Ica593291ec7772da892f03cf45b649635b730c47
2012-02-29 17:33:36 -08:00
Jean-Baptiste Queru
8a9b14d805 am 5aeb8587: Merge "DRM framwork bug fix: add an API to release resources"
* commit '5aeb85877a95cc12c0784757a9842983b04e8600':
  DRM framwork bug fix: add an API to release resources
2012-02-29 15:44:41 -08:00
Christopher Tate
8662cab5c6 Merge: Introduce UpdateLocks
An "UpdateLock" works similarly to a wake lock in API: the caller is
providing a hint to the OS that now is not a good time to interrupt
the user/device in order to do intrusive work like applying OTAs.
This is particularly important for headless or kiosk-like products
where ordinarily the update process will be automatically scheduled
and proceed without user or administrator intervention.

UpdateLocks require that the caller hold the new signatureOrSystem
permission android.permission.UPDATE_LOCK.  acquire() and release()
will throw security exceptions if this is not the case.

The "is now convenient?" state is expressed to interested parties
by way of a sticky broadcast sent only to registered listeners.  The
broadcast is protected; only the system can send it, so listeners
can trust it to be accurate.  The broadcast intent also includes a
timestamp (System.currentTimeMillis()) to help inform listeners that
wish to implement scheduling policies based on when the device became
idle.

The API change here is a tiny one: a dump(PrintWriter) method has been
added to the TokenWatcher class to facilitate getting information out
of it for dumpsys purposes.  UpdateLock itself is still @hide.

Bug 5543442

Change-Id: I3709c831fc1883d7cb753cd2d3ee8e10a61e7e48
2012-02-29 14:05:24 -08:00
Kei Takahashi
6225df0103 DRM framwork bug fix: add an API to release resources
When DrmManagerClient object is created and released many times,
the process suddenly crashes.
The case can happen when we make many thumbnails of
DRM-encrypted contents.

The problem is caused by shortage of file descriptors.
DrmManagerClient releases references of file descriptors
only when GC runs. So file descriptors are kept long time
even after the reference of DrmManagerClient are released.

By introducing DrmManagerClient#release() API,
the problem is solved. An application call this API
when we no longer need to use DrmManagerClient object.

Changes are made by SEMC and Sony.

Change-Id: Ie0bbc29cc33872449824285a8d67b1c3cdd8082b
2012-02-29 12:59:53 +09:00
Gilles Debunne
8279570b22 Fix for broken build part 2. Update 16.txt too
Change-Id: I8609dd818a6e4059f9b149a8089d681ac2972d66
2012-02-28 16:36:45 -08:00
Gilles Debunne
c1a1a49540 Fix for broken build. update-api step missing.
Change-Id: Ia8d3c92825cfdca8b8eef1c1badd1b514ceef18e
2012-02-28 16:31:38 -08:00