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