summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationUtils.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java77
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java41
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationRowLogger.kt80
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/MagneticNotificationRowManagerImpl.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java10
6 files changed, 109 insertions, 104 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationUtils.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationUtils.java
index eb1be6772b99..c6775d6dc051 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationUtils.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationUtils.java
@@ -24,6 +24,7 @@ import android.widget.ImageView;
import com.android.internal.util.ContrastColorUtil;
import com.android.systemui.res.R;
+import com.android.systemui.statusbar.notification.collection.EntryAdapter;
import com.android.systemui.statusbar.notification.collection.ListEntry;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.util.Compile;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
index 987a67a90e4f..8c8b773a720c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
@@ -22,6 +22,7 @@ import static android.service.notification.NotificationListenerService.REASON_CA
import static com.android.systemui.Flags.notificationsPinnedHunInShade;
import static com.android.systemui.flags.Flags.ENABLE_NOTIFICATIONS_SIMULATE_SLOW_MEASURE;
+import static com.android.systemui.statusbar.notification.NotificationUtils.logKey;
import static com.android.systemui.statusbar.notification.collection.NotificationEntry.DismissState.PARENT_DISMISSED;
import static com.android.systemui.statusbar.notification.row.NotificationContentView.VISIBLE_TYPE_HEADSUP;
import static com.android.systemui.statusbar.policy.RemoteInputView.FOCUS_ANIMATION_MIN_SCALE;
@@ -525,6 +526,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
return mPublicLayout;
}
+ public String getLoggingKey() {
+ return mLoggingKey;
+ }
+
/**
* Sets animations running in the layouts of this row, including public, private, and children.
*
@@ -1917,15 +1922,15 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
* Called when a notification which was previously kept in its parent for the
* dismiss animation is finally detached from its parent.
*/
- void logKeepInParentChildDetached(NotificationEntry child, NotificationEntry oldParent);
+ void logKeepInParentChildDetached(String child, String oldParent);
/**
* Called when we want to attach a notification to a new parent,
* but it still has the keepInParent flag set, so we skip it.
*/
void logSkipAttachingKeepInParentChild(
- NotificationEntry child,
- NotificationEntry newParent
+ String child,
+ String newParent
);
/**
@@ -1933,8 +1938,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
* NotificationChildrenContainer
*/
void logRemoveTransientFromContainer(
- NotificationEntry childEntry,
- NotificationEntry containerEntry
+ String childEntry,
+ String containerEntry
);
/**
@@ -1942,7 +1947,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
* NotificationStackScrollLayout
*/
void logRemoveTransientFromNssl(
- NotificationEntry childEntry
+ String childEntry
);
/**
@@ -1950,7 +1955,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
* is not NotificationChildrenContainer or NotificationStackScrollLayout
*/
void logRemoveTransientFromViewGroup(
- NotificationEntry childEntry,
+ String childEntry,
ViewGroup containerView
);
@@ -1959,8 +1964,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
* ExpandableNotificationRow
*/
void logAddTransientRow(
- NotificationEntry childEntry,
- NotificationEntry containerEntry,
+ String childEntry,
+ String containerEntry,
int index
);
@@ -1969,39 +1974,39 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
* ExpandableNotificationRow
*/
void logRemoveTransientRow(
- NotificationEntry childEntry,
- NotificationEntry containerEntry
+ String childEntry,
+ String containerEntry
);
/**
* Called when resetting the alpha value for content views
*/
void logResetAllContentAlphas(
- NotificationEntry entry
+ String entry
);
/**
* Called when resetting the alpha value for content views is skipped
*/
void logSkipResetAllContentAlphas(
- NotificationEntry entry
+ String entry
);
/** Called when we start an appear animation. */
- void logStartAppearAnimation(NotificationEntry entry, boolean isAppear);
+ void logStartAppearAnimation(String entry, boolean isAppear);
/** Called when we cancel the running appear animation. */
- void logCancelAppearDrawing(NotificationEntry entry, boolean wasDrawing);
+ void logCancelAppearDrawing(String entry, boolean wasDrawing);
/** Called when the animator of the appear animation is started. */
- void logAppearAnimationStarted(NotificationEntry entry, boolean isAppear);
+ void logAppearAnimationStarted(String entry, boolean isAppear);
/** Called when we prepared an appear animation, but the animator was never started. */
- void logAppearAnimationSkipped(NotificationEntry entry, boolean isAppear);
+ void logAppearAnimationSkipped(String entry, boolean isAppear);
/** Called when the animator of the appear animation is finished. */
void logAppearAnimationFinished(
- NotificationEntry entry,
+ String entry,
boolean isAppear,
boolean cancelled
);
@@ -2080,7 +2085,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
NotificationEntry entry,
RemoteInputViewSubcomponent.Factory rivSubcomponentFactory,
String appName,
- String notificationKey,
+ @NonNull String notificationKey,
ExpandableNotificationRowLogger logger,
KeyguardBypassController bypassController,
GroupMembershipManager groupMembershipManager,
@@ -2120,7 +2125,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
mMenuRow.setAppName(mAppName);
}
mLogger = logger;
- mLoggingKey = notificationKey;
+ mLoggingKey = logKey(notificationKey);
mBypassController = bypassController;
mGroupMembershipManager = groupMembershipManager;
mGroupExpansionManager = groupExpansionManager;
@@ -3292,7 +3297,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
}
resetAllContentAlphas();
} else {
- mLogger.logSkipResetAllContentAlphas(getEntry());
+ mLogger.logSkipResetAllContentAlphas(mLoggingKey);
}
mPublicLayout.setVisibility(mShowingPublic ? View.VISIBLE : View.INVISIBLE);
updateChildrenVisibility();
@@ -3442,7 +3447,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
@Override
public void performAddAnimation(long delay, long duration, boolean isHeadsUpAppear,
Runnable onFinishRunnable) {
- mLogger.logStartAppearAnimation(getEntry(), /* isAppear = */ true);
+ mLogger.logStartAppearAnimation(mLoggingKey, /* isAppear = */ true);
super.performAddAnimation(delay, duration, isHeadsUpAppear, onFinishRunnable);
}
@@ -3455,7 +3460,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
Runnable onStartedRunnable,
Runnable onFinishedRunnable,
AnimatorListenerAdapter animationListener, ClipSide clipSide) {
- mLogger.logStartAppearAnimation(getEntry(), /* isAppear = */ false);
+ mLogger.logStartAppearAnimation(mLoggingKey, /* isAppear = */ false);
if (mMenuRow != null && mMenuRow.isMenuVisible()) {
Animator anim = getTranslateViewAnimator(0f, null /* listener */);
if (anim != null) {
@@ -3485,20 +3490,20 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
@Override
protected void onAppearAnimationStarted(boolean isAppear) {
- mLogger.logAppearAnimationStarted(getEntry(), /* isAppear = */ isAppear);
+ mLogger.logAppearAnimationStarted(mLoggingKey, /* isAppear = */ isAppear);
super.onAppearAnimationStarted(isAppear);
}
@Override
protected void onAppearAnimationSkipped(boolean isAppear) {
- mLogger.logAppearAnimationSkipped(getEntry(), /* isAppear = */ isAppear);
+ mLogger.logAppearAnimationSkipped(mLoggingKey, /* isAppear = */ isAppear);
super.onAppearAnimationSkipped(isAppear);
}
@Override
protected void onAppearAnimationFinished(boolean wasAppearing, boolean cancelled) {
mLogger.logAppearAnimationFinished(
- /* entry = */ getEntry(),
+ /* entry = */ mLoggingKey,
/* isAppear = */ wasAppearing,
/* cancelled = */ cancelled
);
@@ -3519,13 +3524,13 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
@Override
public void cancelAppearDrawing() {
- mLogger.logCancelAppearDrawing(getEntry(), isDrawingAppearAnimation());
+ mLogger.logCancelAppearDrawing(mLoggingKey, isDrawingAppearAnimation());
super.cancelAppearDrawing();
}
@Override
public void resetAllContentAlphas() {
- mLogger.logResetAllContentAlphas(getEntry());
+ mLogger.logResetAllContentAlphas(mLoggingKey);
mPrivateLayout.setAlpha(1f);
mPrivateLayout.setLayerType(LAYER_TYPE_NONE, null);
mPublicLayout.setAlpha(1f);
@@ -4297,13 +4302,13 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
private void logKeepInParentChildDetached(ExpandableNotificationRow child) {
if (mLogger != null) {
- mLogger.logKeepInParentChildDetached(child.getEntry(), getEntry());
+ mLogger.logKeepInParentChildDetached(child.getLoggingKey(), mLoggingKey);
}
}
private void logSkipAttachingKeepInParentChild(ExpandableNotificationRow child) {
if (mLogger != null) {
- mLogger.logSkipAttachingKeepInParentChild(child.getEntry(), getEntry());
+ mLogger.logSkipAttachingKeepInParentChild(child.getLoggingKey(), mLoggingKey);
}
}
@@ -4359,17 +4364,17 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
}
if (transientContainer instanceof NotificationChildrenContainer) {
mLogger.logRemoveTransientFromContainer(
- /* childEntry = */ getEntry(),
+ /* childEntry = */ mLoggingKey,
/* containerEntry = */ ((NotificationChildrenContainer) transientContainer)
- .getContainingNotification().getEntry()
+ .getContainingNotification().getLoggingKey()
);
} else if (transientContainer instanceof NotificationStackScrollLayout) {
mLogger.logRemoveTransientFromNssl(
- /* childEntry = */ getEntry()
+ /* childEntry = */ mLoggingKey
);
} else {
mLogger.logRemoveTransientFromViewGroup(
- /* childEntry = */ getEntry(),
+ /* childEntry = */ mLoggingKey,
/* containerView = */ transientContainer
);
}
@@ -4387,7 +4392,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
if (mLogger == null) {
return;
}
- mLogger.logAddTransientRow(row.getEntry(), getEntry(), index);
+ mLogger.logAddTransientRow(row.getLoggingKey(), mLoggingKey, index);
}
@Override
@@ -4402,6 +4407,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
if (mLogger == null) {
return;
}
- mLogger.logRemoveTransientRow(row.getEntry(), getEntry());
+ mLogger.logRemoveTransientRow(row.getLoggingKey(), mLoggingKey);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java
index 626230353bd7..b43a387a5edb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java
@@ -56,6 +56,7 @@ import com.android.systemui.statusbar.notification.people.PeopleNotificationIden
import com.android.systemui.statusbar.notification.row.dagger.AppName;
import com.android.systemui.statusbar.notification.row.dagger.NotificationKey;
import com.android.systemui.statusbar.notification.row.dagger.NotificationRowScope;
+import com.android.systemui.statusbar.notification.shared.NotificationBundleUi;
import com.android.systemui.statusbar.notification.stack.NotificationChildrenContainerLogger;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
import com.android.systemui.statusbar.notification.stack.ui.view.NotificationRowStatsLogger;
@@ -145,38 +146,38 @@ public class ExpandableNotificationRowController implements NotifViewController
@Override
public void logKeepInParentChildDetached(
- NotificationEntry child,
- NotificationEntry oldParent
+ String child,
+ String oldParent
) {
mLogBufferLogger.logKeepInParentChildDetached(child, oldParent);
}
@Override
public void logSkipAttachingKeepInParentChild(
- NotificationEntry child,
- NotificationEntry newParent
+ String child,
+ String newParent
) {
mLogBufferLogger.logSkipAttachingKeepInParentChild(child, newParent);
}
@Override
public void logRemoveTransientFromContainer(
- NotificationEntry childEntry,
- NotificationEntry containerEntry
+ String childEntry,
+ String containerEntry
) {
mLogBufferLogger.logRemoveTransientFromContainer(childEntry, containerEntry);
}
@Override
public void logRemoveTransientFromNssl(
- NotificationEntry childEntry
+ String childEntry
) {
mLogBufferLogger.logRemoveTransientFromNssl(childEntry);
}
@Override
public void logRemoveTransientFromViewGroup(
- NotificationEntry childEntry,
+ String childEntry,
ViewGroup containerView
) {
mLogBufferLogger.logRemoveTransientFromViewGroup(childEntry, containerView);
@@ -184,8 +185,8 @@ public class ExpandableNotificationRowController implements NotifViewController
@Override
public void logAddTransientRow(
- NotificationEntry childEntry,
- NotificationEntry containerEntry,
+ String childEntry,
+ String containerEntry,
int index
) {
mLogBufferLogger.logAddTransientRow(childEntry, containerEntry, index);
@@ -193,48 +194,48 @@ public class ExpandableNotificationRowController implements NotifViewController
@Override
public void logRemoveTransientRow(
- NotificationEntry childEntry,
- NotificationEntry containerEntry
+ String childEntry,
+ String containerEntry
) {
mLogBufferLogger.logRemoveTransientRow(childEntry, containerEntry);
}
@Override
public void logResetAllContentAlphas(
- NotificationEntry entry
+ String entry
) {
mLogBufferLogger.logResetAllContentAlphas(entry);
}
@Override
public void logSkipResetAllContentAlphas(
- NotificationEntry entry
+ String entry
) {
mLogBufferLogger.logSkipResetAllContentAlphas(entry);
}
@Override
- public void logStartAppearAnimation(NotificationEntry entry, boolean isAppear) {
+ public void logStartAppearAnimation(String entry, boolean isAppear) {
mLogBufferLogger.logStartAppearAnimation(entry, isAppear);
}
@Override
- public void logCancelAppearDrawing(NotificationEntry entry, boolean wasDrawing) {
+ public void logCancelAppearDrawing(String entry, boolean wasDrawing) {
mLogBufferLogger.logCancelAppearDrawing(entry, wasDrawing);
}
@Override
- public void logAppearAnimationStarted(NotificationEntry entry, boolean isAppear) {
+ public void logAppearAnimationStarted(String entry, boolean isAppear) {
mLogBufferLogger.logAppearAnimationStarted(entry, isAppear);
}
@Override
- public void logAppearAnimationSkipped(NotificationEntry entry, boolean isAppear) {
+ public void logAppearAnimationSkipped(String entry, boolean isAppear) {
mLogBufferLogger.logAppearAnimationSkipped(entry, isAppear);
}
@Override
- public void logAppearAnimationFinished(NotificationEntry entry, boolean isAppear,
+ public void logAppearAnimationFinished(String entry, boolean isAppear,
boolean cancelled) {
mLogBufferLogger.logAppearAnimationFinished(entry, isAppear, cancelled);
}
@@ -405,7 +406,7 @@ public class ExpandableNotificationRowController implements NotifViewController
@Override
@NonNull
public String getNodeLabel() {
- return logKey(mView.getEntry());
+ return NotificationBundleUi.isEnabled() ? mView.getLoggingKey() : logKey(mView.getEntry());
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationRowLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationRowLogger.kt
index 9e1c974a60ca..dad57a050c91 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationRowLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationRowLogger.kt
@@ -22,8 +22,6 @@ import com.android.systemui.log.LogBuffer
import com.android.systemui.log.core.LogLevel
import com.android.systemui.log.dagger.NotificationLog
import com.android.systemui.log.dagger.NotificationRenderLog
-import com.android.systemui.statusbar.notification.collection.NotificationEntry
-import com.android.systemui.statusbar.notification.logKey
import com.android.systemui.statusbar.notification.stack.MagneticNotificationRowManagerImpl
import javax.inject.Inject
@@ -33,60 +31,60 @@ constructor(
@NotificationLog private val buffer: LogBuffer,
@NotificationRenderLog private val notificationRenderBuffer: LogBuffer,
) {
- fun logKeepInParentChildDetached(child: NotificationEntry, oldParent: NotificationEntry?) {
+ fun logKeepInParentChildDetached(child: String, oldParent: String?) {
buffer.log(
TAG,
LogLevel.DEBUG,
{
- str1 = child.logKey
- str2 = oldParent.logKey
+ str1 = child
+ str2 = oldParent
},
{ "Detach child $str1 kept in parent $str2" },
)
}
- fun logSkipAttachingKeepInParentChild(child: NotificationEntry, newParent: NotificationEntry?) {
+ fun logSkipAttachingKeepInParentChild(child: String, newParent: String?) {
buffer.log(
TAG,
LogLevel.WARNING,
{
- str1 = child.logKey
- str2 = newParent.logKey
+ str1 = child
+ str2 = newParent
},
{ "Skipping to attach $str1 to $str2, because it still flagged to keep in parent" },
)
}
fun logRemoveTransientFromContainer(
- childEntry: NotificationEntry,
- containerEntry: NotificationEntry,
+ childEntry: String,
+ containerEntry: String,
) {
notificationRenderBuffer.log(
TAG,
LogLevel.INFO,
{
- str1 = childEntry.logKey
- str2 = containerEntry.logKey
+ str1 = childEntry
+ str2 = containerEntry
},
{ "RemoveTransientRow from ChildrenContainer: childKey: $str1 -- containerKey: $str2" },
)
}
- fun logRemoveTransientFromNssl(childEntry: NotificationEntry) {
+ fun logRemoveTransientFromNssl(childEntry: String) {
notificationRenderBuffer.log(
TAG,
LogLevel.INFO,
- { str1 = childEntry.logKey },
+ { str1 = childEntry },
{ "RemoveTransientRow from Nssl: childKey: $str1" },
)
}
- fun logRemoveTransientFromViewGroup(childEntry: NotificationEntry, containerView: ViewGroup) {
+ fun logRemoveTransientFromViewGroup(childEntry: String, containerView: ViewGroup) {
notificationRenderBuffer.log(
TAG,
LogLevel.WARNING,
{
- str1 = childEntry.logKey
+ str1 = childEntry
str2 = containerView.toString()
},
{ "RemoveTransientRow from other ViewGroup: childKey: $str1 -- ViewGroup: $str2" },
@@ -94,94 +92,94 @@ constructor(
}
fun logAddTransientRow(
- childEntry: NotificationEntry,
- containerEntry: NotificationEntry,
+ childEntry: String,
+ containerEntry: String,
index: Int,
) {
notificationRenderBuffer.log(
TAG,
LogLevel.ERROR,
{
- str1 = childEntry.logKey
- str2 = containerEntry.logKey
+ str1 = childEntry
+ str2 = containerEntry
int1 = index
},
{ "addTransientRow to row: childKey: $str1 -- containerKey: $str2 -- index: $int1" },
)
}
- fun logRemoveTransientRow(childEntry: NotificationEntry, containerEntry: NotificationEntry) {
+ fun logRemoveTransientRow(childEntry: String, containerEntry: String) {
notificationRenderBuffer.log(
TAG,
LogLevel.ERROR,
{
- str1 = childEntry.logKey
- str2 = containerEntry.logKey
+ str1 = childEntry
+ str2 = containerEntry
},
{ "removeTransientRow from row: childKey: $str1 -- containerKey: $str2" },
)
}
- fun logResetAllContentAlphas(entry: NotificationEntry) {
+ fun logResetAllContentAlphas(entry: String) {
notificationRenderBuffer.log(
TAG,
LogLevel.INFO,
- { str1 = entry.logKey },
+ { str1 = entry },
{ "resetAllContentAlphas: $str1" },
)
}
- fun logSkipResetAllContentAlphas(entry: NotificationEntry) {
+ fun logSkipResetAllContentAlphas(entry: String) {
notificationRenderBuffer.log(
TAG,
LogLevel.INFO,
- { str1 = entry.logKey },
+ { str1 = entry },
{ "Skip resetAllContentAlphas: $str1" },
)
}
- fun logStartAppearAnimation(entry: NotificationEntry, isAppear: Boolean) {
+ fun logStartAppearAnimation(entry: String, isAppear: Boolean) {
notificationRenderBuffer.log(
TAG,
LogLevel.DEBUG,
{
- str1 = entry.logKey
+ str1 = entry
bool1 = isAppear
},
{ "startAppearAnimation childKey: $str1 isAppear:$bool1" },
)
}
- fun logCancelAppearDrawing(entry: NotificationEntry, wasDrawing: Boolean) {
+ fun logCancelAppearDrawing(entry: String, wasDrawing: Boolean) {
notificationRenderBuffer.log(
TAG,
LogLevel.WARNING,
{
- str1 = entry.logKey
+ str1 = entry
bool1 = wasDrawing
},
{ "cancelAppearDrawing childKey: $str1 wasDrawing:$bool1" },
)
}
- fun logAppearAnimationStarted(entry: NotificationEntry, isAppear: Boolean) {
+ fun logAppearAnimationStarted(entry: String, isAppear: Boolean) {
notificationRenderBuffer.log(
TAG,
LogLevel.DEBUG,
{
- str1 = entry.logKey
+ str1 = entry
bool1 = isAppear
},
{ "onAppearAnimationStarted childKey: $str1 isAppear:$bool1" },
)
}
- fun logAppearAnimationSkipped(entry: NotificationEntry, isAppear: Boolean) {
+ fun logAppearAnimationSkipped(entry: String, isAppear: Boolean) {
notificationRenderBuffer.log(
TAG,
LogLevel.WARNING,
{
- str1 = entry.logKey
+ str1 = entry
bool1 = isAppear
},
{ "Skipped an appear animation childKey: $str1 isAppear:$bool1" },
@@ -189,7 +187,7 @@ constructor(
}
fun logAppearAnimationFinished(
- entry: NotificationEntry,
+ entry: String,
isAppear: Boolean,
cancelled: Boolean,
) {
@@ -197,7 +195,7 @@ constructor(
TAG,
LogLevel.DEBUG,
{
- str1 = entry.logKey
+ str1 = entry
bool1 = isAppear
bool2 = cancelled
},
@@ -207,13 +205,13 @@ constructor(
fun logMagneticAndRoundableTargetsNotSet(
state: MagneticNotificationRowManagerImpl.State,
- entry: NotificationEntry,
+ entry: String,
) {
buffer.log(
TAG,
LogLevel.ERROR,
{
- str1 = entry.logKey
+ str1 = entry
str2 = state.name
},
{ "Failed to set magnetic and roundable targets for $str1 on state $str2." },
@@ -222,13 +220,13 @@ constructor(
fun logMagneticRowTranslationNotSet(
state: MagneticNotificationRowManagerImpl.State,
- entry: NotificationEntry,
+ entry: String,
) {
buffer.log(
TAG,
LogLevel.ERROR,
{
- str1 = entry.logKey
+ str1 = entry
str2 = state.name
},
{ "Failed to set magnetic row translation for $str1 on state $str2." },
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/MagneticNotificationRowManagerImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/MagneticNotificationRowManagerImpl.kt
index a507c4ceecd2..881a7ea0058b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/MagneticNotificationRowManagerImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/MagneticNotificationRowManagerImpl.kt
@@ -73,7 +73,7 @@ constructor(
updateMagneticAndRoundableTargets(swipingRow, stackScrollLayout, sectionsManager)
currentState = State.TARGETS_SET
} else {
- logger.logMagneticAndRoundableTargetsNotSet(currentState, swipingRow.entry)
+ logger.logMagneticAndRoundableTargetsNotSet(currentState, swipingRow.loggingKey)
}
}
@@ -116,7 +116,7 @@ constructor(
currentMagneticListeners.swipedListener()?.canRowBeDismissed() ?: false
when (currentState) {
State.IDLE -> {
- logger.logMagneticRowTranslationNotSet(currentState, row.entry)
+ logger.logMagneticRowTranslationNotSet(currentState, row.getLoggingKey())
return false
}
State.TARGETS_SET -> {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java
index 77b116e2e465..ac947ed0ba76 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java
@@ -612,8 +612,8 @@ public class ExpandableNotificationRowTest extends SysuiTestCase {
Assert.assertTrue(group.getAttachedChildren().isEmpty());
Assert.assertNotEquals(group, child.getNotificationParent());
verify(mNotificationTestHelper.getMockLogger()).logSkipAttachingKeepInParentChild(
- /*child=*/ child.getEntry(),
- /*newParent=*/ group.getEntry()
+ /*child=*/ child.getLoggingKey(),
+ /*newParent=*/ group.getLoggingKey()
);
}
@@ -629,7 +629,7 @@ public class ExpandableNotificationRowTest extends SysuiTestCase {
Assert.assertNull(child.getNotificationParent());
Assert.assertFalse(child.keepInParentForDismissAnimation());
verify(mNotificationTestHelper.getMockLogger())
- .logCancelAppearDrawing(child.getEntry(), false);
+ .logCancelAppearDrawing(child.getLoggingKey(), false);
verifyNoMoreInteractions(mNotificationTestHelper.getMockLogger());
}
@@ -645,8 +645,8 @@ public class ExpandableNotificationRowTest extends SysuiTestCase {
Assert.assertNull(child.getNotificationParent());
Assert.assertFalse(child.keepInParentForDismissAnimation());
verify(mNotificationTestHelper.getMockLogger()).logKeepInParentChildDetached(
- /*child=*/ child.getEntry(),
- /*oldParent=*/ group.getEntry()
+ /*child=*/ child.getLoggingKey(),
+ /*oldParent=*/ group.getLoggingKey()
);
}