b3baaab4af7e1ed8dfc5da1c976cc34d135fb82b |
|
11-May-2018 |
Philip P. Moltmann <moltmann@google.com> |
Allow Print subsystem to work with services provided by instant app Most functionality works, but the PrintActivity cannot directly interact with the instant service. As instant services should only appear in tests this functionality needs to be enabled via shell commands. Fixes: 79484768 Test: cts-tradefed run commandAndExit cts-instant-dev -m CtsPrintTestCases cts-tradefed run commandAndExit cts-dev -m CtsPrintTestCases Change-Id: Ie4663c72b8c0f959b5d172ef28875479d120e386
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
1dcd64578992a650f3134be2178694ce0b6ee9d8 |
|
23-Feb-2018 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Use PooledLambda in print code"
|
9f35ca996432e960b77eb194975e2086d7c18aff |
|
13-Feb-2018 |
Eugene Susla <eugenesusla@google.com> |
Use PooledLambda in print code This replaces the usage of handler message types with PooledLambda Test: atest CtsPrintTestCases Change-Id: I19b01278b67b5fe18d48a2e0bb8300bbe1413a63
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
e65a9b8ebe464c52c565802a4a24232cc108dffe |
|
21-Feb-2018 |
Philip P. Moltmann <moltmann@google.com> |
Create print job when print activity starts This guarantees that the print job is created before the print activity deals with it. Test: CtsPrintTestCases Change-Id: I3451fff71bd981beb45882b7b42d4cc49d63a91c Fixes: 73127052
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
371a3b879ba82bbe5a4d914328a20659131d0220 |
|
26-Jan-2018 |
Philip P. Moltmann <moltmann@google.com> |
Dump usb as DualDump This allows to dump the USB state as proto-buf. This in turn allows to automatically process this data. Test: adb shell dumpsys usb incident_report usb No automated test possible as no field is guaranteed to be set Change-Id: Ifdf22bfaf9c78226c420b11c43278013ce69f849
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
bd62e9ae145c638845e41286156eca6e2d44a8ea |
|
17-Jan-2018 |
Philip P. Moltmann <moltmann@google.com> |
Follow up I1f0c56651eaa59f0ce90cdb08c71e89a96c48dd4 Beside addressing the comments on this change, this adds a check that the token in end( is correct and prints a message if not. This is useful when creating new dumping methods. Test: adb shell dumpsys print Change-Id: Ic2e6152cbd82f98d9d305a15edffc69c55fd1fd3
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
9a534c01ecd4a1442856c1b709e23b61f1baf9ba |
|
16-Jan-2018 |
Philip P. Moltmann <moltmann@google.com> |
Only have one way of dumping print manager state Add a class DualDumpOutputStream that maps proto-dump commands onto print writer commands. The effect of this is that there is only one - very proto dump like - way to dump the print manager which is much easier to maintain. The DualDumpOutputStream tries to produce a result similar to the incident-report tool. Test: adb shell dumpsys print Change-Id: I1f0c56651eaa59f0ce90cdb08c71e89a96c48dd4
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
2f5ee71ec851b1149b4e10ec211ad520cd73776e |
|
24-Jun-2017 |
Eugene Susla <eugenesusla@google.com> |
PooledLambda This introduces PooledLambda - a way of obtaining lambdas without the allocations overhead. See PooledLambda javadoc for a guide and PooledLambdaSample for code samples of useful usages. Test: ensure samples of PooledLambdaSample work as described. Change-Id: I46f8ad27bc1de07e19f6e39f89d2cafe4238497a
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
a9a65af6ac4414b2df2a17bb2d3d5fb9254450c3 |
|
14-Nov-2017 |
Koji Fukui <koji.fukui@sony.com> |
Merge "Stop observing death of PrintManager listener when it is removed" am: e7240a52e2 am: 5cb172d17e am: 9e3ff42caa Change-Id: I3d643e52e86bbd4ff9bd588fba51fce82fbb35e9
|
05b6857f6b4b4ce7c0e4df38d38264bf42297d3b |
|
20-Oct-2017 |
Koji Fukui <koji.fukui@sony.com> |
Stop observing death of PrintManager listener when it is removed Symptom: Global reference table overflow happens on system_server. Root cause: When a listener is added to the PrintManager, death notification for the listener is registered. So the listener is added to global reference table. But the death notification is not unregistered when the listener is removed from PrintManager. The listener isn't removed from the global reference table until client process die. If client process repeatedly add/remove listener, the global reference table overflow. Solution: Call unlinkToDeath() when the listener is removed from PrintManager. Test: cts-tradefed run cts-dev -m Print Bug: 68746445 Change-Id: I0b133e4607317a15e51bdf6e1248552dcc920d6d
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
c0a128dc2b3e7af35cb39d5157ca4de9147aa3c8 |
|
19-Jun-2017 |
Philip P. Moltmann <moltmann@google.com> |
Dump print manager as proto Test: incident_report print. Having no entries Change-Id: I3c7d611e44c0d3bf8e00775b1708bd82a334121a
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
a76f1cbd1d89d98318eb44dcc87e488647779dcd |
|
13-Jun-2017 |
yangbingqian <yangbingqian@xiaomi.com> |
Merge "remove the lock-use for prunePrintService in case blocking main thread" am: b124bea782 am: 60246acdbf Change-Id: If773ac8166bee1e92168f4df7a9de2dd7cea190f
|
82cff68a3ad08c908a29174a523fecc3ad9be248 |
|
12-Jun-2017 |
yangbingqian <yangbingqian@xiaomi.com> |
remove the lock-use for prunePrintService in case blocking main thread As in the change: I4f4cdaba65132dc2ef054877cbb097b499a723f6 the lock object is removed when calling RemotePrintSpooler and so as it in the method prunePrintService(). But in the constructor of UserState, the mLock is still held when calling prunePrintService(), it may also block the main thread It is better to take it out of the synchronized block Test: null Change-Id: I709b491d611dbcbf21a5fd493b879ed290dd0247 Signed-off-by: yangbingqian <yangbingqian@xiaomi.com>
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
7e01895e6972c0ebc552215b1207a519529af3fd |
|
02-Apr-2017 |
Philip P. Moltmann <moltmann@google.com> |
Return inet addr for discoverable printers ... by extending the RecommendationInfo to store the inet addresses not just the count. Thankfully the recommendation plugins already contained all the printers, not only the count. Also expose the print service state as system APIs as they will be used by the default print service. Bug: 35765644 Test: Ran AddPrinterActivity on network that had printers to discover Change-Id: I929a177adb75f6848848ba30a472cf0343d2e67e
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
383db5ebcc3a4a615faf249bf4f126f42e80b82e |
|
22-Jun-2016 |
Tamas Berghammer <tberghammer@google.com> |
Update package names to work with the proto3 compiler Bug: b/28974522 Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
1d6e7cc536cb7f49b318f630ad8f2eb348786716 |
|
24-Aug-2016 |
Philip P. Moltmann <moltmann@google.com> |
Hold no locks when calling RemotePrintSpooler The calls might be blocking and need the main thread of to be unblocked to finish. Hence do not call while holding any monitors that might need to be acquired the main thread. The calls that have been moved out of the lock: - Icon related calls: These are just caches. Hence we flush the cache we just request the icon again - Prune call: This just removes not installed print service from some data structure. The order of two of these calls does not matter as the end result of both removals will be the same, regardless of order. Testing done: Reinstalled a print service multiple times. Before the first reinstallation locked up the userState, now not anymore Change-Id: I4f4cdaba65132dc2ef054877cbb097b499a723f6 Fixes: 31043684
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
e2ad85d230392e18013bc50f37b46268aa4245a6 |
|
24-Aug-2016 |
Philip P. Moltmann <moltmann@google.com> |
Hold no locks when calling RemotePrintSpooler The calls might be blocking and need the main thread of to be unblocked to finish. Hence do not call while holding any monitors that might need to be acquired the main thread. The calls that have been moved out of the lock: - Icon related calls: These are just caches. Hence we flush the cache we just request the icon again - Prune call: This just removes not installed print service from some data structure. The order of two of these calls does not matter as the end result of both removals will be the same, regardless of order. Testing done: Reinstalled a print service multiple times. Before the first reinstallation locked up the userState, now not anymore Change-Id: I4f4cdaba65132dc2ef054877cbb097b499a723f6 Fixes: 31043684
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
df4a7ad5d19cab52944d44944581518909bd881b |
|
28-Jun-2016 |
Philip P. Moltmann <moltmann@google.com> |
Merge \\"Always reload print services\\" into nyc-mr1-dev am: fd28d8ebd1 am: 14a4ec6574 Change-Id: I4d6afaca275e5596d601c707eeea928d4f089932
|
0de4834dd8280474a11f16470d94f53dd54eb1cc |
|
28-Jun-2016 |
Philip P. Moltmann <moltmann@google.com> |
Always reload print services We want to reload print service if anything relevant changed. E.g. this can be the label. Which label is loaded depends on the the resolve info and the package manager. Hence short of reverse engineering what fields are used to determine how this is done it is very hard to say how we figure out the label. Hence the only option we have is to reload the print services every time a print services is added, removed or changed. Change-Id: Iff5a05dd1cad923da42c360a88559a2cc61c95aa Fixes: 29765394
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
2e3012624b703a653fed44d4dc1b8904406c0d99 |
|
16-Jun-2016 |
Philip P. Moltmann <moltmann@google.com> |
Add event tracking to print UI. Bug: 29391676 Change-Id: Iec09ac7296e50329e87268bcb70f5e60d566961c
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
e8bffdccd178c6118bce3f80c841f90db1051fa5 |
|
11-May-2016 |
Philip P. Moltmann <moltmann@google.com> |
Reconnect to service when it is updated - Remove service from mActiveServices when the binder died. (before update) - Treat the failure to bind as if when the binder dies. (while updating) If the service is removed for mActiveServices, onConfigurationChanged will automatically restart the service. Fixes: 27977706 Change-Id: I643248f56a9f2f4b7dce63cc1489a60739ab4537
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
640918f9117faa5fa6fdb9fe0947267de51cced9 |
|
28-Apr-2016 |
Philip P. Moltmann <moltmann@google.com> |
Check if records is inited before removing items The record might already be removed and the records array set to null when the binder dies, hence handle the scenario. Bug: 28512952 Change-Id: Id21b03b6d14d1dc8cb792ee4ec0519287a289a33
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
4bd8fac48ed28494ca24e456e20b3058f78e8fe9 |
|
22-Apr-2016 |
Philip P. Moltmann <moltmann@google.com> |
Send update notifications when the status of a print job updates and make sure to only access mPrintServicesChangeListenerRecords when locked. Bug: 28315242 Change-Id: Ie41ee695e6b1b0394e55538b9d9edaee0610f1e0
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
9dcb86a48d73f399fb1b5c020005d76d350eeac2 |
|
14-Mar-2016 |
Philip P. Moltmann <moltmann@google.com> |
Add the print service recommendation service This service connects through the print manager to the print spooler: PrintSpooler.AddPrintersActivity <-> PrintManager <-> PrintManagerService <-> UserState <-> RemotePrintServiceRecommendationService <-> PrintRecommendationService <-> PrintRecommendationServiceImpl Hence there is a lot of mindless plumming. The actual changes are only in the AddPrintersActivity which is extended to show another list of services: The recommended services. The PrintServiceRecommendationService is based on the experimenal print service stubs provider. This provider was contributed the Android by Mopria. As this services uses Android own network discovery service most code from the experimental provider goes away. In fact the only logic left over is the selections of mdns-txt fields to look at and the printer vendor configuration. This relies on the Android MDNS to get fixed (Bug: 27696905). This also does not deal with how to update the recommendation service. Bug: 24533249 Change-Id: I6edc6e25fc08a50d478b61c71bb8ea158b08624c
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
e8ae15482eef7617494cb3187899983e27cb8a35 |
|
22-Mar-2016 |
Philip P. Moltmann <moltmann@google.com> |
If the print spooler gets started onUserUnlock use less of a priority to have less impact on the system. Bug: 27746455 Change-Id: I3ae0a755e8f4c212a111d76ec6ef042654589510
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
f0847871eaf5cdcf697f07f013efee3d84d836f2 |
|
08-Mar-2016 |
Philip P. Moltmann <moltmann@google.com> |
If services are enabled, services might become enabled in the future Hence we always, always want to start a session if this is requested. Bug: 27643066 Change-Id: I0fbf3ea8554de83d5ec6dc61b6b36f3783aab427
/frameworks/base/services/print/java/com/android/server/print/UserState.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/services/print/java/com/android/server/print/UserState.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/services/print/java/com/android/server/print/UserState.java
|
05e34230709282f21d0df21b4bd69f6a4c5cf580 |
|
12-Jan-2016 |
Philip P. Moltmann <moltmann@google.com> |
Deal with UserState#getEnabledPrintServices returning null. Bug: 26492364 Change-Id: I234b1632168c88d32bdd134630442756701118b6
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
cd65448ccd13c4c2d0fe9e9623fec3a898ab9372 |
|
09-Jan-2016 |
Jeff Sharkey <jsharkey@android.com> |
Even more PackageManager caller triage. Finish moving all UID/GID callers to single AIDL method that requires callers to provide flags. Triage AppWidgets and PrintServices, which currently can only live on internal storage; we should revisit that later. Fix two bugs where we'd drop pending install sessions and persisted Uri grants for apps installed on external storage. Bug: 26471205 Change-Id: I66fdfc737fda0042050d81ff8839de55c2b4effd
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
8141bdfa56f13c3946bed12ba7801e492ec25c11 |
|
22-Dec-2015 |
Philip P. Moltmann <moltmann@google.com> |
Store which print services are disabled instead of which are enabled 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
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
bb36206f08797156caed236671d36b5a34682f95 |
|
23-Dec-2015 |
Philip P. Moltmann <moltmann@google.com> |
Rename variable that hides the contatining classes name. Change-Id: Iad0a9b341a866d33d10b7a389d243e677a65057c
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
bb9f686b40743df2642b7d3b7778dbf7284ae665 |
|
01-Dec-2015 |
Philip P. Moltmann <moltmann@google.com> |
Allow a print service to specify per printer icons, description and 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
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
e3ce0a4051fd212157a059d5c503ea7a2e127cf2 |
|
20-Nov-2015 |
Philip P. Moltmann <moltmann@google.com> |
Create PrintDiscoverySession for future print services If we currently don't have any print services we still want to register a print observer so that when in the future a new service comes along we can connect this service to the observer. Bug: 25666802 Change-Id: I0cc28e92e0000fc9b5372733390095f3a8b19bc9
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
853a6f564abaf8acbd88c6704008c5d150d00471 |
|
03-Nov-2015 |
Philip P. Moltmann <moltmann@google.com> |
Add a alert that allows the user to approve a print service when we print using it the first time. This warning used to be shown when the print settings app was used to enable a service. If two warning as shown for the same print service we automcatially dismiss all dialogs once one dialog is confirmed. Please note that we are not confirming the printjob as it is unexpeced to have a single click to confirm multiple print jobs. Change-Id: I8bb0a49bac2063c1c55e2f24bd34df2c44e2df89 Bug: 24135353
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
b0a78390ed834724e9c6adf0feff9931d7f9ec10 |
|
11-Apr-2015 |
Svetoslav <svetoslavganov@google.com> |
Add a mechanism to make pending intents immutable. bug:19618745 Change-Id: Ice742e0162cb9b7c0afbc32e0eea03d501666e2b
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
564560e46d8a075fe508514f3dbd94f29963e6eb |
|
02-Jul-2014 |
Svetoslav <svetoslavganov@google.com> |
Installed and enabled print services not working after boot. Due to system server changes the print manager services did not receive the expected callbacks in correct order. This lead to installed and enabled print services not working until toggled from settings. bug:16018217 Change-Id: I8d53d8d8f06507ee135cebe5201f00910a4cb364
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|
49782e46c0eb85a25ae2abcf80880c48dbab5aea |
|
20-Dec-2013 |
Amith Yamasani <yamasani@google.com> |
am 9158825f: Move some system services to separate directories * commit '9158825f9c41869689d6b1786d7c7aa8bdd524ce': Move some system services to separate directories
|
9158825f9c41869689d6b1786d7c7aa8bdd524ce |
|
22-Nov-2013 |
Amith Yamasani <yamasani@google.com> |
Move some system services to separate directories Refactored the directory structure so that services can be optionally excluded. This is step 1. Will be followed by another change that makes it possible to remove services from the build. Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
/frameworks/base/services/print/java/com/android/server/print/UserState.java
|