本文整理汇总了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);
}
}
}
示例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);
}
}
示例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);
}
}
}
示例4: getId
import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
public static String getId(AccessibilityServiceInfo info) {
return info.getId();
}
示例5: c
import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
public static String c(AccessibilityServiceInfo accessibilityserviceinfo)
{
return accessibilityserviceinfo.getId();
}
示例6: getId
import android.accessibilityservice.AccessibilityServiceInfo; //导入方法依赖的package包/类
public static String getId(AccessibilityServiceInfo accessibilityserviceinfo)
{
return accessibilityserviceinfo.getId();
}