5311 Commits

Author SHA1 Message Date
Amith Yamasani
dc56ceb6a1 Merge "New permission to manage device admins" 2013-07-24 00:06:34 +00:00
Martijn Coenen
7ea1ab60b0 Merge "Re-use "name" attribute for NFC AIDs." 2013-07-23 22:27:05 +00:00
Michael Wright
b1f5585f89 Merge "Add controller numbers for gamepads / joysticks" 2013-07-23 20:52:57 +00:00
Michael Wright
ac6c78b6ee Add controller numbers for gamepads / joysticks
Change-Id: I30ac9add6a2473a5ebd83a022c571545e61d1136
2013-07-23 13:50:10 -07:00
Dianne Hackborn
57a7f5954c Add "adb shell am restart" command.
So you can restart the system without being root.

Change-Id: I89770f497833ecbe2b69e3a0cfafae7ef472a9f5
2013-07-23 11:51:22 -07:00
Amith Yamasani
9dade39ec3 Merge "User restriction API to disable single-user restrictions feature." 2013-07-23 16:21:48 +00:00
Amith Yamasani
0343ec3abb User restriction API to disable single-user restrictions feature.
Change-Id: I80e08b38b5e32f3cb1af51398907510508ec199f
2013-07-23 09:17:21 -07:00
Martijn Coenen
434249ef62 Re-use "name" attribute for NFC AIDs.
Change-Id: I92895e0f21a639897c45ec184580c43ba8b22dca
2013-07-22 19:47:57 -07:00
Martijn Coenen
fd23eca5ba Merge "First shot at (host-based) card emulation APIs." 2013-07-22 23:20:01 +00:00
Martijn Coenen
ce1279686b Merge "Add host-based card emu feature to PackageManager." 2013-07-22 22:29:21 +00:00
Svetoslav Ganov
26bd5f1d3a Merge "Implement persistence/restoring of print spooler state." 2013-07-22 20:08:16 +00:00
Svetoslav Ganov
88d199130d Implement persistence/restoring of print spooler state.
1. Implemented the persistence and restoring of the print spooler state.
   The print spooler state is saved as an XML on every print job change
   and is restored when we bind to the spooler. The system does not
   unbind from the spooler until the state persistence completes. We
   are now storing the entire state, i.e. all print jobs, when a single
   one changes. This is not optimal but we are not expecting to have
   many such at the same time, so for now we err for simplicity of
   implementation.

2. Enforcing a non-empty print job name.

3. Hidden the STATE_CREATED print job state which should never be visible to a
   client since this is the state of a print job during construction, i.e. the
   print dialog is up and we are doing back and forth with the app.

4. Fixed some PrintAttributes APIs that were incorrectly taking in a PackageManager
   instance.

5. Updated the PrintSpooler build file due to splitting the framework into multiple
   jars.

Change-Id: I52c88eaa1ec9c64920359cc143c79832a4c3d25b
2013-07-22 13:07:09 -07:00
Martijn Coenen
f4bf158328 Add host-based card emu feature to PackageManager.
Change-Id: Id55025e5ab8443be1e6ac23ac5d9ab93565a53f0
2013-07-22 12:10:18 -07:00
Amith Yamasani
a418cf21c9 New permission to manage device admins
The previously used permission was doing double duty as the permission
that device admins to check for to ensure that calls are coming from valid
system components.

MANAGE_DEVICE_ADMINS is system|signature and is now required to add/remove
device admins.

Required for:
Bug: 9856348

Change-Id: I64385d2ec734c3957af21b5a5d9cffd8a3bcd299
2013-07-22 10:42:46 -07:00
Martijn Coenen
5eaa8970aa First shot at (host-based) card emulation APIs.
HostApduService: convenience service class for implementing
a service that registers a set of ISO7816-4 AIDs and emulates
the corresponding application inside the service itself.

