Commit Graph

93 Commits

Author SHA1 Message Date
Philip P. Moltmann
6a6db008a9 Hide unused recylerview to not confuse talkback.
Fixes: 31088913
Change-Id: I1394cec881d8a1944004a69bc787e5341f8c9ddc
2016-08-29 18:03:26 +00:00
Philip P. Moltmann
1ba9127696 Set Fragment title in onCreate.
To allow the accessibility to read the title early enough.

Fixes: 30677578
Change-Id: I2dbd8f0fa7697038cf69e0282ebcb590fbc64cc2
2016-08-08 18:12:36 +00: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
7978909120 Do not set order for print services settings.
What happened before was that negative number turned out to be order
behind ORDER_LAST.

Change-Id: I714f623a2b1be06dde86ae7f36b39c64006203f2
2016-05-04 09:44:06 -07: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
Philip P. Moltmann
3e4c0d8789 Correctly compose activity name of add-printer and print-settings
activity

Previously we were missing to specify the service's package name, hence
we did not have a complete component name.

Bug: 27567031
Change-Id: I88c515a0b8a9defd6329309574aaa8a8e053fddb
2016-03-09 12:42:33 -08:00
Philip P. Moltmann
7833d183e7 Deal with the case that no print services are installed.
Bug: 27530312
Change-Id: Idd709e66d72efcca4928b471f138f8be66e7ab00
2016-03-07 15:32:28 -08:00
Philip P. Moltmann
d9779db8c9 Make Print Settings use the new PrintManager.getPrintServices loader
This makes sure that all data always stays up to date.

printer_dropdown_item.xml:
- Reduce the amount of overriden properties

PrintServiceSettingsFragment:
- Instead receiving most data from PrintSettingsFragment have own loader
  and keep data up to date
- Also the updating of the print service state now has a dedicated
  PrintManager call instead of relying of the Settings-ContentObserver
  to transport this information. No more race-conditions, whohoo!

DynamicIndexableContentMonitor:
- To not rewrite too much code the update logic has to live here but the
  reading of the actual data is in PrintSettingsFragment.

Change-Id: I60715cda8952565d7f68cb24fb7da61a37085887
2016-03-07 09:32:55 -08:00
Philip P. Moltmann
24264eb250 Do not count print jobs if printing is not available.
Bug: 27339883
Change-Id: I0b0761917798581e831e8b2692fdc9c5fefb1155
2016-02-25 13:07:26 -08:00
Philip P. Moltmann
83fb795e8a Use same printer-list template as in the print spooler.
Bug: 26780325
Change-Id: Ic333027aa0d158ad51608565af624b0c1cb10cfa
2016-01-29 10:49:08 -08:00
Tony Mak
78d1ca1c2a Merge "Default apps setting for managed profile" 2016-01-27 17:17:44 +00:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Tony Mak
32ccffc07c Default apps setting for managed profile
1. Print settings already support managed profile. Follow the UI of that.
ProfileSettingsPreferenceFragment is created to act as the base class
for per-profile setting.

2. Only show browser and dialer default setting in managed profile.

BUG=26707733

Change-Id: I20d00203e14db58ec03638f692dd83a1bd50c59c
2016-01-27 14:01:16 +00: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
43335444ef Small corrections to the code that generates the print summary in the settings.
- Optimize when the listener is active and rely on it to be cleaned up
  automatically
- Only count print jobs that should be shown (i.e. not ones that are
  already finished.)

Change-Id: Idba995f1036e736f47ca7402d493210600eae91c
2016-01-07 14:22:20 -08:00
Philip P. Moltmann
fae4a88530 Use disabled print services instead of enabled print services in print settings.
Change-Id: I32bc8a8dda86f92b180f043a98b304fe676db98c
2016-01-07 09:30:43 -08:00
Philip P. Moltmann
738e6db7b8 Display number of print jobs as summary in settings app.
Change-Id: I4309c67fb62171c7b4f0f5fdd86454f155a3ec01
2016-01-07 08:28:18 -08:00
Philip P. Moltmann
7fdf34194b Use new getIcon and getMoreInfo api to show more information in Print
Settings

Also fix some text color of the printer list.

Bug: 24135005
Change-Id: I3c387e1277b2a7f09574d42cfe29cc03dd8ef8d5
2015-12-21 09:38:13 -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
Julia Reynolds
0c1085e191 Fix print settings crash.
Bug: 25889661
Change-Id: I691b913ce0adc06c29c21ad12d979a0d0e3ad8e7
2015-11-30 13:32:30 -05: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
Philip P. Moltmann
86846685a0 Finish adjusting the code of PrintServiceSettingsFrament to the changes made
in the layout.

Bug: 25645752
Change-Id: I54401075d4c604850287c7dd101cf4f4b4f21459
2015-11-12 16:11:27 -08:00
Philip P. Moltmann
68d6e32b65 Merge "Remove warning message when enabling a serive and enable new services" 2015-11-09 18:38:22 +00:00
Philip P. Moltmann
849c05f342 Remove warning message when enabling a serive and enable new services
The warning message will be moved to the print spooler and displayed
when the user issues the first print job to the service.

Change-Id: I121ad0b46e5b3e25e68db4cc67a59fbaf15c70c3
Bug: 24135353
2015-11-06 17:13:06 -08:00
Jason Monk
af00109242 Settings Drawer: Support multi-user changes
Change-Id: I3a6e481ca18794bf1ed3bc9dc0382deacfcf81f4
2015-11-04 13:16:18 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Makoto Onuki
077a7173c6 Set service name to printer service setting title
Bug 21899319

