11881 Commits

Author SHA1 Message Date
Svetoslav Ganov
53672be110 Merge "Iteration of the print sub-system." 2013-08-01 02:16:20 +00:00
Svetoslav Ganov
55b409a97c Iteration of the print sub-system.
1. Added APIs for adding partially initialized PrintInfo objects
   enabling light-weight lookps for print serivces that want to
   populate the list of available printers without querying each
   of them for its capabilities. This includes APIs for the system
   to request from a print service to update certain printers.

2. Fixed a bug in PrinterId#equals().

3. Added equals and hasCode implementaion to PrinterInfo. Also
   the defaul in PrinterInfo are now an array instead of a
   SparseArray - cheaper.

4. Now PrintJobConfigActivity works with partially specified
   printers. Specifically, if such a printer is selected the
   activity is requesting from the print service to update
   the printer. We are currently not handling the timeout case.
   It also handles udpated pritners.

Change-Id: I5e83e924ef597c9e22cbd06a971d4f4d3bd3a9c1
2013-07-31 18:59:53 -07:00
Svetoslav Ganov
9f1ef00265 Merge "Iteration on the print sub-system." 2013-08-01 00:13:44 +00:00
Wink Saville
552436d17b Merge "Fix excessive log spew." 2013-07-31 23:27:34 +00:00
Wink Saville
1aef7fc81a Fix excessive log spew.
Bug: 10115060
Change-Id: I61fd83071da1224f38757b8d90f58c8d6c41d36b
2013-07-31 15:49:04 -07:00
Christopher Tate
20f170d6af Don't try to do the work if there isn't any data.
Bug 10056484

Change-Id: I527f592b0bb91bfbfff1d52c3327fe9e2ac53471
2013-07-31 13:01:02 -07:00
Satoshi Kataoka
0766eb045c Small refactor on InputMethodUtils
Change-Id: Ie4f797508c02abb13c7fe1be162ec4dc18829925
2013-07-31 18:33:48 +09:00
Dianne Hackborn
2841e0afac Merge "If you set an alarm before the epoch, you're gonna have a bad time" 2013-07-31 02:07:26 +00:00
Christopher Tate
5f221e8f93 If you set an alarm before the epoch, you're gonna have a bad time
For apps build against the KLP+ SDK, this will now throw an illegal argument
exception.  Legacy apps will simply see the alarm delivered immediately.

Bug 9965704

Change-Id: Ia103d9529d32640098be324820fe228efa95431d
2013-07-30 18:55:01 -07:00
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
Dianne Hackborn
805f52d4cf Report more memory tuning info.
Change-Id: I243d67189e325eba5ea22e79937f5a858dfceeed
2013-07-30 12:48:12 -07:00
Matthew Williams
8ac59af92c Merge "Fix of RTE from SyncOperation.compare()" 2013-07-30 15:57:19 +00:00
Matthew Williams
7986fe490d Fix of RTE from SyncOperation.compare()
Change-Id: I2e291b0c0bb9ae6a190d6cdfa9aef8b4bf33d617
2013-07-30 08:52:31 -07:00
Dianne Hackborn
821a90df96 Merge "Fix pub issue #58043: Copy crash in Android 4.3..." 2013-07-30 01:46:30 +00:00
Jonathan Dixon
a75246951f Merge "Make WebViewProvider constants private" 2013-07-30 01:22:18 +00:00
Dianne Hackborn
f0989840a0 Fix pub issue #58043: Copy crash in Android 4.3...
...when clipboard listener attached

We need to clear the calling identity before dispatching change
notifications.  Also make this more robust, so that in the face
of any failure we will clean up the broadcast state.

Change-Id: I305a8a62738595f1fe5643a063099de5ed7cb062
2013-07-29 18:11:02 -07:00
Christopher Tate
37987ef17a Merge "Fix permission privilege w.r.t. updated system apps" 2013-07-30 00:49:11 +00:00
Dianne Hackborn
6077115d74 Merge "Fix some oom tuning and display size stuff." 2013-07-30 00:45:37 +00:00
Dianne Hackborn
635a6d5a0b Fix some oom tuning and display size stuff.
Fix a problem where we would not respect the device's
override display density/size if those had been reset at
some point (to an empty string).

Tweak the tuning of low RAM devices to consider 480x800 as
the base line resolution.  That is our target these days.

Improve output of oom and meminfo to include this tuning
information.

