當前位置: 首頁>>代碼示例>>Java>>正文


Java AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS屬性代碼示例

本文整理匯總了Java中android.accessibilityservice.AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS屬性的典型用法代碼示例。如果您正苦於以下問題:Java AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS屬性的具體用法?Java AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS怎麽用?Java AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在android.accessibilityservice.AccessibilityServiceInfo的用法示例。


在下文中一共展示了AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS屬性的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onServiceConnected

@Override
protected void onServiceConnected() {
    super.onServiceConnected();

    packageManager = getPackageManager();
    notificationManager = NotificationManagerCompat.from(this);

    volumeReceiver = new VolumeReceiver(this);
    registerReceiver(volumeReceiver, new IntentFilter("android.media.VOLUME_CHANGED_ACTION"));

    notifications = new ArrayList<>();
    AccessibilityServiceInfo config = new AccessibilityServiceInfo();
    config.eventTypes = AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED | AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED;
    config.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
        config.flags = AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS;

    setServiceInfo(config);
}
 
開發者ID:TheAndroidMaster,項目名稱:Status,代碼行數:20,代碼來源:AccessibilityService.java

示例2: onServiceConnected

@Override
protected void onServiceConnected() {
    super.onServiceConnected();

    packageManager = getPackageManager();
    butterboard = (Butterboard) getApplicationContext();

    AccessibilityServiceInfo config = new AccessibilityServiceInfo();
    config.eventTypes = AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED;
    config.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
        config.flags = AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS;

    setServiceInfo(config);
}
 
開發者ID:DoubleDotLabs,項目名稱:Butterboard,代碼行數:16,代碼來源:AccessibilityService.java

示例3: onServiceConnected

@Override
protected void onServiceConnected() {
    AccessibilityServiceInfo serviceInfo = getServiceInfo();
    if (Pref.isStableModeEnabled()) {
        serviceInfo.flags &= ~AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS;
    } else {
        serviceInfo.flags |= AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS;
    }
    setServiceInfo(serviceInfo);
    super.onServiceConnected();
}
 
開發者ID:feifadaima,項目名稱:https-github.com-hyb1996-NoRootScriptDroid,代碼行數:11,代碼來源:AccessibilityService.java

示例4: onServiceConnected

@Override
protected void onServiceConnected() {
    AccessibilityServiceInfo info = getServiceInfo();
    info.flags |= AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS;
    setServiceInfo(info);
    super.onServiceConnected();
}
 
開發者ID:feifadaima,項目名稱:https-github.com-hyb1996-NoRootScriptDroid,代碼行數:7,代碼來源:LayoutInspectService.java

示例5: setCapabilities

private void setCapabilities(boolean isPengYouQuan) {
    int flag= 0;
    flag = mAccessibilityServiceInfo.flags;
    if (isPengYouQuan) {
        mAccessibilityServiceInfo.flags=flag | (AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS);
    }else {
        mAccessibilityServiceInfo.flags=flag & (~AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS);
    }
    this.setServiceInfo(mAccessibilityServiceInfo);
}
 
開發者ID:l465659833,項目名稱:Bigbang,代碼行數:10,代碼來源:BigBangMonitorService.java

示例6: onServiceConnected

@Override
protected void onServiceConnected() {
    AccessibilityServiceInfo serviceInfo = getServiceInfo();
    if (Pref.isStableModeEnabled()) {
        serviceInfo.flags &= ~AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS;
    } else {
        serviceInfo.flags |= AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS;
    }
    setServiceInfo(serviceInfo);
    super.onServiceConnected();

}
 
開發者ID:hyb1996,項目名稱:Auto.js,代碼行數:12,代碼來源:AccessibilityService.java

示例7: onServiceConnected

@Override
protected void onServiceConnected() {
    super.onServiceConnected();

    windowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
    snowflakeView = new SnowflakeView(this);

    WindowManager.LayoutParams params = new WindowManager.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, PixelFormat.TRANSPARENT);
    params.gravity = Gravity.TOP;

    try {
        windowManager.addView(snowflakeView, params);
    } catch (WindowManager.BadTokenException | SecurityException e) {
        e.printStackTrace();
        snowflakeView = null;
        stopSelf();
        return;
    }

    AccessibilityServiceInfo config = new AccessibilityServiceInfo();
    config.eventTypes = AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED;
    config.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
        config.flags = AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS;

    setServiceInfo(config);
}
 
開發者ID:TheAndroidMaster,項目名稱:Snowflakes,代碼行數:28,代碼來源:SnowflakeService.java

示例8: setDynamicContent

/**
     * Set the content this service should be receiving
     */
    private void setDynamicContent() {
        if (DEBUG) {
            MyLog.i(CLS_NAME, "setDynamicContent: interceptGoogle: " + initInterceptGoogle);
            MyLog.i(CLS_NAME, "setDynamicContent: announceNotifications: " + initAnnounceNotifications);
        }

        if (!initInterceptGoogle && !initAnnounceNotifications) {
            if (DEBUG) {
                MyLog.i(CLS_NAME, "setDynamicContent: none required: finishing");
            }

//            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
//                this.disableSelf();
//            }
//
//            this.stopSelf();

        } else {
            if (DEBUG) {
                MyLog.i(CLS_NAME, "setDynamicContent: updating content");
            }

            final AccessibilityServiceInfo serviceInfo = new AccessibilityServiceInfo();

            serviceInfo.feedbackType = AccessibilityServiceInfo.FEEDBACK_SPOKEN;
            serviceInfo.flags = AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS;
            serviceInfo.notificationTimeout = UPDATE_TIMEOUT;

            if (initInterceptGoogle && initAnnounceNotifications) {
                serviceInfo.eventTypes = AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED
                        | AccessibilityEvent.TYPE_VIEW_TEXT_SELECTION_CHANGED
                        | AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED;
            } else if (initInterceptGoogle) {
                serviceInfo.packageNames = new String[]{Installed.PACKAGE_NAME_GOOGLE_NOW};
                serviceInfo.eventTypes = AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED
                        | AccessibilityEvent.TYPE_VIEW_TEXT_SELECTION_CHANGED;
            } else {
                serviceInfo.eventTypes = AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED;
            }

            this.setServiceInfo(serviceInfo);
        }
    }
 
開發者ID:brandall76,項目名稱:Saiy-PS,代碼行數:46,代碼來源:SaiyAccessibilityService.java


注:本文中的android.accessibilityservice.AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。