本文整理匯總了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();
}