Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import static android.provider.Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_NONE; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_PUBLIC; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_SENSITIVE_CONTENT; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_OTP; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertFalse; Loading Loading @@ -693,7 +693,7 @@ public class NotificationLockscreenUserManagerTest extends SysuiTestCase { mLockscreenUserManager.mConnectedToWifi.set(false); // Sensitive Content notifications are always redacted assertEquals(REDACTION_TYPE_SENSITIVE_CONTENT, assertEquals(REDACTION_TYPE_OTP, mLockscreenUserManager.getRedactionType(mSensitiveContentNotif)); } Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/row/NotificationContentInflaterTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ package com.android.systemui.statusbar.notification.row; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_PUBLIC; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_SENSITIVE_CONTENT; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_OTP; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.RedactionType; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_NONE; import static com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_ALL; Loading Loading @@ -472,7 +472,7 @@ public class NotificationContentInflaterTest extends SysuiTestCase { com.android.systemui.res.R.drawable.ic_person).setStyle(messagingStyle).build(); ExpandableNotificationRow row = mHelper.createRow(messageNotif); inflateAndWait(false, mNotificationInflater, FLAG_CONTENT_VIEW_PUBLIC, REDACTION_TYPE_SENSITIVE_CONTENT, row); REDACTION_TYPE_OTP, row); NotificationContentView publicView = row.getPublicLayout(); assertNotNull(publicView); // The display name should be included, but not the content or message text Loading @@ -493,7 +493,7 @@ public class NotificationContentInflaterTest extends SysuiTestCase { .build(); ExpandableNotificationRow row = mHelper.createRow(notif); inflateAndWait(false, mNotificationInflater, FLAG_CONTENT_VIEW_PUBLIC, REDACTION_TYPE_SENSITIVE_CONTENT, row); REDACTION_TYPE_OTP, row); NotificationContentView publicView = row.getPublicLayout(); assertNotNull(publicView); assertFalse(hasText(publicView, contentText)); Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/row/NotificationRowContentBinderImplTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -36,8 +36,8 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.res.R import com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_NONE import com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_OTP import com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_PUBLIC import com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_SENSITIVE_CONTENT import com.android.systemui.statusbar.NotificationLockscreenUserManager.RedactionType import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.notification.ConversationNotificationProcessor Loading Loading @@ -538,7 +538,7 @@ class NotificationRowContentBinderImplTest : SysuiTestCase() { false, notificationInflater, FLAG_CONTENT_VIEW_PUBLIC, REDACTION_TYPE_SENSITIVE_CONTENT, REDACTION_TYPE_OTP, newRow, ) // The display name should be included, but not the content or message text Loading Loading @@ -566,7 +566,7 @@ class NotificationRowContentBinderImplTest : SysuiTestCase() { false, notificationInflater, FLAG_CONTENT_VIEW_PUBLIC, REDACTION_TYPE_SENSITIVE_CONTENT, REDACTION_TYPE_OTP, newRow, ) var publicView = newRow.publicLayout Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ public interface NotificationLockscreenUserManager { value = { REDACTION_TYPE_NONE, REDACTION_TYPE_PUBLIC, REDACTION_TYPE_SENSITIVE_CONTENT}) REDACTION_TYPE_OTP}) @interface RedactionType {} /** Loading @@ -52,7 +52,7 @@ public interface NotificationLockscreenUserManager { * Indicates that a notification should have its main content redacted, due to detected * sensitive content, such as a One-Time Password */ int REDACTION_TYPE_SENSITIVE_CONTENT = 1 << 1; int REDACTION_TYPE_OTP = 1 << 1; /** * @param userId user Id Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -795,7 +795,7 @@ public class NotificationLockscreenUserManagerImpl implements } if (shouldShowSensitiveContentRedactedView(ent)) { return REDACTION_TYPE_SENSITIVE_CONTENT; return REDACTION_TYPE_OTP; } return REDACTION_TYPE_NONE; } Loading Loading @@ -920,7 +920,7 @@ public class NotificationLockscreenUserManagerImpl implements // notification's "when" time, or the notification entry creation time private long getEarliestNotificationTime(NotificationEntry notif) { long notifWhenWallClock = notif.getSbn().getNotification().getWhen(); long creationTimeDelta = SystemClock.elapsedRealtime() - notif.getCreationTime(); long creationTimeDelta = SystemClock.uptimeMillis() - notif.getCreationTime(); long creationTimeWallClock = System.currentTimeMillis() - creationTimeDelta; return Math.min(notifWhenWallClock, creationTimeWallClock); } Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import static android.provider.Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_NONE; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_PUBLIC; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_SENSITIVE_CONTENT; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_OTP; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertFalse; Loading Loading @@ -693,7 +693,7 @@ public class NotificationLockscreenUserManagerTest extends SysuiTestCase { mLockscreenUserManager.mConnectedToWifi.set(false); // Sensitive Content notifications are always redacted assertEquals(REDACTION_TYPE_SENSITIVE_CONTENT, assertEquals(REDACTION_TYPE_OTP, mLockscreenUserManager.getRedactionType(mSensitiveContentNotif)); } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/row/NotificationContentInflaterTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ package com.android.systemui.statusbar.notification.row; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_PUBLIC; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_SENSITIVE_CONTENT; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_OTP; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.RedactionType; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_NONE; import static com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_ALL; Loading Loading @@ -472,7 +472,7 @@ public class NotificationContentInflaterTest extends SysuiTestCase { com.android.systemui.res.R.drawable.ic_person).setStyle(messagingStyle).build(); ExpandableNotificationRow row = mHelper.createRow(messageNotif); inflateAndWait(false, mNotificationInflater, FLAG_CONTENT_VIEW_PUBLIC, REDACTION_TYPE_SENSITIVE_CONTENT, row); REDACTION_TYPE_OTP, row); NotificationContentView publicView = row.getPublicLayout(); assertNotNull(publicView); // The display name should be included, but not the content or message text Loading @@ -493,7 +493,7 @@ public class NotificationContentInflaterTest extends SysuiTestCase { .build(); ExpandableNotificationRow row = mHelper.createRow(notif); inflateAndWait(false, mNotificationInflater, FLAG_CONTENT_VIEW_PUBLIC, REDACTION_TYPE_SENSITIVE_CONTENT, row); REDACTION_TYPE_OTP, row); NotificationContentView publicView = row.getPublicLayout(); assertNotNull(publicView); assertFalse(hasText(publicView, contentText)); Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/row/NotificationRowContentBinderImplTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -36,8 +36,8 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.res.R import com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_NONE import com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_OTP import com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_PUBLIC import com.android.systemui.statusbar.NotificationLockscreenUserManager.REDACTION_TYPE_SENSITIVE_CONTENT import com.android.systemui.statusbar.NotificationLockscreenUserManager.RedactionType import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.notification.ConversationNotificationProcessor Loading Loading @@ -538,7 +538,7 @@ class NotificationRowContentBinderImplTest : SysuiTestCase() { false, notificationInflater, FLAG_CONTENT_VIEW_PUBLIC, REDACTION_TYPE_SENSITIVE_CONTENT, REDACTION_TYPE_OTP, newRow, ) // The display name should be included, but not the content or message text Loading Loading @@ -566,7 +566,7 @@ class NotificationRowContentBinderImplTest : SysuiTestCase() { false, notificationInflater, FLAG_CONTENT_VIEW_PUBLIC, REDACTION_TYPE_SENSITIVE_CONTENT, REDACTION_TYPE_OTP, newRow, ) var publicView = newRow.publicLayout Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ public interface NotificationLockscreenUserManager { value = { REDACTION_TYPE_NONE, REDACTION_TYPE_PUBLIC, REDACTION_TYPE_SENSITIVE_CONTENT}) REDACTION_TYPE_OTP}) @interface RedactionType {} /** Loading @@ -52,7 +52,7 @@ public interface NotificationLockscreenUserManager { * Indicates that a notification should have its main content redacted, due to detected * sensitive content, such as a One-Time Password */ int REDACTION_TYPE_SENSITIVE_CONTENT = 1 << 1; int REDACTION_TYPE_OTP = 1 << 1; /** * @param userId user Id Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -795,7 +795,7 @@ public class NotificationLockscreenUserManagerImpl implements } if (shouldShowSensitiveContentRedactedView(ent)) { return REDACTION_TYPE_SENSITIVE_CONTENT; return REDACTION_TYPE_OTP; } return REDACTION_TYPE_NONE; } Loading Loading @@ -920,7 +920,7 @@ public class NotificationLockscreenUserManagerImpl implements // notification's "when" time, or the notification entry creation time private long getEarliestNotificationTime(NotificationEntry notif) { long notifWhenWallClock = notif.getSbn().getNotification().getWhen(); long creationTimeDelta = SystemClock.elapsedRealtime() - notif.getCreationTime(); long creationTimeDelta = SystemClock.uptimeMillis() - notif.getCreationTime(); long creationTimeWallClock = System.currentTimeMillis() - creationTimeDelta; return Math.min(notifWhenWallClock, creationTimeWallClock); } Loading