当前位置: 首页>>代码示例>>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;未经允许,请勿转载。