本文整理汇总了Java中android.accessibilityservice.AccessibilityServiceInfo.getResolveInfo方法的典型用法代码示例。如果您正苦于以下问题:Java AccessibilityServiceInfo.getResolveInfo方法的具体用法?Java AccessibilityServiceInfo.getResolveInfo怎么用?Java AccessibilityServiceInfo.getResolveInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.accessibilityservice.AccessibilityServiceInfo
的用法示例。
在下文中一共展示了AccessibilityServiceInfo.getResolveInfo方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getResolveInfoListFromAvailableComponents
import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
@Override
protected List<ResolveInfo> getResolveInfoListFromAvailableComponents(
List<AccessibilityServiceInfo> accessibilityServiceInfoList) {
HashSet<String> packageSet = new HashSet<>();
List<ResolveInfo> resolveInfoList = new ArrayList<>();
for (AccessibilityServiceInfo accessibilityServiceInfo: accessibilityServiceInfoList) {
ResolveInfo resolveInfo = accessibilityServiceInfo.getResolveInfo();
// Some apps may contain multiple accessibility services. Make sure that the package
// name is unique in the return list.
if (!packageSet.contains(resolveInfo.serviceInfo.packageName)) {
resolveInfoList.add(resolveInfo);
packageSet.add(resolveInfo.serviceInfo.packageName);
}
}
return resolveInfoList;
}
示例2: assertServiceIsInstalled
import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
protected void assertServiceIsInstalled(String servicePackage, String serviceName) {
final List<AccessibilityServiceInfo> services = mManager
.getInstalledAccessibilityServiceList();
for (AccessibilityServiceInfo service : services) {
final ServiceInfo serviceInfo = service.getResolveInfo().serviceInfo;
final String packageName = serviceInfo.applicationInfo.packageName;
if (servicePackage.equals(packageName) && serviceName.equals(serviceInfo.name)) {
return;
}
}
assertTrue("Service " + servicePackage + "/" + serviceName + " is not installed", false);
}
示例3: isEnable
import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
public static boolean isEnable(Context context) {
AccessibilityManager manager = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
List<AccessibilityServiceInfo> services = manager.getEnabledAccessibilityServiceList(AccessibilityServiceInfo.FEEDBACK_GENERIC);
boolean flag = false;
for (AccessibilityServiceInfo info : services) {
ResolveInfo i = info.getResolveInfo();
if(TextUtils.equals(context.getPackageName(), i.serviceInfo.packageName)) {
flag = true;
break;
}
}
return flag;
}
示例4: getResolveInfo
import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
public static ResolveInfo getResolveInfo(AccessibilityServiceInfo info) {
return info.getResolveInfo();
}
示例5: d
import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
public static ResolveInfo d(AccessibilityServiceInfo accessibilityserviceinfo)
{
return accessibilityserviceinfo.getResolveInfo();
}
示例6: getResolveInfo
import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
public static ResolveInfo getResolveInfo(AccessibilityServiceInfo accessibilityserviceinfo)
{
return accessibilityserviceinfo.getResolveInfo();
}