Change-Id: Ic9a85b0391b075178c4ac17e64086ef21889f430
2013-07-29 17:17:31 -07:00
Christopher Tate
072252cd48 Fix permission privilege w.r.t. updated system apps
Note that it is *intentional* that even a privileged app cannot
add new privileged permissions via unbundled update.  The set of
privileged permissions granted is strictly limited to those used
by the apk file installed as privileged.

Bug 10027033

Change-Id: I974bae0671c1962e4526d51dd9a0c53bcd27323e
2013-07-29 17:13:35 -07:00
Todd Poynor
26faecc85e BatteryService use IBatteryProperties interfaces, drop JNI
IBatteryPropertiesListener binder interface to deliver notifications of
changed battery/power status from healthd system health daemon.  healthd
watches uevents from power_supply.

Change-Id: I1ab38622baf28356a6627fe2354b77e2ef99d838
2013-07-30 00:02:04 +00:00
Jonathan Dixon
09397ba3d5 Make WebViewProvider constants private
In preperation for DEFAULT_TO_EXPERIMENTAL_WEBVIEW flag-flip, make this
field and WEBVIEW_EXPERIMENTAL_PROPERTY private so we know all users are
querying the property in a consistent way.

Change-Id: Iabaffb8ac5a34e323b170339d47f872eb4c83042
2013-07-29 16:42:42 -07:00
Christopher Tate
e339319258 Merge "Turn off Alarm Manager logspew pending a more friendly implementation" 2013-07-29 23:31:55 +00:00
Christopher Tate
cdccf6423d Turn off Alarm Manager logspew pending a more friendly implementation
Bug 10055940

Change-Id: I75bcbdf6177f5faa41f420518513a22f47bcac5e
2013-07-29 16:23:05 -07:00
Wink Saville
5e56bc5437 Add network type TYPE_MOBILE_IA.
Add a network type for establishing connections to the apn used for
the initial connection.

Enable some debug for now.

Bug: 8733613
Change-Id: Ia627ac0cf5715660b6d02bb13a83d46ec1727b87
2013-07-29 15:02:29 -07:00
Dianne Hackborn
bf36ee2b0c Allow services to execute in the background scheduling group.
If a service is being executed due to a call from a background
process, there is no reason for its process to be brought up
to the foreground scheduling group to do its work.  So, don't.

Change-Id: I0f4f9f2fdcc3481ca4ad2e4e3deb43b8edbbd897
2013-07-29 13:50:52 -07:00
Colin Cross
ddb1428ab6 Merge "set the extra_free_kbytes kernel vm tunable" 2013-07-26 23:09:09 +00:00
Colin Cross
59d80a5270 set the extra_free_kbytes kernel vm tunable
Set the sys.sysctl.extra_free_kbytes property, which will proxy
through init to the /proc/sys/vm/extra_free_kbytes tunable (on
kernels where it exists).  This will ask the kernel to keep
more memory free, causing lowmemorykiller to fire earlier and
allocations to succeed faster.

The size is set to 3 full screen 32bpp buffers.  Products can
override the size with an absolute or adjustment value using
overlays config_extraFreeKbytesAbsolute and
config_extraFreeKbytesAdjust.

Bug: 10024467
Change-Id: Ib4d4507513ec3c1f4d4ceeb81ed632d1ad643437
2013-07-26 16:06:45 -07:00
Dianne Hackborn
db983e9a9c Merge "Proc stats: include information about config." 2013-07-26 22:25:37 +00:00
Dianne Hackborn
244f5d24e1 Proc stats: include information about config.
We now include in the app ops information about the device runtime
config that is relevant.  Currently this is the dalvik runtime in
use and the webview.  In checkin, this data looks like:

config,libdvm.so,webview

Change-Id: I85fd53418bd43595468f23ec8619e772fdaee7e1
2013-07-26 15:23:11 -07:00
Christopher Tate
4cb338de35 Maintain ordering when alarm removal alters batch bounds
Also: turn off verbose logging, but enable a new debugging
consistency check.

Bug 9965704

Change-Id: Ib20fb8b6275b77ff98291cf12a43b2a1128ab4b9
2013-07-26 15:03:53 -07:00
David Christie
54e5f0eb76 Merge "Revert "Add WorkSource capability to AlarmManager"" 2013-07-26 19:45:28 +00:00
David Christie
f10f9ea06c Revert "Add WorkSource capability to AlarmManager"
This reverts commit 02600fb66b805c161e35f6c787372e4074f2213f.

