Merge "Remove unused code from ExpandableNotificationRow" into tm-qpr-dev am: 9f00d05c0c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19678982

Change-Id: I8b63116c74271d6f9a09161431af3bdee1d2872f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
András Kurucz
2022-08-24 12:59:02 +00:00
committed by Automerger Merge Worker
2 changed files with 1 additions and 36 deletions

View File

@@ -20,7 +20,6 @@ import static android.app.Notification.Action.SEMANTIC_ACTION_MARK_CONVERSATION_
import static android.service.notification.NotificationListenerService.REASON_CANCEL; import static android.service.notification.NotificationListenerService.REASON_CANCEL;
import static com.android.systemui.statusbar.notification.row.NotificationContentView.VISIBLE_TYPE_HEADSUP; import static com.android.systemui.statusbar.notification.row.NotificationContentView.VISIBLE_TYPE_HEADSUP;
import static com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_PUBLIC;
import android.animation.Animator; import android.animation.Animator;
import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorListenerAdapter;
@@ -236,11 +235,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
*/ */
private boolean mIsHeadsUp; private boolean mIsHeadsUp;
/**
* Whether or not the notification should be redacted on the lock screen, i.e has sensitive
* content which should be redacted on the lock screen.
*/
private boolean mNeedsRedaction;
private boolean mLastChronometerRunning = true; private boolean mLastChronometerRunning = true;
private ViewStub mChildrenContainerStub; private ViewStub mChildrenContainerStub;
private GroupMembershipManager mGroupMembershipManager; private GroupMembershipManager mGroupMembershipManager;
@@ -1502,23 +1496,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
mUseIncreasedHeadsUpHeight = use; mUseIncreasedHeadsUpHeight = use;
} }
/** @deprecated TODO: Remove this when the old pipeline code is removed. */
@Deprecated
public void setNeedsRedaction(boolean needsRedaction) {
if (mNeedsRedaction != needsRedaction) {
mNeedsRedaction = needsRedaction;
if (!isRemoved()) {
RowContentBindParams params = mRowContentBindStage.getStageParams(mEntry);
if (needsRedaction) {
params.requireContentViews(FLAG_CONTENT_VIEW_PUBLIC);
} else {
params.markContentViewsFreeable(FLAG_CONTENT_VIEW_PUBLIC);
}
mRowContentBindStage.requestRebind(mEntry, null /* callback */);
}
}
}
public interface ExpansionLogger { public interface ExpansionLogger {
void logNotificationExpansion(String key, boolean userAction, boolean expanded); void logNotificationExpansion(String key, boolean userAction, boolean expanded);
} }

View File

@@ -28,7 +28,6 @@ import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyInt;
@@ -58,8 +57,8 @@ import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.notification.AboveShelfChangedListener; import com.android.systemui.statusbar.notification.AboveShelfChangedListener;
import com.android.systemui.statusbar.notification.FeedbackIcon; import com.android.systemui.statusbar.notification.FeedbackIcon;
import com.android.systemui.statusbar.notification.row.ExpandableView.OnHeightChangedListener;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.ExpandableView.OnHeightChangedListener;
import com.android.systemui.statusbar.notification.stack.NotificationChildrenContainer; import com.android.systemui.statusbar.notification.stack.NotificationChildrenContainer;
import org.junit.Assert; import org.junit.Assert;
@@ -259,17 +258,6 @@ public class ExpandableNotificationRowTest extends SysuiTestCase {
verify(row).updateShelfIconColor(); verify(row).updateShelfIconColor();
} }
@Test
public void setNeedsRedactionFreesViewWhenFalse() throws Exception {
ExpandableNotificationRow row = mNotificationTestHelper.createRow(FLAG_CONTENT_VIEW_ALL);
row.setNeedsRedaction(true);
row.getPublicLayout().setVisibility(View.GONE);
row.setNeedsRedaction(false);
TestableLooper.get(this).processAllMessages();
assertNull(row.getPublicLayout().getContractedChild());
}
@Test @Test
public void testAboveShelfChangedListenerCalled() throws Exception { public void testAboveShelfChangedListenerCalled() throws Exception {
ExpandableNotificationRow row = mNotificationTestHelper.createRow(); ExpandableNotificationRow row = mNotificationTestHelper.createRow();