Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3547af8 authored by Rhed Jao's avatar Rhed Jao
Browse files

Dumps bound and enabled services in a11yManagerService

Bug: 128422953
Test: dumpsys accessibility
Change-Id: I2f1fd441818d0a7bd379a9e7d325bcb63b64c620
parent efd7f18d
Loading
Loading
Loading
Loading
+27 −1
Original line number Diff line number Diff line
@@ -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();
            }
        }
    }