25 Commits

Author SHA1 Message Date
Philip P. Moltmann
dafa6424b2 Move PrintRecommendationService to systemAPI
It is using system APIs, but we might want to update it via the play
store.

Hence, replace all internal APIs used with support lib APIs. There is
no replacement for @Immutable, but this is just a informational
annotation, so it can just be removed.

As system-api is tied to a specific platform version, remove all
minSDK/targetSDK settings in the manifest.

Change-Id: Ia8f9c718fd688db295c7bc3bfe05e2074f9bd413
Fixes: 78162439
Test: Looked at print service recommendations
2018-04-17 10:37:56 -07:00
Philip P. Moltmann
c18178a93d Enable multi-cast while resolving nsd services
Test: Before taimen never resolved nsd servives. How it resolved nsd
      services reliably when built in print service and print service
      recommendation service used NsdService
Fixes: 75316187

Change-Id: I02f83fc2ea624174e61ddf0d61fdaed005b741eb
2018-04-17 10:15:59 -07:00
Anton Hansson
ab6ec61251 frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: I4233b9091d9066c4fa69f3d24aaf367ea500f760
2018-02-28 15:13:23 +00:00
Philip P. Moltmann
d45000c1a9 resolve merge conflicts of 3c002e45dda1 to oc-dev-plus-aosp
Test: Trivial resolution
Change-Id: Ifc41cc692406d52f508b595465f4f7469f74c6f5
2017-04-06 20:25:45 -07:00
Philip P. Moltmann
3b817ad66c Merge "Add RecommendationPlugin for Cloud Print" am: b2c75d062d am: 997f7cbabf
am: 41687d06f4

Change-Id: Iddb64b94c03eaf6925d9b4e161ac3c6fdd25a1b8
2017-04-06 20:49:53 +00:00
Philip P. Moltmann
7e01895e69 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
2017-04-06 11:54:53 -07:00
Philip P. Moltmann
5d0b53b684 Add RecommendationPlugin for Cloud Print
Reuses already existing infrastructure. The mMDNSFilteredDiscovery lambda
is called for every network service that supports #PRIVET_SERVICE. Then
the plugin checks the txt fields to make sure the printer is valid. The
check is not complete but good enough to make sure this is either a
cloud print capable printer or something that tries really hard.

Test: Connected to network with three printers, 2 GCP capable. Found the
      two printers
Fixes: 35766193
Change-Id: I7c9180c8c154fa092fec5b943a94bad77da74c86
2017-04-05 19:51:08 -07:00
Philip P. Moltmann
ce2118c323 Merge "Increment vers of PrintRecommendationService" am: 08bff42ef4 am: a791fee2bc am: fbdcaa7278
am: 72c7cce18f

Change-Id: I9310e60014e51c7b64a7ff6bd8c251ac86c37f70
2016-12-19 18:10:55 +00:00
Philip P. Moltmann
c56da03d06 Increment vers of PrintRecommendationService
as the Samsung PlugIn was updated.

Test: Let the service generate some recommendations
Change-Id: Ief7ea4f1dddfee92aa9fa83ff53b296ced0e3b55
2016-12-16 12:52:53 -08:00
Sergey Yakovlev
3bf5fb48bf Merge "Update Samsung Print Recommendation Plugin (to support Mopria printers)" am: 41f14f47a5 am: 3a1cf2281b am: 55b91fec65
am: 3fd8bb1b62

Change-Id: I587aa8c81614aac6072df3e175b0ea814273e03c
2016-12-03 04:48:18 +00:00
Sergey Yakovlev
989c44be2c Update Samsung Print Recommendation Plugin (to support Mopria printers)
- Extract common part of MDNSFilterPlugin to common utils, MDNSFilteredDiscovery.java (other vendors can use it too)
- Refactor Samsung Print Recomendation Plugin to use MDNSFilteredDiscovery.java
- Add Mopria devices detection to Samsung Print Recomendation Plugin

*Samsung Print Service Plugin supports Mopria printers since v3.00.161011.

Test: Tested manually. Test app was developed to make sure that Samsung Print Recommendation plugin can find both Samsung and Mopria devices. Additionally MDNSFilterPlugin was tested on HP printers.
Change-Id: Idc0d311171495f879564336370a86f7a8890378b
2016-11-23 13:26:48 +03:00
Philip P. Moltmann
5c458c3215 Merge \\\"Version PrintRecommendationService.\\\" into nyc-dev am: 8e3a16ad91 am: c6ded5559c
am: d4f26d2d0e

Change-Id: I2d0eaec4493755d8dd6e760b057cb394b1d9f006
2016-06-14 22:57:05 +00:00
Philip P. Moltmann
160b043e99 Version PrintRecommendationService.
Fixes: 28908572
Change-Id: I8df106df887cacc8db37f781ade97678960cee04
2016-06-14 13:06:53 -07:00
Philip P. Moltmann
be591d709c Merge \\\"Handling of Fuji Xerox in RecommendationService.\\\" into nyc-dev am: 5398f2731b am: 0273d5d4ed
am: 00c3ada2eb

