當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。