Merge "Fixing crash when dumping secondary SystemUI user service." into nyc-dev
am: 5d65340fc5
* commit '5d65340fc5b5a0becd204b3feb9627b2de33fceb':
Fixing crash when dumping secondary SystemUI user service.
Change-Id: I6fc0594335291a07e7dae79cc8c80b0b3d952acc
This commit is contained in:
@@ -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,15 +41,19 @@ public class SystemUISecondaryUserService extends Service {
|
||||
SystemUI[] services = ((SystemUIApplication) getApplication()).getServices();
|
||||
if (args == null || args.length == 0) {
|
||||
for (SystemUI ui: services) {
|
||||
pw.println("dumping service: " + ui.getClass().getName());
|
||||
ui.dump(fd, pw, args);
|
||||
if (ui != null) {
|
||||
pw.println("dumping service: " + ui.getClass().getName());
|
||||
ui.dump(fd, pw, args);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
String svc = args[0];
|
||||
for (SystemUI ui: services) {
|
||||
String name = ui.getClass().getName();
|
||||
if (name.endsWith(svc)) {
|
||||
ui.dump(fd, pw, args);
|
||||
if (ui != null) {
|
||||
String name = ui.getClass().getName();
|
||||
if (name.endsWith(svc)) {
|
||||
ui.dump(fd, pw, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user