Broke some tests.

Change-Id: Ic47b23a935bf90aba817073c27cd247306db7d5f
2013-07-26 19:40:53 +00:00
David Christie
52235b844f Merge "Add WorkSource capability to AlarmManager" 2013-07-26 18:38:40 +00:00
Craig Mautner
2982199271 Merge "Update configuration before setting override size." 2013-07-26 18:37:58 +00:00
Zhihai Xu
876d100f02 Merge "Add debug menu to enable btsnoop" 2013-07-26 18:33:43 +00:00
Geremy Condra
350d274746 Merge "Remove unused mDnsOverridden" 2013-07-26 17:48:54 +00:00
David Christie
02600fb66b Add WorkSource capability to AlarmManager
Change-Id: Ibcff01a9f54a89fde6e7e5b7658e9a90b9a2445b
2013-07-26 09:41:59 -07:00
David Christie
701ace2e68 Merge "Add WorkSource capability to WifiManager for starting a scan." 2013-07-26 16:35:02 +00:00
Colin Cross
6108dda2db Merge "add overlays to override lowmemorykiller adjustment values" 2013-07-26 01:32:24 +00:00
Matthew Williams
09d20f3bc2 Merge "Fixed NPE in SyncRequest for Bundle.EMPTY" 2013-07-26 00:23:11 +00:00
Matthew Williams
68e39c3411 Fixed NPE in SyncRequest for Bundle.EMPTY
Writing to bundle caller provides causes app to crash if bundle
is Bundle.EMPTY, which is backed by an unmodifiable map.

Change-Id: Ia9bdf12cddea9673bb84e0458cce8bc8027fbba5
2013-07-25 16:40:23 -07:00
David Christie
6942a1200c Add WorkSource capability to WifiManager for starting a scan.
Change-Id: I011bf3b91fbddaba7ab0128bb03d27d90b8a886f
2013-07-25 15:25:07 -07:00
Colin Cross
fcdad6f292 add overlays to override lowmemorykiller adjustment values
Add overlays config_lowMemoryKillerMinFreeKbytesAbsolute and
config_lowMemoryKillerMinFreeKbytesAdjust to allow a product to
modify the size of the lowmemorykiller minfree buckts.  The absolute
overlay sets the size of the largest bucket to the specified value
and scales the smaller buckets proportionally.  The adjust overlay
(which can be negative) directly adds to the size of the largest
bucket and to the the smaller buckets proportionally.

Change-Id: I0d6b7662be12fd151deb2bf9591f2c7a8b1cb6f7
2013-07-25 15:11:39 -07:00
Christopher Tate
b883dda46a Turn on debug logs for alarm batching
Bug 9965704

Change-Id: I18111682664a069c2dc4fd956df49a02e2c455a8
2013-07-25 14:43:57 -07:00
Matthew Williams
c81891c125 Fixes to javadoc
That was breaking sdk(linux) and aosp_mips-eng (linux)

Change-Id: I1d6737baf68e004a2764d1dbee816f98a1a49be8
2013-07-25 14:27:43 -07:00
Craig Mautner
67a60426d8 Update configuration before setting override size.
PhoneWindowManager.setInitialDisplaySize() uses Resources to determine
the height of the Status and Navigation bars. Previous to this CL the
Configuration was being updated after setInitialDisplaySize() was
called which caused the Status and Navigation Bar heights to use the
initial size and density and not the override values. This fix moves
the updateConfiguration after the override values are read in but
before setInitialDisplaySize() is called.

Fixes bug 9966940.

Change-Id: If5b033f520e14f32080d0f2aebbdc6bdae714f88
2013-07-25 12:29:12 -07:00
Matthew Williams
f7e843e3a2 Merge "AnonymousSyncService & SyncRequest." 2013-07-24 22:41:22 +00:00
Matthew Williams
fa77418134 AnonymousSyncService & SyncRequest.
Changes to the way bundles are parcelled broke SM,
this update writes out the bundle as xml. This circumvents
the need for parcel, and makes it easier to debug whats
happening.
Change-Id: I6cd5d3a2eb80bfa5b3ae0c7f2d2ff91a65daaa34
2013-07-24 15:25:29 -07:00
Christopher Tate
616dfe37f5 Merge "Don't let batch coalescing / rewindowing break batch ordering" 2013-07-24 19:47:59 +00:00