42355 Commits

Author SHA1 Message Date
Svetoslav Ganov
85b1f88305 Iteration on the print sub-system.
1.  API changes: Moved copies API from PrintAttributes to PrintJobInfo;
    Changed the PageRange list to an array in PrintDocumentAdapter#onWrite;
    Added onCancelled method to the layout and write callbacks.

2.  Refactored the serialization of remote layout and write commands. Now
    the commands are serialized by the code in the client instead in the spooler.
    The benefit is simple code since the client has to do a serialization to delegate
    to the main thread anyway. The increased IPC found is fine since these calls
    are quite unfrequent.

3.  Removed an unused file: IPrintSpoolerObserver.aidl

4.  Added equals and hasCode implementation to PageRange, PrintAttributes,
    MediaSize, Resolution, Margins, Tray, PrintDocumentInfo.

5.  Added shortcut path for query APIs on PrintJob that return cached values
    if the print job is in a uncuttable state, i.e. completed or cancelled. Failed
    print jobs can be restarted.

6.  PrintJobInfo was not properly serialized.

7.  Updated the look of the print dialog to be stable if there is and there isn't
    currently selected printer.

8.  PrintJobCOnfigActivity now calls onLayout on every print attributes change
    but requests a write only on print preview or print button press. Also if the
    layout did not change the content and it is already written no subsequent
    call is made. Also if the selected pages change and we already have them
    no subsequent call to write is made. Also the app is called with print preview
    attribute set when performing layout and with it cleared after the print button
    is pressed. A lot of changes making sure that only valid actions are enabled
    in the activity (looks like a dialog) at a given time frame. The print job config
    activity is also hidden after we got all the data, i.e. layout and write are done.

9.  The callback from the print spooler to the system are scheduled via messages
    to avoid lock being held during the call. It was hard to guarantee that since a
    method holding a lock may be calling one that would like to release the lock
    at some point to make the callbacks.

10. Print spooler state is persisted only if something changes in a completed
    print job, i.e. not one that is being constructed due the print job config dialog.

11. Fixed a potential race in the RemotePrintSpooler where it was possible that
    a client that got a handle to the remote spooler calls into an unbound spooler.
    E.g: the client gets the remote interface with a lock held, now the client releases
    the lock to avoid IPC with a lock, during the IPC scheduling the spooler has
    notified the system that it is done and the system unbinds from it, now the
    client's IPC is made to a spooler that is disconnected.

Change-Id: Ie9c42255940a27ecaed21a4d326a663a4788ac9d
2013-07-30 17:15:11 -07:00
Svetoslav Ganov
0d1daa50f6 Updating the print dialog and its interactinos with the printing app.
1. Added support for reporting the old print attributes during layout.
   Now we keep track of the old print attributes, so the app can
   compute the delta and decide whether re-layout work is needed.

2. Fixed PrintDocumentAdapter callback interleavings. Layout callbacks
   were intermixing with write ones - a mess. Now we make an attempt
   to cancel layout and write if they respond to cancellation, otherwise
   we wait but do not interleave them.

3. Refactored the PrintJobConfigActivity for easier maintenance and
   to have a single update UI method that does the minimal amount
   of work.

Change-Id: I31ada1a0550882e6185018e6f17f923aed165d15
2013-07-23 18:05:53 -07: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
Svetoslav
597945fd3a First pass of the print dialog UX
Change-Id: I315a16d7f68c73ca180c76e722847b4b1bdea55b
2013-07-19 16:23:12 -07:00
Michael Wright
7a5480d6d7 Merge "Debounce touch navigation taps and button presses" 2013-07-19 23:15:05 +00:00
Craig Mautner
acb837fe63 Merge "Fix home activity and user switch interactions." 2013-07-19 23:07:51 +00:00
Craig Mautner
ac6f843c91 Fix home activity and user switch interactions.
- Make sure Home activity goes in the correct task and on the correct
stack.
- Do not allow different users to be in the same task.
- Do not set stacks aside for each user.

Fixes bug 9775492.

Change-Id: I0e7954e917aac8482a1015a36923e02914e2b692
2013-07-19 16:05:59 -07:00
Michael Wright
7caaeeb6a8 Merge "Add input device property for buttons under touchpads" 2013-07-19 22:45:51 +00:00
Robert Greenwalt
538cdb98ef resolved conflicts for merge of 85b5e4c4 to master
Change-Id: Idd0ad9b1504fddf68c4c4cc04731de1eddd204b3
2013-07-19 14:09:30 -07:00
Robert Greenwalt
85b5e4c48f am b5bf655c: am e874bd35: Merge "Add gservices updater for carrier provisioning url" into jb-mr2-dev
* commit 'b5bf655cc6cc9128aec99958cce3b054348c9273':
  Add gservices updater for carrier provisioning url
