summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alex Stetson <alexstetson@google.com> 2023-05-08 18:05:10 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-05-08 18:05:10 +0000
commit0e44c4575d404e222eee2f7b73f6b5d004633e2d (patch)
tree658da4c6f2bf8fef6c717b3ec74cc42889bfd20b
parent7b8a655a8bc239cc43c1001b621f2fe349d52a38 (diff)
parent2115bbe03806c8b6e952c60bffa2c9af225b44aa (diff)
Merge "Remove dumpable container from SystemUIApplication" into udc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/SystemUIApplication.java45
1 files changed, 3 insertions, 42 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
index 85788456d1cb..70c39df2a610 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
@@ -31,9 +31,6 @@ import android.os.Process;
import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
-import android.util.ArrayMap;
-import android.util.Dumpable;
-import android.util.DumpableContainer;
import android.util.Log;
import android.util.TimingsTraceLog;
import android.view.SurfaceControl;
@@ -57,18 +54,12 @@ import javax.inject.Provider;
* Application class for SystemUI.
*/
public class SystemUIApplication extends Application implements
- SystemUIAppComponentFactory.ContextInitializer, DumpableContainer {
+ SystemUIAppComponentFactory.ContextInitializer {
public static final String TAG = "SystemUIService";
private static final boolean DEBUG = false;
private BootCompleteCacheImpl mBootCompleteCache;
- private DumpManager mDumpManager;
-
- /**
- * Map of dumpables added externally.
- */
- private final ArrayMap<String, Dumpable> mDumpables = new ArrayMap<>();
/**
* Hold a reference on the stuff we start.
@@ -233,7 +224,7 @@ public class SystemUIApplication extends Application implements
}
}
- mDumpManager = mSysUIComponent.createDumpManager();
+ DumpManager dumpManager = mSysUIComponent.createDumpManager();
Log.v(TAG, "Starting SystemUI services for user " +
Process.myUserHandle().getIdentifier() + ".");
@@ -267,7 +258,7 @@ public class SystemUIApplication extends Application implements
notifyBootCompleted(mServices[i]);
}
- mDumpManager.registerDumpable(mServices[i].getClass().getName(), mServices[i]);
+ dumpManager.registerDumpable(mServices[i].getClass().getName(), mServices[i]);
}
mSysUIComponent.getInitController().executePostInitTasks();
log.traceEnd();
@@ -342,36 +333,6 @@ public class SystemUIApplication extends Application implements
return startable;
}
- // TODO(b/217567642): add unit tests? There doesn't seem to be a SystemUiApplicationTest...
- @Override
- public boolean addDumpable(Dumpable dumpable) {
- String name = dumpable.getDumpableName();
- if (mDumpables.containsKey(name)) {
- // This is normal because SystemUIApplication is an application context that is shared
- // among multiple components
- if (DEBUG) {
- Log.d(TAG, "addDumpable(): ignoring " + dumpable + " as there is already a dumpable"
- + " with that name (" + name + "): " + mDumpables.get(name));
- }
- return false;
- }
- if (DEBUG) Log.d(TAG, "addDumpable(): adding '" + name + "' = " + dumpable);
- mDumpables.put(name, dumpable);
-
- // TODO(b/217567642): replace com.android.systemui.dump.Dumpable by
- // com.android.util.Dumpable and get rid of the intermediate lambda
- mDumpManager.registerDumpable(dumpable.getDumpableName(), dumpable::dump);
- return true;
- }
-
- // TODO(b/217567642): implement
- @Override
- public boolean removeDumpable(Dumpable dumpable) {
- Log.w(TAG, "removeDumpable(" + dumpable + "): not implemented");
-
- return false;
- }
-
@Override
public void onConfigurationChanged(Configuration newConfig) {
if (mServicesStarted) {