History log of /frameworks/base/core/tests/coretests/src/android/print/BasePrintTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
59b0fbd1048521fed9180d592b689c4aa3d81a97 29-Sep-2016 Philip P. Moltmann <moltmann@google.com> Update print attributes when printer gets selected

Test: Add new non-CTS print workflow tests. These tests will cover
general printing workflows such as the situation fixed in this
change.
Change-Id: I33b6842bba164c45a6afbc09f2e0c9b0a523ef30
/frameworks/base/core/tests/coretests/src/android/print/BasePrintTest.java
3ae33bd02802878f6d208c351c4721d832a920ae 28-Sep-2016 Philip P. Moltmann <moltmann@google.com> Make print core tests junit tests.

Test: Ran this test
Change-Id: I956a0b94c089445d925ee0cfec0949067a48daed
/frameworks/base/core/tests/coretests/src/android/print/BasePrintTest.java
23cbe85610f780134cc77dd4a54732a22ed6e86e 18-May-2016 Yohei Yukawa <yukawa@google.com> Move LocaleList to avoid layering violation.

Since LocaleList needs to depend on android.os.Parcelable, we cannot let
that class belong to "android.util" package, which causes layering
violation.

Bug: 28819696
Change-Id: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18
/frameworks/base/core/tests/coretests/src/android/print/BasePrintTest.java
e54d79c4cd6f90ccc6288df7a09d91698d603d9e 29-Mar-2016 Philip P. Moltmann <moltmann@google.com> Add cancelation signal to OnRequestPrinterIcon.

Change-Id: I072d2c15e8df104a8b902c10d14d9f02040ace5f
/frameworks/base/core/tests/coretests/src/android/print/BasePrintTest.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/core/tests/coretests/src/android/print/BasePrintTest.java
fee44846376c212114223fc4259382921e6dca7a 05-Feb-2016 Roozbeh Pournader <roozbeh@google.com> Various LocaleList cleanups

- Remove the LocaleList#getPrimary() API. It had become confusing
after locale negotiation was completely implemented. For example,
it could create the confusion that calling getPrimary() on the
default locale list would provide the default locale, etc.
- Use the adjusted locale list from LocaleList.getAdjustedDefault()
in Paints created with no locale list provided.
- Change LocaleList#get() to treat out of bound indexes from both
negative indexes and too large indexes the same way.

Bug: 26984092
Bug: 26193251
Bug: 26834387
Change-Id: I75f77aea6b75e38793ed8477e5e5a4420d5e6d85
/frameworks/base/core/tests/coretests/src/android/print/BasePrintTest.java
76d7e3ee70c4299b22b1a03505d2b4f108716c75 15-Jan-2016 Philip P. Moltmann <moltmann@google.com> Check parameters for callers of IPrintManager

- Propagate nullness and non-null-ness up and down from the interfaces.
- Add non-CTS print tests for IPrintManager binder.

Change-Id: I0c310d9cea8aefba5ce386931521ffaf19712bbb
/frameworks/base/core/tests/coretests/src/android/print/BasePrintTest.java