History log of /frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
51efddbd3bb304de2dd47fa8cd1114ac555958bb 05-Apr-2017 Alan Viverette <alanv@google.com> Remove unnecessary casts on calls to findViewById

Just frameworks/ this time. More paths to come.

Bug: 24137209
Test: make -j32
Change-Id: Iff27abd26fa43296ac2fff8f534fc6742d2ae80c
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
383db5ebcc3a4a615faf249bf4f126f42e80b82e 22-Jun-2016 Tamas Berghammer <tberghammer@google.com> Update package names to work with the proto3 compiler

Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
3af7f8277fd99b8b52ef4ba7976fd6c614091352 26-Oct-2016 Philip P. Moltmann <moltmann@google.com> Show up button in select printer activity

Test: Selected a printer via select printer activity
Pressed up button in select printer activity (no printer get
selected)

Change-Id: Ifcd133eb0ceb973464cbd35b6ee87c9f09221af4
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
c8d6f54be3c05d13c63d2eb353eef9c24964630c 06-Oct-2016 Philip P. Moltmann <moltmann@google.com> Allow to select printer from info activity.

Test: Manual testing with modified experimental print service and new
CTS test for the new API
Fixes: 27746841
Change-Id: I4ef728e54679271a01397d9f04d3b8ac804ffcf3
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
2e3012624b703a653fed44d4dc1b8904406c0d99 16-Jun-2016 Philip P. Moltmann <moltmann@google.com> Add event tracking to print UI.

Bug: 29391676
Change-Id: Iec09ac7296e50329e87268bcb70f5e60d566961c
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
e951a139161db650ca711695f78a269e4daaf819 17-May-2016 Philip P. Moltmann <moltmann@google.com> Declare no print services if 0 print services are enabled.

Fixes: 28833953
Change-Id: I94e77dc23107fab10d45f51169d71e4da574ee66
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
3df18a94657e1554ed1aca87b5aedbc2d7eb7a48 02-Apr-2016 Philip P. Moltmann <moltmann@google.com> Prefix printer description with service-label instead of package-label.

Change-Id: Ibe98e0037ad8d62b27b10b72d75fb2e548d0ee90
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
63ce0b737c022281ce4c36e1d90ed9b0270512f0 08-Mar-2016 Philip P. Moltmann <moltmann@google.com> Rewrite workflow on how the destination printer is selected.

This fixes two bugs
(1)
1. Printer was unknown when "all printer" activity was opened
2. Printer gets selected in "all printers" activity
3. Printer is unknown at the time the activity returns and thereby does
not get selected

(2)
If a print service gets disabled _all_ printers of the print service
will be marked as "removed" but do not removed from the adapter. This
is superflous as none of them can be selected anymore. The only thing
we want to make sure of is that the currently selected printer does
not get removed.

The workflow is now always:
- set mCurrentPrinter if needed
- Adjust mPrinterHolders
- adapter.notifyDataSetChanged()
-> PrintersObserver.onChanged()
-> onItemSelected

Bug: 27643305
Change-Id: I35ea7078367ad5a918c6362c04a26c4326e6c3f4
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.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/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
56190d5e4b9d940ee64fccd75f3759e68bee15a7 02-Feb-2016 Philip P. Moltmann <moltmann@google.com> Merge "Also search in description when filtering printers."
443075ab9784f168fc7a73bb09dabf8bf7ab308e 26-Jan-2016 Philip P. Moltmann <moltmann@google.com> UI improvements for the print spooler

- gray out printer icons of unavailable printers
- Increase touch target of more into button
- Use same info icon as in the Settings
- Align text correctly in destination drop down
- In general use same layout as generic list-item (as much as possible)
- remove unnecesary color file

Change-Id: I8b0339df0cb6a5130b5530f21c4ef86cb75a683b
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
e58d8ff1fbb9d53d9b2ae941fb00721e6195213e 26-Jan-2016 Philip P. Moltmann <moltmann@google.com> Also search in description when filtering printers.

Bug: 26780192
Change-Id: Icd95e7e4daee21bd5904d3a271f306864cf47631
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
5462e88c0272d08773ac6cd16cce435c32d2d9bf 20-Jan-2016 Philip P. Moltmann <moltmann@google.com> Treat empty strings similar to null-strings when composing the subtitle in the SelectPrinterActivity.

Change-Id: Ia0ee353df56b2f835f1ac291dc69eb3747425e6b
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
1f46779f5ecaa9e71bf91474160007203b213fc2 08-Jan-2016 Philip P. Moltmann <moltmann@google.com> Display toast when print services are disabled.

Change-Id: Id1ebcbbf39eb558bc15c7c69c03fe8124b9c79d7
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.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/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.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/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
03755a1f12390be9ddfcce8c5ad3f887fa5ccf9f 25-Nov-2015 Philip P. Moltmann <moltmann@google.com> Syncronosuly notify SelectPrinterActivity about changes to enabled print
services

If the SelectPrinterActivity is visible it shows different emptyState
depending on if there are print services available or not. Hence the
activity has to listen to changes to the list of enabled services.

This also fixes a small syncronsation problem if two observers are
registered for the enabled print services.

Bug: 25666802
Change-Id: I79af66f25f10e66347b48ce9bb99c1657b30a8dd
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
953639cb826ad5fb85fcc18cbc0833a9dedb8227 12-Nov-2015 Philip P. Moltmann <moltmann@google.com> Do not disable the add printer icon and have special empty view if no
print services are enabled

The add printer icon is always visible as this is used for both adding
a printer and adding addition print services

We have three different empty views now:
1. No print services
2. No printers found (not search filter set)
3. No printers found (search filter set)

Bug: 24132367
Change-Id: Ic30812b60986f1e0f023488cefc6aa901ce20824
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
309f6a0e1b2ec39bd516fdfe217a526fe4b8acf6 19-Aug-2014 Svetoslav <svetoslavganov@google.com> Update the print spooler icon.

Removed a duplicate resource also defined in the platform
resources. Added a tint to the print spooler icon.

bug:16568027

Change-Id: I1c0b9a7bd75bc59d1d86653c05d8fc2bb77056c1
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java
a798c0a984f29f7180883a61839f68d2cbf0c6ce 15-May-2014 Svetoslav <svetoslavganov@google.com> Refactor printing

Change-Id: I19850154ef2798afff511e4490a268ce38e8cbae
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java