Change-Id: I940957dd4036eb3386c7f59fbbd3608e7169f415
2015-06-22 13:43:49 -07:00
Makoto Onuki
0ec96fe64c Promote "add service" from menu to list item
Also show the app icon for each service.

Bug 19914125

Change-Id: I592c526746a3ec9f67e8e8a6c6f1530e7724e310
2015-06-11 14:26:29 -07:00
Maurice Lam
28c3f6bb71 [WifiSettings] Add progress bar when scanning
Add a progress bar when the Wi-Fi screen is in a transient state,
like enabling, disabling Wi-Fi and scanning for network. This change
sets the progress bar as a pinned header at the top of the activity.

The pinned header container needs to be match parent so that the
progress bar can occupy the full width of the screen. If the header
view doesn't want to fill the width, then the header view *inside*
the container should be wrap_content.

Added an overloaded setPinnedHeader method that takes a layout
resource ID, and returns the view to the caller. This way the
inflater can set the parent property so that layout params will not
be ignored.

Bug: 17389577
Change-Id: I18d0eb7c72ad31d1c4b35a54789016c32c81fb93
2015-04-29 22:38:22 -07:00
Jason Monk
23acc2bb8a Allow help to be defined to intent uri
Allow help uris to be either an intent uri or as uri (as they were
before). Also add a default help uri, and specific helps for several
screens.

Bug: 15475009
Change-Id: Iff982892973f01d32ff61ea88d4844e9a7153500
2015-04-14 15:43:20 -04:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
Jason Monk
2ebc8a0169 Allow system apps to add to settings dashboard
Allow system apps to add a tile to the top level of settings that
links to an activity through adding a filter for a specific action.
Determine the info for the tile based off manifest info for the
activity. Also allow the same for managed profiles, but show a dialog
in between to select which profile.

The category in which the item is to be placed must be in meta-data.
The icon and title can be specified through meta-data as well or
if unspecified the activity's label and icon will be used.

Also added an optional <external-tiles> tag to the dashboard
category xml, this allows Settings to put external tiles
in the middle of some categories (Personal does this).

Bug: 19443117
Change-Id: Idc9938d1549d181103a3030a8784b527215a8399
2015-03-25 11:11:36 -04:00
John Spurlock
9a23adf69d Settings: Remove all unused imports.
Change-Id: Iebfa52cb849d69974c94902b0b020893cf5618a3
2015-03-18 15:51:15 -04:00
Svetoslav
b428346fd3 Fix crash in print settings utils
Change-Id: I8000b674c0579988d6dfae2fcff136a06c721362
2015-02-03 21:58:11 -08: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
Raju Yadav
21dba1f0e7 IllegalStateException fixed in print service settings
Settings crashed due to IllegalStateException
as OnQueryTextListener refers to an already
detached view. The listener is set to null
on press of home key (onPause).

Change-Id: I96052f95689ae17dd1b4e9d1c313100b7b47a599
2014-11-25 15:08:14 -08:00
Alexandra Gherghina
06cd50177a Reset spinner selection
This makes sure that when you go back to the spinner screen, the
selection is the one corresponding to the current profile.

Bug: 17378446
Change-Id: I536cc2701f9481986a63df1b01a38151edf2fa83
2014-10-16 23:05:49 +01: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
Alexandra Gherghina
80cd373263 Merge "Reset Settings task when using the user switcher" into lmp-dev 2014-09-08 08:04:44 +00:00
Alexandra Gherghina
56645002b2 Reset Settings task when using the user switcher
Bug: 17294618
Change-Id: I8bd9d7226e52017938828f3bc195cc995fe80b20
2014-09-05 11:39:39 +01: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
Alexandra Gherghina
80e1f1bfdb Extract common functionality for profile spinner into Utils
Bug: 16645615
Change-Id: Ic8928fff8294cd99eeb86b69b44b8e4128cadf92
2014-07-31 18:38:47 +00:00
Svetoslav
01daaca547 Remove unnecessary code.
Change-Id: I4a81cd7f855bb075ab71f6c6c812288e3677c90a
2014-07-29 13:16:12 -07:00
Alexandra Gherghina
fe47a8dc89 Toggle between primary and managed profile in Print Settings
This adds a spinner to the print settings screen which can be used to toggle
between the Settings app in the primary and managed profile so that the user
can edit settings belonging to both profiles.

Bug: 16369104
Change-Id: I2556a331d09379c2a501bc6b192ab1631b5215f5
2014-07-29 10:22:15 +01:00
Fabrice Di Meglio
d729029b90 Fix some Dashboard top categories not showing for Search
- fix Date & time / Printing / Security

See bug: #12910134 Implement Search into the Settings App

Change-Id: I7e96eb35a6802fde7589ccfe244e71f8be43dea8
2014-07-01 14:32:03 -07:00
Fabrice Di Meglio
006b2cca13 Fix bug #15897505 Talk back state shows "off" while the talk back is still enabled.
- we were missing the update of the TextView from the SwitchBar so provide a new
setCheckedInternal() method that is doing the TextView and Switch update at the
same time

Change-Id: I6dd9c472a386bb534a58fbf5cf82d9d01fa74f6c
2014-06-27 19:13:19 -07:00