- Propagate nullness and non-null-ness up and down from the interfaces.
- Add non-CTS print tests for IPrintManager binder.
Change-Id: I0c310d9cea8aefba5ce386931521ffaf19712bbb
The favorite printer list contains a printer multiple times as it might
have been used at different locations. Hence it can be that a printer is
in the favorite printer list multipe times but never considered close.
Hence we go into the second loop and add it multiple times as we never
add it to alreadyAddedPrinter.
Change-Id: I4ca8a6a5a05f43645a0b2c891a55df2ccce05ad4
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
location of the user.
Commonly the users prints on a printer that this near the user current
location. Hence if possible we want to show the user printers that he
used before and that are close to him.
Hence store the location of the previous uses of a printer and prefer
printer that are close to the user.
Unfortunately getLastLocation might not report a usable location and it
will take at least 5 seconds until the first usable location arrives. At
this time the user might have already opened the destionation spinner.
It would be unexpected for the printers to suddenly change under the
users finger. Hence it might be that we did first show the printer
without any location information and then once the location is known we
cannot update thedestination spinner anymore.
The select printer activity does not have this issue, hence in the worst
case the user has to enter this activity to select a printer and by then
the location is usually determined.
This is not ideal but better than before.
Bug: 24133609
Change-Id: Ie7d20cf3d9dd163e57903f8f6ecc0b3fd4f4374e
- Stop using deprecated APIs
- Fix all public and some internal javadoc
- Add @Decorations to public APIs
- Some minor cleanup, e.g. don't use variables with overlapping names in same scope
- remove unnecessary properties from manifest (they are set by the build
system)
Change-Id: I0ce8849a516414763fe9de76c3a18ce17d896816
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
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
This is a mechanical replacement of Context.getSystemService(String)
with Context.getSystemService(Class<T>) when retrieving
InputMethodManager. Note those are bundled code. Hence we don't need
to make sure Build.VERSION.SDK_INT >= 23.
Change-Id: Icc64942ad8f11e44bf84f8d4fe476b2fdd1257f3
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
* changes:
Create PrintDiscoverySession for future print services
Update printer availability when printSpooler is paused. This makes the window update syncronously when in multi-window mode.
We are not saving the state of this fragment on onSaveState,
so its Okay to loose state while confirming the transaction.
bug:25847358
Change-Id: I2f6587d528b2d8b8f24a83954cc896a6ff514996
When the configration changes there are two modes to handle it:
1. do through a onDestroy - onCreate cycle
2. declare that your activity can handle certain changed and handle them
in onConfigurationChanges
For most apps (1) is zero effort to implement, hence it is the default
behavior. You only want to do (2) if recreating your activity is
expensive.
As recreating the printActivity is expensive (and currently even
impossible) we want to handle the configuration change gracefully. There
is no code to be added as handling portrait mode / landscape mode switch
is not different from an orientation switch.
Bug: 25727559
Change-Id: Iac5b854c9dd080a4432957bc4551162dc3d480e9
The Spinner does not support a prompt, hence temporarily hijack the
first element and install an alternate view. Once the Spinner is touched
revert to the old behavior.
If we showed a prompt the views in the spinner cannot be recycled.
Bug: 24132864
Change-Id: Iaf97878f85388a8c6351e716117b16f34919ad84