History log of /frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
93a224936945d1fd773c761279b8949d30325bac 10-Nov-2016 Philip P. Moltmann <moltmann@google.com> Wait when other thread is binding to print spooler

Fixes: 32581183
Test: print cts and workflow tests
Change-Id: I3c6ccc40a1ea6504d2e25ec402cecf31d724865b
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
850c83e6da3b34a4eab804133420247fc9dbb8a1 09-Nov-2016 Jeff Sharkey <jsharkey@android.com> Move dump() to dumpAsync(), more oneway calls.

When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: I70aa2666ae21dae8f09ded2063bed359c0b210c5
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
e2ad85d230392e18013bc50f37b46268aa4245a6 24-Aug-2016 Philip P. Moltmann <moltmann@google.com> Hold no locks when calling RemotePrintSpooler

The calls might be blocking and need the main thread of to be unblocked
to finish. Hence do not call while holding any monitors that might need
to be acquired the main thread.

The calls that have been moved out of the lock:
- Icon related calls: These are just caches. Hence we flush the cache we
just request the icon again
- Prune call: This just removes not installed print service from some
data structure. The order of two of these calls does not matter as
the end result of both removals will be the same, regardless of order.

Testing done: Reinstalled a print service multiple times. Before the
first reinstallation locked up the userState, now not anymore

Change-Id: I4f4cdaba65132dc2ef054877cbb097b499a723f6
Fixes: 31043684
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
59d1c9430aa8b65febf1b77f99930328fd739844 26-Mar-2016 Philip P. Moltmann <moltmann@google.com> Merge "If the print spooler gets started onUserUnlock use less of a priority to have less impact on the system." into nyc-dev
d74d1e549168ba521e8009961b76e8718be37aa1 18-Mar-2016 Philip P. Moltmann <moltmann@google.com> Change hasCustomPrintIcon and setStatus as requested by API council.

Bonus: null advanced keys produced a exception deep in the print
spooler. Hence prevent null keys on the surface from now on.

Bug: 27716355
Change-Id: I3c064956f4e670cd7091437ade06605aa8d797b0
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
e8ae15482eef7617494cb3187899983e27cb8a35 22-Mar-2016 Philip P. Moltmann <moltmann@google.com> If the print spooler gets started onUserUnlock use less of a priority to have less impact on the system.

Bug: 27746455
Change-Id: I3ae0a755e8f4c212a111d76ec6ef042654589510
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
66c96591e2ddb464c67e60dbf4193ef4ec8a620b 24-Feb-2016 Philip P. Moltmann <moltmann@google.com> Add "app printer activity" and always keep the print service state
updated. Also fiddle with the UI to use more standard values.

To be sure the print service state alwasy updated I changed
PrintManager.getPrintServices to return a loader which just wraps a
registerListener/getList/removeListener combo.

I also added a new function to enabled/disable a print service to be
keep all updating logic inside the PrintManagerService->UserState.

Then I changed all code to use this new interface.

Detailed comments:

PrintServiceInfo:
- I had to add the enabled state to the PrintServiceInfo as some users
of PrintManager.getPrintServices want all services but then display
different data depending on the enabled state. Of course I could have
created two PrintManager.getPrintServices-loaders to load the two
separate list of services. I think it is much easier to add this
property though. It is updated every time new data is returned to the
PrintManager.getPrintServices-loader.

AddPrinterActivity:
- This is shown as a dialog-style overlay to indicate that the user will
return to the select-printers activity. It contains of three list that
are updated via separate loaders.
- The recommended services will be added later to keep this path set
small.

PrintActivity:
- There are two small places where we have to update the data when we
get a new list of print services.
- In very, very rare conditions it can happen that the print service
of the current printer gains or looses the "advancedOptions"
activity
- If we have no enabled print services we want to show "Add printer"
instead of "All printers...".
- Also the print registry is not the only loader anymore, hence we have
to assign loader ids to it to not conflict with the other loaders in
this activity.
- Small bug in onPrintersChanged: If a printer is selected and the print
service of this printer gets disabled the holder goes into "removed"
state which disables the printer. When the print service is then
enabled again, we forgot to re-enable the holder.

PrinterRegistry:
- The registry assumed that the FusedPrinterProvider was the only loader
in the activity. This is not true anymore, hence it has to assign the
appropriate loader ids.
- The FusedPrinterProvider has an internal loader, hence we have to
forward a loader Id into it.
- The PrintRegistry is only called backed for a single loader, hence no
need to check the loader-id.