Change-Id: I6c92e7dc6ec2b279373f8b5dbcdebb9a11f8d9ce
2016-06-09 19:40:28 +00:00
Philip P. Moltmann
620c5af97b Handling of Fuji Xerox in RecommendationService.
- Display name
- Fix exclusion of Fuji from Xerox plugin

Bug: 28908572
Change-Id: I00c235a4eb09a681717eb3be65d586246a069f4b
2016-06-09 09:40:00 -07:00
Philip P. Moltmann
63498afff8 Move Xerox recommendation plugin to service.
Only minimal changes just to make it work together with the other
plugins.

Bug: 28908572
Change-Id: Icac226b45e8a6885036466451d0e9f54a3b3c640
(cherry picked from commit d97fdfd943295ea90d37b092e66b7ad1701587a1)
2016-05-31 23:35:17 +00:00
Philip P. Moltmann
d97fdfd943 Move Xerox recommendation plugin to service.
Only minimal changes just to make it work together with the other
plugins.

Bug: 28908572
Change-Id: Icac226b45e8a6885036466451d0e9f54a3b3c640
2016-05-27 15:32:19 -07:00
Philip P. Moltmann
a26b775dc1 Add Samsung print recommendation plugin.
The code follows the same pattern as the HP and Mopria plugins. As this code is contributed by a 3rd I'd rather submit this as is and let the original submitter clean it up once it appears in AOSP.

The code should not affect anything outside of the package it is in. In the package the code is strongly isolated so that one plugin cannot cause issues with another plugin.

The code was minimally tested on a Samsung SCX-3406FW .

Bug: 28908572
Change-Id: I33c2673d06711902dbd0f1d82563cf5d3fbfe86a
(cherry picked from commit 83defde08560ae2f1c3426466a2aa3e6944d6b79)
2016-05-23 17:41:40 +00:00
Philip P. Moltmann
83defde085 Add Samsung print recommendation plugin.
Change-Id: I33c2673d06711902dbd0f1d82563cf5d3fbfe86a
2016-05-23 10:34:10 -07:00
Philip P. Moltmann
a44056670e Merge "Adjust PrintRecommendationService for Konica Minolta." into nyc-dev am: 5bfaa9c128 am: 6c8767fea9
am: 46bfa682cd

* commit '46bfa682cd15eccf293b5892246632aa43eccd7f':
  Adjust PrintRecommendationService for Konica Minolta.

Change-Id: I936a92445ec66fe8615dabcb57b9100e4555be57
2016-05-16 22:17:00 +00:00
Philip P. Moltmann
ed04cbdc93 Adjust PrintRecommendationService for Konica Minolta.
The reported that:
- Name should be Koni_c_a Minolta
- kmkmkm should not be used as a mDNS identifier

Change-Id: I1ab1910f9a54a396c3bfa109266f6e805349d036
2016-05-12 10:44:08 -07:00
Philip P. Moltmann
3acc50c857 Merge "Merge "Add HP and Mopria print recommendation service" into nyc-dev am: 9e5d4e078a am: e87fdd9c16" into nyc-mr1-dev-plus-aosp
am: 747b3d7de8

* commit '747b3d7de89fa6b7330d59a47fd982d38192e3c3':
  Add HP and Mopria print recommendation service

Change-Id: Idba97dabb1dcdefc528541d9c2955705d2e787eb
2016-05-04 22:05:35 +00:00
Ian Rogers
57091f7a8b Fix missing throw.
Bug caught by errorprone.

Bug: 27723540
Change-Id: Ib405c25614e5f9a82d56b4b172ed574ccc5b9184
2016-05-04 09:32:29 -07:00
Philip P. Moltmann
bfaa472332 Add HP and Mopria print recommendation service
- Make util.MDnsUtils local to the mdnsFilter plugins
- Remove HP from the vendors recommended via the mdnsFilter plugin
- Copy in HP's code for HP and Mopria plugin
  - Do not change any code, beside
    - change "_ipp.tcp" to "_ipp._tcp"
    - Change package name
    - Do not use support lib annotations
    - Reduce class visibility if possible
    - Add AOSP copyright
    - Make ServiceResolveQueue a proper sigleton
    - Merge donottranslate and strings
- Add HP and Mopria plugin to RecommendationServiceImpl
- I needed to implement a multiplexer for NsdManager.DiscoveryListener
  as we can only have 10 of them active at a time.

Change-Id: I61caa3f4822f9c013140721ed801d18e6839df55
2016-05-03 17:10:14 -07:00
Philip P. Moltmann
b87c08da82 Expose additional fields needed by PrintRecommendationService GTS test
and move files into properly named directory.

Fixes: 28025769, 28214466
Change-Id: I14737515fc12525a1685a1a222f21913755ac988
2016-04-19 14:31:04 -07:00