Commit Graph

32 Commits

Author SHA1 Message Date
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Stanley Wang
5eb6e6dcc7 Modified the PrintJobSettingsFragment
Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.print
Change-Id: Ide889b273be21421753cec99ce391adb756ab05c
2018-11-02 19:39:25 +08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Philip P. Moltmann
b85ab7e979 Recover print job ID from intent extras
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
2018-03-21 08:13:45 -07:00
Philip P. Moltmann
c16600066a Print icons are now vector graphics.
Test: Looked at screens in setting that show this icon
Bug: 69175097
Change-Id: I06c4d37c7c3e641e83fa81d59b651c581e94a9f1
2017-11-13 14:13:17 -08:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Philip P. Moltmann
23176395a5 Setup up print settings fragments in onCreateView instead of onCreate.
Otherwise some of the layout is not yet set up.

Fixes: 29764546
Change-Id: Ia0716dd0603d66e8bf68494e426756bd553f1afd
2016-06-27 21:07:07 +00:00
Philip P. Moltmann
eb01628ba8 Update print jobs appropriately in the print settings.
- 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
2016-04-21 15:16:05 -07:00
Philip P. Moltmann
b05fbfa274 Use changed getStatus interface
Change-Id: I72a2aa74607e34a1afbef0982f634def3e30efd4
2016-03-24 16:53:44 -07:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Philip P. Moltmann
be37bdff48 Settings: Handle non-nullness of PrintJobId.unflattenFromString and printer.getName() correctly.
Change-Id: If22acfee7c6a7c21803fe79ff04f33181dd10167
2016-01-21 09:16:25 -08:00
Philip P. Moltmann
cb9deb035b Print-Settings Remove unused fields.
Change-Id: I2f48c7bb54ab960178a8b7858f8accfe34107d7d
2015-12-18 14:02:52 -08:00
Philip P. Moltmann
f793d63282 Show status of print job instead of deprecated state reason.
The state reason has been replaced by the more generic status.

Change-Id: I4fd525c77bd35f1f336fbeee7744f18b1444cf9a
2015-12-01 08:54:35 -08:00
Philip P. Moltmann
99f0bd4aa6 Change onResume -> onStart in the print settings to update even paused activities.
Change-Id: Ie28de2cd3ba02c3f19d11c61b3dbbce5d33ddb5a
2015-11-25 16:13:01 -08:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
John Spurlock
9a23adf69d Settings: Remove all unused imports.
Change-Id: Iebfa52cb849d69974c94902b0b020893cf5618a3
2015-03-18 15:51:15 -04:00
Svetoslav
6cfe799654 Settings not showing print jobs for a managed profile.
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
2015-01-13 18:48:33 -08:00
Svetoslav
43835e006e Crash in Settings cancelling a print job from the job list.
bug:17585582

Change-Id: I44aef7e09c26141388b410762e93164d8df9a0c6
2014-09-19 14:15:52 -07:00
Svetoslav
85dcef1226 Fix settings crash in print job screen.
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
2014-09-11 14:30:18 -07:00
Svetoslav
031e8b1432 Fix print icons in settings.
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
2014-09-10 18:33:32 -07:00
Svetoslav
4a361df54b Fix an occasional crash in print job state fragment in Settings.
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
2014-09-04 19:54:21 -07:00
Svetoslav
7662c1f21f am 03360cd2: am 196bc5c6: am e7b781f5: Merge "Show correct message for a print job that is being canceled." into klp-dev
* commit '03360cd23910c73c78a822c559acb3eb66a8e07b':
  Show correct message for a print job that is being canceled.
2013-11-14 22:34:13 -08:00
Svetoslav
97e962cd36 Show correct message for a print job that is being canceled.
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
2013-11-14 18:15:19 -08:00
Svetoslav
b05be5fe0f am be74fb8d: am 43b8946f: am d9f156dd: Coalescing multiple print job notifications (Settings)
* commit 'be74fb8d729828642cce0514e1043c290e8ceea0':
  Coalescing multiple print job notifications (Settings)
2013-10-10 10:24:35 -07:00
Svetoslav
d9f156ddf0 Coalescing multiple print job notifications (Settings)
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
2013-10-09 23:40:56 -07:00
Svetoslav
24e49f0613 Polish print settings accessibility.
bug:10983508

Change-Id: I986e28a2cd8e52b7c8422e825de9174d6e2377c3
2013-10-02 15:16:16 -07:00
Svetoslav Ganov
dc00bf6483 Missing return statement if a print job is no longer present.
bug:11012251

Change-Id: I2ea925d903571aa676e4c48d78b4c0c6a91d7af1
2013-10-01 00:23:51 -07:00
Svetoslav Ganov
bc2c3db8f9 Add print job settings screen.
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
2013-09-26 13:58:59 -07:00