SeApduService: convenience service class for implementing
a service that registers a set of ISO7816-4 AIDs that reflect
applications installed on an embedded secure element or UICC. Contains
event hooks to allow the service to handle eSE/UICC events that
correspond to those AIDs.

Change-Id: I44191bd4abcbbe4f1fd36a9fd42639fe5c0cf496
2013-07-22 10:20:49 -07:00
Christopher Tate
57ceaaa0aa Add AlarmManager.setWindow(...) for supplying an explicit delivery window
Bug 9532215

Change-Id: I0efe32cbaaae8ce6ab223041eed116c3470a7326
2013-07-19 18:11:45 -07:00
Mike Lockwood
757ec7837d Merge "LocalSocket: Add support for SOCK_DGRAM and SOCK_SEQPACKET" 2013-07-19 17:39:28 +00:00
Christopher Tate
1a80cfe968 Merge "Batch alarms to reduce device wakeups" 2013-07-19 00:22:59 +00:00
Chris Craik
ef5498edf6 Merge "Add reconfigure method to Bitmap" 2013-07-18 22:55:44 +00:00
Justin Koh
cacfe69b68 Add FX_KEYPRESS_INVALID constant to AudioManager.
Add FX_KEYPRESS_INVALID constant to AudioManager. This is a sound which should
play if the user tries to click or press on an element which is disabled.

Change-Id: Idd8953abeddd1afb51f7f190f9fb612ef672defa
2013-07-18 10:46:19 -07:00
Svetoslav
dc990e7c61 Merge "Tweak the print APIs." 2013-07-17 22:05:21 +00:00
Svetoslav
6283608e0b Tweak the print APIs.
1. Adding bundle with metadata to PrintDocumentAdapter#onLayout
   with one key for now to specify whether this is for a preview.

2. Cleaned up docs.

Change-Id: I89380781bf3ae41aa89f8a0347d74516a210394c
2013-07-17 14:55:15 -07:00
Christopher Tate
e0a22b324d Batch alarms to reduce device wakeups
The default Alarm Manager behavior for KLP+ apps will be to aggressively
coalesce alarms, trading exact timeliness of delivery for minimizing the
number of alarm-delivery points, especially wakeup points.

There is new API in AlarmManager, setExact() and setExactRepeating(),
for use by apps that absolutely *must* get their alarms at a specific
point in time.

Bug 9532215

Change-Id: I40b4eea90220211cc958172d2629664b921ff051
2013-07-17 14:37:12 -07:00
Chris Craik
c84d203da2 Add reconfigure method to Bitmap
bug:9797004

Grants a means to reuse a bitmap's allocation for different
width/height/Config without going through
BitmapFactoryOptions.inBitmap

Change-Id: Ib62319f3bd96c451fc1636288adf06a8275b4e3d
2013-07-17 12:08:01 -07:00
Chet Haase
7a46dde1ae Changed name of recent hasLayout() method to isLaidOut()
This new method on view reflects whether the view has been laid out
at least once since it was attached. hasLayout() seems too vague for that
meaning; every View that has a parent has a layout (since we use container,
parent, and layout interchangeably). The new version of the method
is closer to the actual meaning.

Change-Id: I519745739b6a6317faeb077aa61f994025cf81f3
2013-07-17 10:22:53 -07:00
Dianne Hackborn
4a8baef3f5 Merge "Make ArrayMap public! :)" 2013-07-17 00:53:33 +00:00
Mike Lockwood
e7d309a929 LocalSocket: Add support for SOCK_DGRAM and SOCK_SEQPACKET
Also replaced some JNI code with libcore IO support

Change-Id: I091e2b6b8dd1fec554936c1ffab29e50f0979e4a
2013-07-16 17:31:15 -07:00
Dianne Hackborn
3e82ba1a67 Make ArrayMap public! :)
Also do some tweaking of the various container classes
to synchronize them with the support lib and make it
easier to copy code between the two.

