Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
If the fragment was started via ACTION_PRINT_SETTINGS the intent extra
does not get transformed into a fragment argument. Hence need to check
the intent extra.
Fixes: 74456525
Test: Opened print job settings from a print notification,
atest com.android.settings.print.PrintJobSettingsActivityTest
Change-Id: I6c4605309c348456a862c4d7b48a11400b62fb70
Bug: 30681771
Test: SettingsUnitTests
Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.
Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
- Always use a fresh print job as once the print job goes away it cannot
be read. Before we were stuck with the last state which might not been
the last state
- make loaders relative to fragment to avoid loader id duplications with
other ids of the activity.
Fixes: 28315242
Change-Id: I57eeb64b44b5d77b2092c22b175407131f7baf97
The settings app is shared among the personal and work profiles.
When fetching print jobs it was not getting the ones for the work
profile, rather the ones for the current user which is the personal
profile.
bug:18867406
Change-Id: I99f8cf3a3e2b133a0a4d5a8915473d1190e205f4
The code was looking up the print job from the print manager
based on the lifecycle event of the hosting fragment. There
was a case missing and the print job not initialized on
rotation. This change looks up the job lazily making the
code more robust.
bug:17471952
Change-Id: I00075e161f69ca711bac6857f5ec00c20b5b17a0
The print icons are in the framework resources and are not tinted
to enable usage from various places such as print spooler and
settings with different tinting. Settings was using not-tinted
print icons which were invisible on the white background. This
change switches settings to user tinted drawables.
bug:16966145
Change-Id: I2cf55d36d90b0192ba23686aac4f1d8e7e23f75a
There is a NPE in the print settings if the following occurs:
We open the print job state UI in settings for an ongoing print
job (now we have action bar buttons for cancel and restart);
now the print job gets completed and we update the UI and
since the print job is not longer present we nullify the current
job reference and finish the activity. But since activity
is not finished immediately there is an opportunity for the
user to click on the action bar options which results in NPE.
The fix is to not update the print job instance in the update
UI method if the job is not available, i.e. the update method
does not mutate state if the job is no longer present, as we
are finishing and performing an operation on a finished job will
have no effect.
bug:17387134
Change-Id: I501ed1e05b8b70584b3299a16e93ead5ab7f155f
1. If a print job is being canceled we now show appropriate
message that matches what the notification shows.
2. If a print job is being canceled we do not show the cancel
button.
bug:11696928
Change-Id: I0fc4f8226c4aa9acd6a4b65811f4228e56018315
We used to show a single notificaiton for every print job but
this is against th UX guidelines. Since we have to lead by
example, this change adds coalescing of multiple notifications.
bug:11155212
Change-Id: I865450495e7e85bd6620c1f42aeef07d2f83a01a
Added a list of active print jobs to the main print settings
screen. Selecting a print job from there leads to a print job
settings screen with more information about the print job and
actions to change the prit job state such as cancel and restart.
bug:10935736
Change-Id: Idd6826a998309941c3d8478dafe4b039c8ca4f45