本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}
}