Remove unused code from ExpandableNotificationRow
Test: atest ExpandableNotificationRowTest Bug: 200269355 Change-Id: I04cee547878573ffbd6de81afeb4ae14a3c7b2c6
This commit is contained in:
@@ -20,7 +20,6 @@ import static android.app.Notification.Action.SEMANTIC_ACTION_MARK_CONVERSATION_
|
||||
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.NotificationRowContentBinder.FLAG_CONTENT_VIEW_PUBLIC;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
@@ -237,11 +236,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
*/
|
||||
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 ViewStub mChildrenContainerStub;
|
||||
private GroupMembershipManager mGroupMembershipManager;
|
||||
@@ -1518,23 +1512,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
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 {
|
||||
void logNotificationExpansion(String key, boolean userAction, boolean expanded);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
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.statusbar.notification.AboveShelfChangedListener;
|
||||
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.row.ExpandableView.OnHeightChangedListener;
|
||||
import com.android.systemui.statusbar.notification.stack.NotificationChildrenContainer;
|
||||
|
||||
import org.junit.Assert;
|
||||
@@ -259,17 +258,6 @@ public class ExpandableNotificationRowTest extends SysuiTestCase {
|
||||
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
|
||||
public void testAboveShelfChangedListenerCalled() throws Exception {
|
||||
ExpandableNotificationRow row = mNotificationTestHelper.createRow();
|
||||
|
||||
Reference in New Issue
Block a user