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


Java AccessibilityServiceInfo.getId方法代码示例

本文整理汇总了Java中android.accessibilityservice.AccessibilityServiceInfo.getId方法的典型用法代码示例。如果您正苦于以下问题:Java AccessibilityServiceInfo.getId方法的具体用法?Java AccessibilityServiceInfo.getId怎么用?Java AccessibilityServiceInfo.getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.accessibilityservice.AccessibilityServiceInfo的用法示例。


在下文中一共展示了AccessibilityServiceInfo.getId方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onAccessibilityEvent

import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
@Override
public void onAccessibilityEvent(AccessibilityEvent event) {
    AccessibilityServiceInfo serviceInfo = this.getServiceInfo();
    accessibilityId = serviceInfo.getId();

    PackageManager localPackageManager = getPackageManager();
    Intent intent = new Intent("android.intent.action.MAIN");
    intent.addCategory("android.intent.category.HOME");
    String launcher = localPackageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY).activityInfo.packageName;

    if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED && event.getPackageName() != null) {
        sPackageName = event.getPackageName().toString();
        Log.d(TAG, "Package Name is " + sPackageName);
        if ((System.currentTimeMillis() - time) < 1000) {
            if (!sPackageName.equals(launcher) || !sPackageName.equals("com.android.systemui")) {
                process_window_change(sPackageName);
            }
        } else if ((System.currentTimeMillis() - time) >= 1000) {
            process_window_change(sPackageName);
        }
    }
}
 
开发者ID:exynos5420,项目名称:deathly_adiutor_free,代码行数:23,代码来源:PerAppMonitor.java

示例2: onAccessibilityEvent

import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
@Override
public void onAccessibilityEvent(AccessibilityEvent event) {
    AccessibilityServiceInfo serviceInfo = this.getServiceInfo();
    accessibilityId = serviceInfo.getId();

    if (event.getPackageName() == null || event.getEventType() != AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED)
        return;

    sPackageName = event.getPackageName().toString();
    Log.d(TAG, "Package Name is " + sPackageName);
    if (sPackageName.equals("com.android.systemui"))
        return;

    if ((System.currentTimeMillis() - time) < 2000) {
        if (!sPackageName.equals(UserLauncher())) {
            process_window_change(sPackageName);
        }
    } else {
        process_window_change(sPackageName);
    }

}
 
开发者ID:bhb27,项目名称:KA27,代码行数:23,代码来源:PerAppMonitor.java

示例3: onAccessibilityEvent

import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
@Override
public void onAccessibilityEvent(AccessibilityEvent event) {
    AccessibilityServiceInfo serviceInfo = this.getServiceInfo();
    accessibilityId = serviceInfo.getId();

    PackageManager localPackageManager = getPackageManager();
    Intent intent = new Intent("android.intent.action.MAIN");
    intent.addCategory("android.intent.category.HOME");
    String launcher = localPackageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY).activityInfo.packageName;

    if(event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED && event.getPackageName() != null) {
        sPackageName = event.getPackageName().toString();
        Log.d(TAG, "Package Name is "+sPackageName);
        if ((System.currentTimeMillis() - time) < 1000) {
            if (!sPackageName.equals(launcher) || !sPackageName.equals("com.android.systemui")) {
                process_window_change(sPackageName);
            }
        }
        else if ((System.currentTimeMillis() - time) >= 1000) {
            process_window_change(sPackageName);
        }
    }
}
 
开发者ID:yoinx,项目名称:kernel_adiutor,代码行数:24,代码来源:PerAppMonitor.java

示例4: getId

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

示例5: c

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

示例6: getId

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


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