And update activity/fragment to use ArrayMap.

Change-Id: I3cfe82392a17119dfc72c3d9961f64e1914f42be
2013-07-16 17:08:04 -07:00
Svetoslav
17b7f6e6d4 Clean up of the print APIs.
1. Fixed a case in which the onPrintCompleted callback may not be invoked.

2. Added string resulrces for the different error messages for failed
   printing in OnPrintCompletedCallback

3. Fixed the string comments for the MediaSize constants.

4. Added APIs to create certain print attributes by passing in a
   string label instead of resource and package name since in some cases
   a print service may be getting already internationalized lables
   or it may not know all possible values.

5. Fixed a crash in PrintJobConfigActivity if there is no input or
   output tray.

Change-Id: Ie877b7dc669051606394aa290e6d2b979a42db4c
2013-07-16 14:39:32 -07:00
Svetoslav Ganov
c59df3caeb Merge "Refactoring of the print sub-system and API clean up." 2013-07-16 20:01:34 +00:00
Svetoslav Ganov
a00271533f Refactoring of the print sub-system and API clean up.
1. Now a user state has ins own spooler since the spooler app is
   running per user. The user state registers an observer for the state
   of the spooler to get information needed to orchestrate unbinding
   from print serivces that have no work and eventually unbinding from
   the spooler when all no service has any work.

2. Abstracted a remote print service from the perspective of the system
   in a class that is transparently managing binding and unbinding to
   the remote instance.

3. Abstracted the remote print spooler to transparently manage binding
   and unbinding to the remote instance when there is work and when
   there is no work, respectively.

4. Cleaned up the print document adapter (ex-PrintAdapter) APIs to
   enable implementing the all callbacks on a thread of choice. If
   the document is really small, using the main thread makes sense.

   Now if an app that does not need the UI state to layout the printed
   content, it can schedule all the work for allocating resources, laying
   out, writing, and releasing resources on a dedicated thread.

5. Added info class for the printed document that is now propagated
   the the print services. A print service gets an instance of a
   new document class that encapsulates the document info and a method
   to access the document's data.

6. Added APIs for describing the type of a document to the new document
   info class. This allows a print service to do smarts based on the
   doc type. For now we have only photo and document types.

7. Renamed the systemReady method for system services that implement
   it with different semantics to systemRunning. Such methods assume
   the the service can run third-party code which is not the same as
   systemReady.

8. Cleaned up the print job configuration activity.

9. Sigh... code clean up here and there. Factoring out classes to
   improve readability.

Change-Id: I637ba28412793166cbf519273fdf022241159a92
2013-07-16 12:59:59 -07:00
John Spurlock
fe4fb365ba Merge "Un@hide View.PRESSED_STATE_SET." 2013-07-16 13:37:18 +00:00
michaelwr
20555cb645 Merge "Add a keycode to switch audio tracks (1/2)" 2013-07-16 01:38:46 +00:00
Jeff Brown
6c1c0b6cbe Declare permission for accessing input flinger.
Change-Id: I2914b301b74e0d310a9e95e2d6fb5cb72d3e3703
2013-07-15 15:08:39 -07:00
Igor Murashkin
648e4fc7ad Merge "camera2: Implement CameraDevice#getCameraInfo" 2013-07-15 20:45:36 +00:00
Igor Murashkin
d7bf1778df camera2: Implement CameraDevice#getCameraInfo
Bug: 9529161
Change-Id: Ie37d1e07bb8416cbb141f4d49e52337bf7236610
2013-07-15 13:37:08 -07:00
John Spurlock
0a55c94730 Un@hide View.PRESSED_STATE_SET.
Looks like an oversight.  The other state sets are public, and we
reference this one in the public docs.

