OSDN Git Service

Move Xerox recommendation plugin to service.
[android-x86/frameworks-base.git] / packages / PrintRecommendationService / src / com / android / printservice / recommendation / RecommendationServiceImpl.java
index d95654f..ac60a88 100644 (file)
@@ -26,6 +26,7 @@ import com.android.printservice.recommendation.plugin.mdnsFilter.MDNSFilterPlugi
 import com.android.printservice.recommendation.plugin.mdnsFilter.VendorConfig;
 import com.android.printservice.recommendation.plugin.mopria.MopriaRecommendationPlugin;
 import com.android.printservice.recommendation.plugin.samsung.SamsungRecommendationPlugin;
+import com.android.printservice.recommendation.plugin.xerox.XeroxPrintServiceRecommendationPlugin;
 import org.xmlpull.v1.XmlPullParserException;
 
 import java.io.IOException;
@@ -83,6 +84,14 @@ public class RecommendationServiceImpl extends RecommendationService
                     " plugin", e);
         }
 
+        try {
+            mPlugins.add(new RemotePrintServicePlugin(
+                    new XeroxPrintServiceRecommendationPlugin(this), this, false));
+        } catch (Exception e) {
+            Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_xerox) +
+                    " plugin", e);
+        }
+
         final int numPlugins = mPlugins.size();
         for (int i = 0; i < numPlugins; i++) {
             try {