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

Commit 02f646e6 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Fix missing textservices dump in 'adb bugreport'

This CL fixes a regression that was introduced when we enabled
multiple users to use spell checker APIs at the same time [1].

It turns out that 'adb bugreport' invokes
  adb shell dumpsys textservices
with '-a' option.

With this CL '-a' option is no longer treated as an error in
TextServicesManagerService#dump().

 [1]: I06c27ef834203a21cc445dc126602c799384527b
      06a26240

Bug: 63041121
Fix: 72462172
Test: adb shell dumpsys textservices -a
Test: Manually verified that 'adb bugreport report.zip' contains valid
      result for TextServicesManagerService.
Change-Id: I0b40845f542b1db816303dabe41083fc76f8aeee
parent c4d2827c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -701,7 +701,8 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;

        if (args.length == 0) {  // Dump all users' data
        if (args.length == 0 || (args.length == 1 && args[0].equals("-a"))) {
            // Dump all users' data
            synchronized (mLock) {
                pw.println("Current Text Services Manager state:");
                pw.println("  Users:");