本文整理汇总了Java中android.content.Intent.FilterComparison方法的典型用法代码示例。如果您正苦于以下问题:Java Intent.FilterComparison方法的具体用法?Java Intent.FilterComparison怎么用?Java Intent.FilterComparison使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.content.Intent
的用法示例。
在下文中一共展示了Intent.FilterComparison方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ServiceRecord
import android.content.Intent; //导入方法依赖的package包/类
ServiceRecord(ComponentName cn, Intent.FilterComparison fi, ServiceInfo si) {
name = cn;
plugin = cn.getPackageName();
className = cn.getClassName();
shortName = name.flattenToShortString();
intent = fi;
serviceInfo = si;
}
示例2: retrieveAppBindingLocked
import android.content.Intent; //导入方法依赖的package包/类
public ProcessBindRecord retrieveAppBindingLocked(Intent intent, ProcessRecord app) {
Intent.FilterComparison filter = new Intent.FilterComparison(intent);
IntentBindRecord i = bindings.get(filter);
if (i == null) {
i = new IntentBindRecord(this, filter);
bindings.put(filter, i);
}
ProcessBindRecord a = i.apps.get(app);
if (a != null) {
return a;
}
a = new ProcessBindRecord(this, i, app);
i.apps.put(app, a);
return a;
}
示例3: retrieveServiceLocked
import android.content.Intent; //导入方法依赖的package包/类
private ServiceRecord retrieveServiceLocked(Intent service) {
ComponentName cn = service.getComponent();
ServiceRecord sr = mServicesByName.get(cn);
if (sr != null) {
return sr;
}
sr = mServicesByIntent.get(service);
if (sr != null) {
return sr;
}
String pn = cn.getPackageName();
String name = cn.getClassName();
// 看这个Plugin是否可以被打开
if (!RePlugin.isPluginInstalled(pn)) {
if (LOGR) {
LogRelease.e(PLUGIN_TAG, "psm.is: p n ex " + name);
}
return null;
}
// 开始尝试获取插件的ServiceInfo
ComponentList col = PluginFactory.queryPluginComponentList(pn);
if (col == null) {
if (LOG) {
Log.e(TAG, "installServiceLocked(): Fetch Component List Error! pn=" + pn);
}
return null;
}
ServiceInfo si = col.getService(cn.getClassName());
if (si == null) {
if (LOG) {
Log.e(TAG, "installServiceLocked(): Not register! pn=" + pn);
}
return null;
}
// 构建,放入表中
Intent.FilterComparison fi = new Intent.FilterComparison(service);
sr = new ServiceRecord(cn, fi, si);
mServicesByName.put(cn, sr);
mServicesByIntent.put(fi, sr);
return sr;
}
示例4: IntentBindRecord
import android.content.Intent; //导入方法依赖的package包/类
IntentBindRecord(ServiceRecord service, Intent.FilterComparison intent) {
this.service = service;
this.intent = intent;
}