Dumps bound and enabled services in a11yManagerService

Bug: 128422953
Test: dumpsys accessibility
Change-Id: I2f1fd441818d0a7bd379a9e7d325bcb63b64c620
This commit is contained in:
Rhed Jao
2019-03-29 12:02:59 +08:00
parent efd7f18d2b
commit d3547af8fe

View File

@@ -2549,6 +2549,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
pw.append(", autoclickEnabled=" + userState.mIsAutoclickEnabled);
pw.append(", nonInteractiveUiTimeout=" + userState.mNonInteractiveUiTimeout);
pw.append(", interactiveUiTimeout=" + userState.mInteractiveUiTimeout);
pw.append(", installedServiceCount=" + userState.mInstalledServices.size());
if (mUiAutomationManager.isUiAutomationRunningLocked()) {
pw.append(", ");
mUiAutomationManager.dumpUiAutomationService(fd, pw, args);
@@ -2556,7 +2557,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
}
pw.append("}");
pw.println();
pw.append(" services:{");
pw.append(" Bound services:{");
final int serviceCount = userState.mBoundServices.size();
for (int j = 0; j < serviceCount; j++) {
if (j > 0) {
@@ -2567,6 +2568,30 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
AccessibilityServiceConnection service = userState.mBoundServices.get(j);
service.dump(fd, pw, args);
}
pw.println("}");
pw.append(" Enabled services:{");
Iterator<ComponentName> it = userState.mEnabledServices.iterator();
if (it.hasNext()) {
ComponentName componentName = it.next();
pw.append(componentName.toShortString());
while (it.hasNext()) {
componentName = it.next();
pw.append(", ");
pw.append(componentName.toShortString());
}
}
pw.println("}");
pw.append(" Binding services:{");
it = userState.mBindingServices.iterator();
if (it.hasNext()) {
ComponentName componentName = it.next();
pw.append(componentName.toShortString());
while (it.hasNext()) {
componentName = it.next();
pw.append(", ");
pw.append(componentName.toShortString());
}
}
pw.println("}]");
pw.println();
}
@@ -2582,6 +2607,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
pw.append(window.toString());
pw.append(']');
}
pw.println();
}
}
}