当前位置: 首页>>代码示例>>Java>>正文


Java AccessibilityServiceInfo.getResolveInfo方法代码示例

本文整理汇总了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;
}
 
开发者ID:googlesamples,项目名称:android-testdpc,代码行数:17,代码来源:PolicyManagementFragment.java

示例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);
}
 
开发者ID:google,项目名称:talkback,代码行数:16,代码来源:BaseAccessibilityInstrumentationTestCase.java

示例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;
}
 
开发者ID:androidertc,项目名称:iLocker,代码行数:14,代码来源:AccessibilityUtils.java

示例4: getResolveInfo

import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
public static ResolveInfo getResolveInfo(AccessibilityServiceInfo info) {
    return info.getResolveInfo();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityServiceInfoCompatIcs.java

示例5: d

import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
public static ResolveInfo d(AccessibilityServiceInfo accessibilityserviceinfo)
{
    return accessibilityserviceinfo.getResolveInfo();
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:5,代码来源:e.java

示例6: getResolveInfo

import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
public static ResolveInfo getResolveInfo(AccessibilityServiceInfo accessibilityserviceinfo)
{
    return accessibilityserviceinfo.getResolveInfo();
}
 
开发者ID:Hamz-a,项目名称:MyCTFWriteUps,代码行数:5,代码来源:AccessibilityServiceInfoCompatIcs.java


注:本文中的android.accessibilityservice.AccessibilityServiceInfo.getResolveInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。