SelectPrinterActivity:
- The AddPrinterDialog was removed as we now have the
AddPrinterActivity.
- Added a loader for the enabled services to update the empty state.
- Added dedicated loader Id for the PrinterRegistry again.
- If we have no enabled services, the SelectPrinterActivity chainloads
the AddPrinterActivity as this is the only thing the user can do
anyway. "Save a click". This should only happen when the activity is
create the first time.
- Moved the "add printer" from the menu item to the list of printers as
suggested by UX and Zach.

PrintManagerService, UserState and IPrintManagerParamtersTest:
- As the only place where the print service state is updated is now the
userstate, we have no more sychronization problems. Whohoo.
- The users can now register for changes to the print services similar
as they can register for changes to the print jobs.
- UserState.getPrintServices is the only function can exposes any
knowledge of the print services to the outside world.

Change-Id: I9be2c7300431e06aaff9bdf7eb36120d869b56ac
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
8141bdfa56f13c3946bed12ba7801e492ec25c11 22-Dec-2015 Philip P. Moltmann <moltmann@google.com> Store which print services are disabled instead of which are enabled

This make services that appreared while the print manager was not active
by default enabled.

In the case we upgrade from pre-N we convert the enabled-list into a
disabled-list.

Bug: 26249649
Change-Id: Iae783a8dd19f1a9d75d675710ea4348fdfbd34f3
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
bb9f686b40743df2642b7d3b7778dbf7284ae665 01-Dec-2015 Philip P. Moltmann <moltmann@google.com> Allow a print service to specify per printer icons, description and
info-activities

The icon is loaded from the discovery session only when it is displayed
to avoid having to store too many icons in memory.

Also the icons are not maintained in the historical printers. Only if
the printers are available nice icons are shown. A historical printer is
updated with the appropriate properties (including icon) once it becomes
available.

Bug: 24135005
Change-Id: Iec389bab514b024634be8fb5fc8928371cba8740
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
b3078c235e7674fd61be75fb469105ba6174aba5 24-Nov-2015 Philip P. Moltmann <moltmann@google.com> Allow print service to specify progress of print and status

The status has always been there in error cases, it is now also visible
in non-error cases.

If the progress is not set, no progress bar is shown.

Bug: 24135025
Change-Id: Iea23f45d236365433c6f6739597833d236ed6d19
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
853a6f564abaf8acbd88c6704008c5d150d00471 03-Nov-2015 Philip P. Moltmann <moltmann@google.com> Add a alert that allows the user to approve a print service when
we print using it the first time.

This warning used to be shown when the print settings app was used
to enable a service.

If two warning as shown for the same print service we automcatially
dismiss all dialogs once one dialog is confirmed. Please note that
we are not confirming the printjob as it is unexpeced to have a
single click to confirm multiple print jobs.

Change-Id: I8bb0a49bac2063c1c55e2f24bd34df2c44e2df89
Bug: 24135353
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
d69e4c1460017062e7c36be55801cb434ad19d97 24-Apr-2015 Dianne Hackborn <hackbod@google.com> Update use of procstate for services.

Now that we have a separate foreground service proc state
(above a sleeping top app), update various system services
to put their bindings into this state when appropriate.

There are two new bind flags for this -- one that just always
makes it a foreground service, another that only does it when
the device is awake (useful for things like the wallpaper).

And with all of that, tweak network policy manager to only
include apps that are at least foreground service state when
in power save and device idle modes. This will allow us to
further reduce the set of apps that have network access
(in particular not giving access to the current top app when
the screen is off), hopefully leading to even better battery
life.

Change-Id: I91d85a5c5ed64e856149e9a5d94a634a7925ec7f
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
f983d084e7b8a6de722d9cede1c0cf73831c8e92 02-Oct-2014 Svet Ganov <svetoslavganov@google.com> Increase bind remote print spooler timeout for eng builds.

bug:17734729

Change-Id: I70bfe3b64fca24752cf3efc225b21d5453e53b68
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
a798c0a984f29f7180883a61839f68d2cbf0c6ce 15-May-2014 Svetoslav <svetoslavganov@google.com> Refactor printing

Change-Id: I19850154ef2798afff511e4490a268ce38e8cbae
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java
9158825f9c41869689d6b1786d7c7aa8bdd524ce 22-Nov-2013 Amith Yamasani <yamasani@google.com> Move some system services to separate directories

Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
/frameworks/base/services/print/java/com/android/server/print/RemotePrintSpooler.java