Demote 2 Dumpables from CRITICAL for being slow
* NetworkController * WMShell Test: adb bugreport -> ABT Bug: 292221335 Change-Id: I89aeecb85c3c77f68da28758025ccf336269ca69
This commit is contained in:
@@ -53,6 +53,11 @@ public interface CoreStartable extends Dumpable {
|
|||||||
default void dump(@NonNull PrintWriter pw, @NonNull String[] args) {
|
default void dump(@NonNull PrintWriter pw, @NonNull String[] args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Called to determine if the dumpable should be registered as critical or normal priority */
|
||||||
|
default boolean isDumpCritical() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/** Called immediately after the system broadcasts
|
/** Called immediately after the system broadcasts
|
||||||
* {@link android.content.Intent#ACTION_LOCKED_BOOT_COMPLETED} or during SysUI startup if the
|
* {@link android.content.Intent#ACTION_LOCKED_BOOT_COMPLETED} or during SysUI startup if the
|
||||||
* property {@code sys.boot_completed} is already set to 1. The latter typically occurs when
|
* property {@code sys.boot_completed} is already set to 1. The latter typically occurs when
|
||||||
|
|||||||
@@ -254,11 +254,16 @@ public class SystemUIApplication extends Application implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < mServices.length; i++) {
|
for (i = 0; i < mServices.length; i++) {
|
||||||
|
final CoreStartable service = mServices[i];
|
||||||
if (mBootCompleteCache.isBootComplete()) {
|
if (mBootCompleteCache.isBootComplete()) {
|
||||||
notifyBootCompleted(mServices[i]);
|
notifyBootCompleted(service);
|
||||||
}
|
}
|
||||||
|
|
||||||
dumpManager.registerDumpable(mServices[i].getClass().getSimpleName(), mServices[i]);
|
if (service.isDumpCritical()) {
|
||||||
|
dumpManager.registerCriticalDumpable(service);
|
||||||
|
} else {
|
||||||
|
dumpManager.registerNormalDumpable(service);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mSysUIComponent.getInitController().executePostInitTasks();
|
mSysUIComponent.getInitController().executePostInitTasks();
|
||||||
log.traceEnd();
|
log.traceEnd();
|
||||||
|
|||||||
@@ -83,8 +83,6 @@ import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceP
|
|||||||
import com.android.systemui.telephony.TelephonyListenerManager;
|
import com.android.systemui.telephony.TelephonyListenerManager;
|
||||||
import com.android.systemui.util.CarrierConfigTracker;
|
import com.android.systemui.util.CarrierConfigTracker;
|
||||||
|
|
||||||
import kotlin.Unit;
|
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -99,6 +97,8 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import kotlin.Unit;
|
||||||
|
|
||||||
/** Platform implementation of the network controller. **/
|
/** Platform implementation of the network controller. **/
|
||||||
@SysUISingleton
|
@SysUISingleton
|
||||||
public class NetworkControllerImpl extends BroadcastReceiver
|
public class NetworkControllerImpl extends BroadcastReceiver
|
||||||
@@ -465,7 +465,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
|||||||
|
|
||||||
mDemoModeController.addCallback(this);
|
mDemoModeController.addCallback(this);
|
||||||
|
|
||||||
mDumpManager.registerDumpable(TAG, this);
|
mDumpManager.registerNormalDumpable(TAG, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Runnable mClearForceValidated = () -> {
|
private final Runnable mClearForceValidated = () -> {
|
||||||
|
|||||||
@@ -351,6 +351,13 @@ public final class WMShell implements
|
|||||||
}, mSysUiMainExecutor);
|
}, mSysUiMainExecutor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isDumpCritical() {
|
||||||
|
// Dump can't be critical because the shell has to dump on the main thread for
|
||||||
|
// synchronization reasons, which isn't reliably fast.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dump(PrintWriter pw, String[] args) {
|
public void dump(PrintWriter pw, String[] args) {
|
||||||
// Handle commands if provided
|
// Handle commands if provided
|
||||||
|
|||||||
Reference in New Issue
Block a user