use of com.android.printservice.recommendation.plugin.xerox.XeroxPrintServiceRecommendationPlugin in project platform_frameworks_base by android.
the class RecommendationServiceImpl method onConnected.
@Override
public void onConnected() {
mPlugins = new ArrayList<>();
try {
for (VendorConfig config : VendorConfig.getAllConfigs(this)) {
try {
mPlugins.add(new RemotePrintServicePlugin(new MDNSFilterPlugin(this, config.name, config.packageName, config.mDNSNames), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate simple MDNS plugin for " + config.packageName, e);
}
}
} catch (IOException | XmlPullParserException e) {
new RuntimeException("Could not parse vendorconfig", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new HPRecommendationPlugin(this), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_hp) + " plugin", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new MopriaRecommendationPlugin(this), this, true));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_morpia) + " plugin", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new SamsungRecommendationPlugin(this), this, true));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_samsung) + " 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 {
mPlugins.get(i).start();
} catch (RemotePrintServicePlugin.PluginException e) {
Log.e(LOG_TAG, "Could not start plugin", e);
}
}
}
use of com.android.printservice.recommendation.plugin.xerox.XeroxPrintServiceRecommendationPlugin in project android_frameworks_base by DirtyUnicorns.
the class RecommendationServiceImpl method onConnected.
@Override
public void onConnected() {
mPlugins = new ArrayList<>();
try {
for (VendorConfig config : VendorConfig.getAllConfigs(this)) {
try {
mPlugins.add(new RemotePrintServicePlugin(new MDNSFilterPlugin(this, config.name, config.packageName, config.mDNSNames), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate simple MDNS plugin for " + config.packageName, e);
}
}
} catch (IOException | XmlPullParserException e) {
new RuntimeException("Could not parse vendorconfig", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new HPRecommendationPlugin(this), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_hp) + " plugin", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new MopriaRecommendationPlugin(this), this, true));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_morpia) + " plugin", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new SamsungRecommendationPlugin(this), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_samsung) + " 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 {
mPlugins.get(i).start();
} catch (RemotePrintServicePlugin.PluginException e) {
Log.e(LOG_TAG, "Could not start plugin", e);
}
}
}
use of com.android.printservice.recommendation.plugin.xerox.XeroxPrintServiceRecommendationPlugin in project android_frameworks_base by AOSPA.
the class RecommendationServiceImpl method onConnected.
@Override
public void onConnected() {
mPlugins = new ArrayList<>();
try {
for (VendorConfig config : VendorConfig.getAllConfigs(this)) {
try {
mPlugins.add(new RemotePrintServicePlugin(new MDNSFilterPlugin(this, config.name, config.packageName, config.mDNSNames), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate simple MDNS plugin for " + config.packageName, e);
}
}
} catch (IOException | XmlPullParserException e) {
new RuntimeException("Could not parse vendorconfig", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new HPRecommendationPlugin(this), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_hp) + " plugin", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new MopriaRecommendationPlugin(this), this, true));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_morpia) + " plugin", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new SamsungRecommendationPlugin(this), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_samsung) + " 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 {
mPlugins.get(i).start();
} catch (RemotePrintServicePlugin.PluginException e) {
Log.e(LOG_TAG, "Could not start plugin", e);
}
}
}
use of com.android.printservice.recommendation.plugin.xerox.XeroxPrintServiceRecommendationPlugin in project android_frameworks_base by ResurrectionRemix.
the class RecommendationServiceImpl method onConnected.
@Override
public void onConnected() {
mPlugins = new ArrayList<>();
try {
for (VendorConfig config : VendorConfig.getAllConfigs(this)) {
try {
mPlugins.add(new RemotePrintServicePlugin(new MDNSFilterPlugin(this, config.name, config.packageName, config.mDNSNames), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate simple MDNS plugin for " + config.packageName, e);
}
}
} catch (IOException | XmlPullParserException e) {
new RuntimeException("Could not parse vendorconfig", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new HPRecommendationPlugin(this), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_hp) + " plugin", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new MopriaRecommendationPlugin(this), this, true));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_morpia) + " plugin", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new SamsungRecommendationPlugin(this), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_samsung) + " 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 {
mPlugins.get(i).start();
} catch (RemotePrintServicePlugin.PluginException e) {
Log.e(LOG_TAG, "Could not start plugin", e);
}
}
}
use of com.android.printservice.recommendation.plugin.xerox.XeroxPrintServiceRecommendationPlugin in project android_frameworks_base by crdroidandroid.
the class RecommendationServiceImpl method onConnected.
@Override
public void onConnected() {
mPlugins = new ArrayList<>();
try {
for (VendorConfig config : VendorConfig.getAllConfigs(this)) {
try {
mPlugins.add(new RemotePrintServicePlugin(new MDNSFilterPlugin(this, config.name, config.packageName, config.mDNSNames), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate simple MDNS plugin for " + config.packageName, e);
}
}
} catch (IOException | XmlPullParserException e) {
new RuntimeException("Could not parse vendorconfig", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new HPRecommendationPlugin(this), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_hp) + " plugin", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new MopriaRecommendationPlugin(this), this, true));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_morpia) + " plugin", e);
}
try {
mPlugins.add(new RemotePrintServicePlugin(new SamsungRecommendationPlugin(this), this, false));
} catch (Exception e) {
Log.e(LOG_TAG, "Could not initiate " + getString(R.string.plugin_vendor_samsung) + " 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 {
mPlugins.get(i).start();
} catch (RemotePrintServicePlugin.PluginException e) {
Log.e(LOG_TAG, "Could not start plugin", e);
}
}
}
Aggregations