summaryrefslogtreecommitdiff
path: root/services/print
diff options
context:
space:
mode:
authorPhilip P. Moltmann <moltmann@google.com>2017-04-02 14:34:09 -0700
committerPhilip P. Moltmann <moltmann@google.com>2017-04-06 11:54:53 -0700
commit7e01895e6972c0ebc552215b1207a519529af3fd (patch)
treeec5a15bef19ac231a63713ff1a60700bc9a6576c /services/print
parent0ff1b458ac58fb93cab5d11e19867beab4cfa988 (diff)
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
Diffstat (limited to 'services/print')
-rw-r--r--services/print/java/com/android/server/print/UserState.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/services/print/java/com/android/server/print/UserState.java b/services/print/java/com/android/server/print/UserState.java
index 7474a64c32cb..75df892b30b1 100644
--- a/services/print/java/com/android/server/print/UserState.java
+++ b/services/print/java/com/android/server/print/UserState.java
@@ -45,17 +45,17 @@ import android.os.RemoteException;
import android.os.UserHandle;
import android.print.IPrintDocumentAdapter;
import android.print.IPrintJobStateChangeListener;
-import android.printservice.recommendation.IRecommendationsChangeListener;
import android.print.IPrintServicesChangeListener;
import android.print.IPrinterDiscoveryObserver;
import android.print.PrintAttributes;
import android.print.PrintJobId;
import android.print.PrintJobInfo;
import android.print.PrintManager;
-import android.printservice.recommendation.RecommendationInfo;
import android.print.PrinterId;
import android.print.PrinterInfo;
import android.printservice.PrintServiceInfo;
+import android.printservice.recommendation.IRecommendationsChangeListener;
+import android.printservice.recommendation.RecommendationInfo;
import android.provider.DocumentsContract;
import android.provider.Settings;
import android.text.TextUtils;
@@ -72,8 +72,9 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.os.BackgroundThread;
import com.android.internal.os.SomeArgs;
import com.android.server.print.RemotePrintService.PrintServiceCallbacks;
+import com.android.server.print.RemotePrintServiceRecommendationService
+ .RemotePrintServiceRecommendationServiceCallbacks;
import com.android.server.print.RemotePrintSpooler.PrintSpoolerCallbacks;
-import com.android.server.print.RemotePrintServiceRecommendationService.RemotePrintServiceRecommendationServiceCallbacks;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -882,7 +883,7 @@ final class UserState implements PrintSpoolerCallbacks, PrintServiceCallbacks,
+ android.Manifest.permission.BIND_PRINT_SERVICE);
continue;
}
- tempPrintServices.add(PrintServiceInfo.create(installedService, mContext));
+ tempPrintServices.add(PrintServiceInfo.create(mContext, installedService));
}
mInstalledServices.clear();