Merge "Remove pipeline construct thread asserts + effects" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
54ad297e7c
@@ -138,6 +138,7 @@ public class NotifCollection implements Dumpable {
|
|||||||
private final NotifCollectionLogger mLogger;
|
private final NotifCollectionLogger mLogger;
|
||||||
private final Handler mMainHandler;
|
private final Handler mMainHandler;
|
||||||
private final LogBufferEulogizer mEulogizer;
|
private final LogBufferEulogizer mEulogizer;
|
||||||
|
private final DumpManager mDumpManager;
|
||||||
|
|
||||||
private final Map<String, NotificationEntry> mNotificationSet = new ArrayMap<>();
|
private final Map<String, NotificationEntry> mNotificationSet = new ArrayMap<>();
|
||||||
private final Collection<NotificationEntry> mReadOnlyNotificationSet =
|
private final Collection<NotificationEntry> mReadOnlyNotificationSet =
|
||||||
@@ -163,15 +164,13 @@ public class NotifCollection implements Dumpable {
|
|||||||
@Main Handler mainHandler,
|
@Main Handler mainHandler,
|
||||||
LogBufferEulogizer logBufferEulogizer,
|
LogBufferEulogizer logBufferEulogizer,
|
||||||
DumpManager dumpManager) {
|
DumpManager dumpManager) {
|
||||||
Assert.isMainThread();
|
|
||||||
mStatusBarService = statusBarService;
|
mStatusBarService = statusBarService;
|
||||||
mClock = clock;
|
mClock = clock;
|
||||||
mNotifPipelineFlags = notifPipelineFlags;
|
mNotifPipelineFlags = notifPipelineFlags;
|
||||||
mLogger = logger;
|
mLogger = logger;
|
||||||
mMainHandler = mainHandler;
|
mMainHandler = mainHandler;
|
||||||
mEulogizer = logBufferEulogizer;
|
mEulogizer = logBufferEulogizer;
|
||||||
|
mDumpManager = dumpManager;
|
||||||
dumpManager.registerDumpable(TAG, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Initializes the NotifCollection and registers it to receive notification events. */
|
/** Initializes the NotifCollection and registers it to receive notification events. */
|
||||||
@@ -181,7 +180,7 @@ public class NotifCollection implements Dumpable {
|
|||||||
throw new RuntimeException("attach() called twice");
|
throw new RuntimeException("attach() called twice");
|
||||||
}
|
}
|
||||||
mAttached = true;
|
mAttached = true;
|
||||||
|
mDumpManager.registerDumpable(TAG, this);
|
||||||
groupCoalescer.setNotificationHandler(mNotifHandler);
|
groupCoalescer.setNotificationHandler(mNotifHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ public class ShadeListBuilder implements Dumpable {
|
|||||||
private final SystemClock mSystemClock;
|
private final SystemClock mSystemClock;
|
||||||
private final ShadeListBuilderLogger mLogger;
|
private final ShadeListBuilderLogger mLogger;
|
||||||
private final NotificationInteractionTracker mInteractionTracker;
|
private final NotificationInteractionTracker mInteractionTracker;
|
||||||
|
private final DumpManager mDumpManager;
|
||||||
// used exclusivly by ShadeListBuilder#notifySectionEntriesUpdated
|
// used exclusivly by ShadeListBuilder#notifySectionEntriesUpdated
|
||||||
private final ArrayList<ListEntry> mTempSectionMembers = new ArrayList<>();
|
private final ArrayList<ListEntry> mTempSectionMembers = new ArrayList<>();
|
||||||
private final boolean mAlwaysLogList;
|
private final boolean mAlwaysLogList;
|
||||||
@@ -133,14 +134,12 @@ public class ShadeListBuilder implements Dumpable {
|
|||||||
ShadeListBuilderLogger logger,
|
ShadeListBuilderLogger logger,
|
||||||
SystemClock systemClock
|
SystemClock systemClock
|
||||||
) {
|
) {
|
||||||
Assert.isMainThread();
|
|
||||||
mSystemClock = systemClock;
|
mSystemClock = systemClock;
|
||||||
mLogger = logger;
|
mLogger = logger;
|
||||||
mAlwaysLogList = flags.isDevLoggingEnabled();
|
mAlwaysLogList = flags.isDevLoggingEnabled();
|
||||||
mInteractionTracker = interactionTracker;
|
mInteractionTracker = interactionTracker;
|
||||||
mChoreographer = pipelineChoreographer;
|
mChoreographer = pipelineChoreographer;
|
||||||
dumpManager.registerDumpable(TAG, this);
|
mDumpManager = dumpManager;
|
||||||
|
|
||||||
setSectioners(Collections.emptyList());
|
setSectioners(Collections.emptyList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,6 +149,7 @@ public class ShadeListBuilder implements Dumpable {
|
|||||||
*/
|
*/
|
||||||
public void attach(NotifCollection collection) {
|
public void attach(NotifCollection collection) {
|
||||||
Assert.isMainThread();
|
Assert.isMainThread();
|
||||||
|
mDumpManager.registerDumpable(TAG, this);
|
||||||
collection.addCollectionListener(mInteractionTracker);
|
collection.addCollectionListener(mInteractionTracker);
|
||||||
collection.setBuildListener(mReadyForBuildListener);
|
collection.setBuildListener(mReadyForBuildListener);
|
||||||
mChoreographer.addOnEvalListener(this::buildList);
|
mChoreographer.addOnEvalListener(this::buildList);
|
||||||
|
|||||||
Reference in New Issue
Block a user