2013-07-19 13:37:41 -07:00
Eric Laurent
c1167a93dd Merge "VolumePreference: fix audio sample playback" 2013-07-19 19:50:31 +00:00
Amith Yamasani
7e81dd274f Merge "Have UserManagerService clear the restrictions and unblock apps" 2013-07-19 19:48:21 +00:00
Eric Laurent
aca105cfb4 VolumePreference: fix audio sample playback
Handle audio sample start/stop request in a handler
to avoid race conditions.

If a sample is active, do not ignore playback requests but
schedule a second attempt one second later. This is to avoid
ignoring a playback request if a sample is short or about to finish.

Bug: 8176776.

Change-Id: If2d5f7d469eba345af3f4771067a076a56f4bfed
2013-07-19 19:48:02 +00:00
Igor Murashkin
194ea7d9a3 Merge "camera2 api: Output classes for key types where it makes sense" 2013-07-19 19:16:06 +00:00
Mike Lockwood
757ec7837d Merge "LocalSocket: Add support for SOCK_DGRAM and SOCK_SEQPACKET" 2013-07-19 17:39:28 +00:00
Baligh Uddin
a2089f47fe Merge "Import translations. DO NOT MERGE" 2013-07-19 17:12:19 +00:00
Ben Murdoch
a5cdd51cb7 Add WebView.evaluateJavaScript(String, ValueCallback) API.
This API is intended to replace the "WebView.loadUrl("javascript:...")
pattern that is the current mechanism for executing JavaScript in the
context of the current page displayed in the WebView.

The new API is more convenient - it doesn't trigger the normal URL
loading path - and so does not have side effects such as hiding
the keyboard - and allows the caller to specify a callback that will
be invoked once the script execution is complete.

BUG=9814043

Change-Id: I3f27e8ff5371077d9265430090d61381a3a86e76
2013-07-19 10:24:05 +01:00
Kenny Root
4231185a2e Merge "KeySets: better rejection for badly-formed manifest" 2013-07-19 01:43:40 +00:00
Christopher Tate
3e07a89b2c Fix build & preserve DHCP scheduling as-is
Change-Id: I4063b18532c476280f343658bf3641495e526ed4
2013-07-18 18:23:57 -07:00
Dianne Hackborn
c0dfee29a8 Merge "Fix issue #9925269: Naver app crashes on launch" 2013-07-19 00:46:40 +00:00
Christopher Tate
eeda23d2e1 Merge "Make more calendar alarms exact" 2013-07-19 00:42:38 +00:00
Christopher Tate
9e4b6f5a69 Make more calendar alarms exact
Change-Id: I5ef72268b0605ba5a635b70d2b521533d3bd3ef0
2013-07-18 17:41:32 -07:00
Dianne Hackborn
ff32f353f8 Fix issue #9925269: Naver app crashes on launch
No comment.

Change-Id: I084cbbf21cacdce179c11528b7217fdc6006dceb
2013-07-18 17:31:13 -07:00
Christopher Tate
1a80cfe968 Merge "Batch alarms to reduce device wakeups" 2013-07-19 00:22:59 +00:00
Dianne Hackborn
059bf080fb Merge "Fix crash." 2013-07-18 23:53:33 +00:00
Dianne Hackborn
127c5ef5d7 Fix crash.
Change-Id: I0b5d846d5a9e6b1c7c3756b653833c263634270b
2013-07-18 16:51:04 -07:00
Igor Murashkin
27b62ae8eb camera2 api: Output classes for key types where it makes sense
Change-Id: I0f74c110cc4917bfd96d812ee98c385bb1b937b7
2013-07-18 16:49:24 -07:00
Zhijun He
563057740d Merge "Update camera metedata" 2013-07-18 23:20:47 +00:00
Amith Yamasani
1a7472e722 Have UserManagerService clear the restrictions and unblock apps
Since this is an operation that could take a few seconds to run and needs to be
completed even if Settings dies, best to do it in the user manager.

Refactored PIN challenge/setup UI with a field to verify existing pin
when changing to a new one.

