use of android.view.accessibility.AccessibilityWindowInfo in project android_frameworks_base by crdroidandroid.
the class AccessibilityManagerService method dump.
@Override
public void dump(FileDescriptor fd, final PrintWriter pw, String[] args) {
mSecurityPolicy.enforceCallingPermission(Manifest.permission.DUMP, FUNCTION_DUMP);
synchronized (mLock) {
pw.println("ACCESSIBILITY MANAGER (dumpsys accessibility)");
pw.println();
final int userCount = mUserStates.size();
for (int i = 0; i < userCount; i++) {
UserState userState = mUserStates.valueAt(i);
pw.append("User state[attributes:{id=" + userState.mUserId);
pw.append(", currentUser=" + (userState.mUserId == mCurrentUserId));
pw.append(", touchExplorationEnabled=" + userState.mIsTouchExplorationEnabled);
pw.append(", displayMagnificationEnabled=" + userState.mIsDisplayMagnificationEnabled);
pw.append(", autoclickEnabled=" + userState.mIsAutoclickEnabled);
if (userState.mUiAutomationService != null) {
pw.append(", ");
userState.mUiAutomationService.dump(fd, pw, args);
pw.println();
}
pw.append("}");
pw.println();
pw.append(" services:{");
final int serviceCount = userState.mBoundServices.size();
for (int j = 0; j < serviceCount; j++) {
if (j > 0) {
pw.append(", ");
pw.println();
pw.append(" ");
}
Service service = userState.mBoundServices.get(j);
service.dump(fd, pw, args);
}
pw.println("}]");
pw.println();
}
if (mSecurityPolicy.mWindows != null) {
final int windowCount = mSecurityPolicy.mWindows.size();
for (int j = 0; j < windowCount; j++) {
if (j > 0) {
pw.append(',');
pw.println();
}
pw.append("Window[");
AccessibilityWindowInfo window = mSecurityPolicy.mWindows.get(j);
pw.append(window.toString());
pw.append(']');
}
}
}
}
use of android.view.accessibility.AccessibilityWindowInfo in project android_frameworks_base by DirtyUnicorns.
the class AccessibilityManagerService method dump.
@Override
public void dump(FileDescriptor fd, final PrintWriter pw, String[] args) {
mSecurityPolicy.enforceCallingPermission(Manifest.permission.DUMP, FUNCTION_DUMP);
synchronized (mLock) {
pw.println("ACCESSIBILITY MANAGER (dumpsys accessibility)");
pw.println();
final int userCount = mUserStates.size();
for (int i = 0; i < userCount; i++) {
UserState userState = mUserStates.valueAt(i);
pw.append("User state[attributes:{id=" + userState.mUserId);
pw.append(", currentUser=" + (userState.mUserId == mCurrentUserId));
pw.append(", touchExplorationEnabled=" + userState.mIsTouchExplorationEnabled);
pw.append(", displayMagnificationEnabled=" + userState.mIsDisplayMagnificationEnabled);
pw.append(", autoclickEnabled=" + userState.mIsAutoclickEnabled);
if (userState.mUiAutomationService != null) {
pw.append(", ");
userState.mUiAutomationService.dump(fd, pw, args);
pw.println();
}
pw.append("}");
pw.println();
pw.append(" services:{");
final int serviceCount = userState.mBoundServices.size();
for (int j = 0; j < serviceCount; j++) {
if (j > 0) {
pw.append(", ");
pw.println();
pw.append(" ");
}
Service service = userState.mBoundServices.get(j);
service.dump(fd, pw, args);
}
pw.println("}]");
pw.println();
}
if (mSecurityPolicy.mWindows != null) {
final int windowCount = mSecurityPolicy.mWindows.size();
for (int j = 0; j < windowCount; j++) {
if (j > 0) {
pw.append(',');
pw.println();
}
pw.append("Window[");
AccessibilityWindowInfo window = mSecurityPolicy.mWindows.get(j);
pw.append(window.toString());
pw.append(']');
}
}
}
}
use of android.view.accessibility.AccessibilityWindowInfo in project robolectric by robolectric.
the class ShadowAccessibilityWindowInfo method obtain.
@Implementation
public static AccessibilityWindowInfo obtain() {
final AccessibilityWindowInfo obtainedInstance = ReflectionHelpers.callConstructor(AccessibilityWindowInfo.class);
StrictEqualityWindowWrapper wrapper = new StrictEqualityWindowWrapper(obtainedInstance);
obtainedInstances.put(wrapper, Thread.currentThread().getStackTrace());
return obtainedInstance;
}
use of android.view.accessibility.AccessibilityWindowInfo in project robolectric by robolectric.
the class ShadowAccessibilityWindowInfo method equals.
@Override
@Implementation
public boolean equals(Object object) {
if (!(object instanceof AccessibilityWindowInfo)) {
return false;
}
final AccessibilityWindowInfo window = (AccessibilityWindowInfo) object;
final ShadowAccessibilityWindowInfo otherShadow = (ShadowAccessibilityWindowInfo) ShadowExtractor.extract(window);
boolean areEqual = (type == otherShadow.getType());
areEqual &= (parent == otherShadow.getParent());
areEqual &= (rootNode == otherShadow.getRoot());
areEqual &= (layer == otherShadow.getLayer());
areEqual &= (id == otherShadow.getId());
areEqual &= (isAccessibilityFocused == otherShadow.isAccessibilityFocused());
areEqual &= (isActive == otherShadow.isActive());
areEqual &= (isFocused == otherShadow.isFocused());
Rect anotherBounds = new Rect();
otherShadow.getBoundsInScreen(anotherBounds);
areEqual &= (boundsInScreen.equals(anotherBounds));
return areEqual;
}
use of android.view.accessibility.AccessibilityWindowInfo in project android_frameworks_base by ResurrectionRemix.
the class AccessibilityManagerService method dump.
@Override
public void dump(FileDescriptor fd, final PrintWriter pw, String[] args) {
mSecurityPolicy.enforceCallingPermission(Manifest.permission.DUMP, FUNCTION_DUMP);
synchronized (mLock) {
pw.println("ACCESSIBILITY MANAGER (dumpsys accessibility)");
pw.println();
final int userCount = mUserStates.size();
for (int i = 0; i < userCount; i++) {
UserState userState = mUserStates.valueAt(i);
pw.append("User state[attributes:{id=" + userState.mUserId);
pw.append(", currentUser=" + (userState.mUserId == mCurrentUserId));
pw.append(", touchExplorationEnabled=" + userState.mIsTouchExplorationEnabled);
pw.append(", displayMagnificationEnabled=" + userState.mIsDisplayMagnificationEnabled);
pw.append(", autoclickEnabled=" + userState.mIsAutoclickEnabled);
if (userState.mUiAutomationService != null) {
pw.append(", ");
userState.mUiAutomationService.dump(fd, pw, args);
pw.println();
}
pw.append("}");
pw.println();
pw.append(" services:{");
final int serviceCount = userState.mBoundServices.size();
for (int j = 0; j < serviceCount; j++) {
if (j > 0) {
pw.append(", ");
pw.println();
pw.append(" ");
}
Service service = userState.mBoundServices.get(j);
service.dump(fd, pw, args);
}
pw.println("}]");
pw.println();
}
if (mSecurityPolicy.mWindows != null) {
final int windowCount = mSecurityPolicy.mWindows.size();
for (int j = 0; j < windowCount; j++) {
if (j > 0) {
pw.append(',');
pw.println();
}
pw.append("Window[");
AccessibilityWindowInfo window = mSecurityPolicy.mWindows.get(j);
pw.append(window.toString());
pw.append(']');
}
}
}
}
Aggregations