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

Commit 32c2c127 authored by Winson Chung's avatar Winson Chung Committed by android-build-merger
Browse files

Merge "Fixing crash when dumping secondary SystemUI user service." into nyc-dev am: 5d65340f

am: cb6674ef

* commit 'cb6674ef':
  Fixing crash when dumping secondary SystemUI user service.

Change-Id: Ib74a339daf3bea499da2000cd2a64e6bb9ac43b9
parents 646e8d06 cb6674ef
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -16,11 +16,9 @@

package com.android.systemui;

import android.app.ActivityManager;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.Process;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -43,12 +41,15 @@ public class SystemUISecondaryUserService extends Service {
        SystemUI[] services = ((SystemUIApplication) getApplication()).getServices();
        if (args == null || args.length == 0) {
            for (SystemUI ui: services) {
                if (ui != null) {
                    pw.println("dumping service: " + ui.getClass().getName());
                    ui.dump(fd, pw, args);
                }
            }
        } else {
            String svc = args[0];
            for (SystemUI ui: services) {
                if (ui != null) {
                    String name = ui.getClass().getName();
                    if (name.endsWith(svc)) {
                        ui.dump(fd, pw, args);
@@ -57,4 +58,5 @@ public class SystemUISecondaryUserService extends Service {
            }
        }
    }
}