Change-Id: I0b7df5b2ccb7f343aa9282a9245d3bc2b577a794
2013-07-18 16:12:27 -07:00
Chris Craik
ef5498edf6 Merge "Add reconfigure method to Bitmap" 2013-07-18 22:55:44 +00:00
Zhijun He
d84bd0a5f3 Update camera metedata
Change-Id: Ib33da76659c7aa5364ec2c3abc3613cf23eb7c36
2013-07-18 15:18:05 -07:00
Alan Viverette
f1f8f318bb Merge "Set transient state for focus container in ListView" 2013-07-18 22:06:22 +00:00
Baligh Uddin
ce68807087 Import translations. DO NOT MERGE
Change-Id: I93223b932aad3c6331d2da2acf27c5085af00028
Auto-generated-cl: translation import
2013-07-18 11:30:15 -07:00
Justin Koh
152b69ada4 Merge "Add FX_KEYPRESS_INVALID constant to AudioManager." 2013-07-18 18:27:51 +00:00
Dianne Hackborn
20bf1225ae Merge "Switch Bundle's implementation over to ArrayMap." 2013-07-18 18:23:09 +00:00
Dianne Hackborn
fbf4ce04f1 Merge "Mmmmmmm... lovely, lovely ArrayMap." 2013-07-18 18:22:41 +00:00
Dianne Hackborn
add005cf94 Mmmmmmm... lovely, lovely ArrayMap.
And ArraySet, too.

Change-Id: I72ea28cbb2286b01b6e1be082f8e7ec17e99074e
2013-07-18 11:18:25 -07:00
Dianne Hackborn
06f2122050 Merge "Make it safe to use start/stop app ops outside of system proc" 2013-07-18 18:12:50 +00:00
Dianne Hackborn
b87655b3e5 Switch Bundle's implementation over to ArrayMap.
That was...  um...  easier than I thought it was going to be.

Change-Id: Id8f2211c1d5f8145e0bb009dca0f62a590f2b860
2013-07-18 11:10:29 -07:00
Amith Yamasani
485d16f62f Merge "Ignore list item clicks if PreferenceActivity is paused." 2013-07-18 18:00:53 +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
Elliott Hughes
4c8dfabff4 am e9643874: am 0bad5370: Merge "Handle missing and invalid numeric values in XmlUtils."
* commit 'e964387466e380f17e28ab3dd75139509d043ffd':
  Handle missing and invalid numeric values in XmlUtils.
2013-07-18 10:45:38 -07:00
Elliott Hughes
e964387466 am 0bad5370: Merge "Handle missing and invalid numeric values in XmlUtils."
* commit '0bad537093ed5b493e4c2af778cf802a2cf2c15f':
  Handle missing and invalid numeric values in XmlUtils.
2013-07-18 10:41:41 -07:00
Elliott Hughes
0bad537093 Merge "Handle missing and invalid numeric values in XmlUtils." 2013-07-18 17:38:57 +00:00
Alan Viverette
d44696c4cf Set transient state for focus container in ListView
BUG: 9860185
Change-Id: I0c7035e5992c56110a0cc5c94aa778bbb999deea
2013-07-18 10:37:15 -07:00
Amith Yamasani
49bdc1681e Ignore list item clicks if PreferenceActivity is paused.
Since list item clicks are delivered asynchronously, it's possible to
get click callbacks after the activity has already paused.

This should actually be blocked further up the event chain, ideally,
so that the list selection state is not out of sync with the application.

Bug: 9752185
Change-Id: I1058d64cba98e9093b462e2e581bdbccdace1420
2013-07-18 09:57:43 -07:00
Elliott Hughes
5bc32b347f am 03a152d7: am 15cb526e: Merge "Fix import after okhttp update."
* commit '03a152d7e72f05456a463f2709ce787119e86f03':
  Fix import after okhttp update.
2013-07-18 09:43:04 -07:00
Elliott Hughes
03a152d7e7 am 15cb526e: Merge "Fix import after okhttp update."
* commit '15cb526ece1420b1ae2061e20fd0982d82b41aae':
  Fix import after okhttp update.
2013-07-18 09:36:48 -07:00
Eric Laurent
230e0120a4 Merge "Fix media server restart detection mechanism" 2013-07-18 16:12:59 +00:00
Eric Laurent
ca35e48234 Fix media server restart detection mechanism
There is a flaw in the mechanism used by AudioService
to detect the fact that mediaserver process did crash and restart.
It relies on polling AudioFlinger service until a successful
connection triggers a callback into AudioSystem JNI and then into AudioService.
But if another thread in system_server process, not attached to the
JNI environment, reconnects before AudioService, the callback is called in
a detached context and dropped.

The fix consists in attaching the thread executing the callback
and detaching it if needed.

Bug: 9693068.
Change-Id: I184308b12a3f87653bf818abf0159e0e45a66ef0
2013-07-18 09:10:56 -07:00