Change-Id: I1c2d8bec3cb277ebfb55ccaacefab0cb38703177
2013-07-15 12:18:04 -04:00
keunyoung
27116e35e8 Merge "add TYPE_PRIVATE_PRESENTATION window type" 2013-07-12 23:03:21 +00:00
keunyoung
a446bf0e8c add TYPE_PRIVATE_PRESENTATION window type
- This window type can be used for Presentation created on top of virtual
  private display.
- There can be PRIVATE_PRESENTATION specific policy / behavior, but for now,
  there is nothing special.

Change-Id: I9fde0f0376e57fcc60000d3a3f8657a21ef58993
2013-07-12 14:41:10 -07:00
Chet Haase
c81a849388 Fix minor transition bugs and add capabilities
Some view changes require more flexible transitions than the
defaults provided by Crossfade and TextChange - this change supplies some
of that flexibility.

Also, starting a new transition on a hierarchy undergoing a transition
caused the first to get canceled, then the start values to be retrieved.
The new transition should actually get the start values from the intermediate
state of the views, so we now cancel the previous transition only after the
start values have been captured.

Issue #9756349 Transitions: Crossfade does not handle interruption/reverse correctly
Issue #9295863 Transitions: Add behavior API/flags to various transitions
Issue #9275859 Transitions: Improve mechanism for transition interruption

Change-Id: I5a8c5a12466ddcab9e84e4880930563fa1216f3b
2013-07-12 13:40:38 -07:00
Jaekyun Seok
bfdad8ecad Add a keycode to switch audio tracks (1/2)
A key to switch audio tracks is general on media devices like blu-ray.

Bug: 9728155
Change-Id: Ib61822b8aa9c143a8febc3cff4707fa775119448
2013-07-12 17:23:29 +09:00
Elliott Hughes
bea6525a53 am 9c8685b7: am f094eefc: am c5de9c35: Merge "Track libcore API update."
* commit '9c8685b714b38c2bbf09077b9cba73a95b734269':
  Track libcore API update.
2013-07-11 19:01:40 -07:00
Elliott Hughes
9c8685b714 am f094eefc: am c5de9c35: Merge "Track libcore API update."
* commit 'f094eefc34013c7167effa558b488709eaa54751':
  Track libcore API update.
2013-07-11 18:55:54 -07:00
Elliott Hughes
f094eefc34 am c5de9c35: Merge "Track libcore API update."
* commit 'c5de9c3509e6f91f1a6fca4541c5a2dfc9878dcc':
  Track libcore API update.
2013-07-11 18:52:11 -07:00
Adam Powell
639f37e7ab Merge "Un-hide all ViewParent methods" 2013-07-11 22:50:38 +00:00
Adam Powell
504a10f2f5 Un-hide all ViewParent methods
Make it possible for code outside the framework to implement the
ViewParent interface.

Change-Id: Ic1b4eb15a4b3da1d16c92b59e039d89861d893e4
2013-07-11 15:25:59 -07:00
Igor Murashkin
b519cc52ec camera2 api: Add CameraMetadata get/set support
* Add a Rational class
* Can get/set Key<T> where T is a primitive (or Rational)
* Can get/set Key<T> where T is a primitive array
* Can get/set Key<T> where T is an enum (synthetic constructor only)

Not implemented yet:
* When T is anything else, i.e. Rect, Size, etc

Bug: 9529161
Change-Id: I64438024a1e8327a38dd2672652626f0ffbb70e3
2013-07-11 13:06:56 -07:00
Elliott Hughes
8964b3bb3d am f445a685: am 0b18c149: am 0f50cb31: Merge "Fix build."
* commit 'f445a6856777cdcbec14342c2a3510b26ea7b675':
  Fix build.
2013-07-11 10:17:12 -07:00
Elliott Hughes
9444fcae54 Track libcore API update.
Change-Id: I7ad4ee87008c2ba0f8f16d1c86d81b8114359e04
2013-07-11 10:06:35 -07:00
Craig Mautner
fb20eb48aa Merge "Add convertToTranslucent to API." 2013-07-10 21:52:28 +00:00