Remove dead code from NotificationIconContainer classes
Bug: 278765923 Test: make Change-Id: Iebdc62e3ec378debef5ae15b62b1555021100f06
This commit is contained in:
@@ -160,7 +160,6 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
||||
private ObjectAnimator mIconAppearAnimator;
|
||||
private ObjectAnimator mDotAnimator;
|
||||
private float mDotAppearAmount;
|
||||
private OnVisibilityChangedListener mOnVisibilityChangedListener;
|
||||
private int mDrawableColor;
|
||||
private int mIconColor;
|
||||
private int mDecorColor;
|
||||
@@ -179,7 +178,6 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
||||
private int mCachedContrastBackgroundColor = NO_COLOR;
|
||||
private float[] mMatrix;
|
||||
private ColorMatrixColorFilter mMatrixColorFilter;
|
||||
private boolean mIsInShelf;
|
||||
private Runnable mLayoutRunnable;
|
||||
private boolean mDismissed;
|
||||
private Runnable mOnDismissListener;
|
||||
@@ -357,19 +355,6 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
||||
return mNotification != null;
|
||||
}
|
||||
|
||||
private static boolean streq(String a, String b) {
|
||||
if (a == b) {
|
||||
return true;
|
||||
}
|
||||
if (a == null && b != null) {
|
||||
return false;
|
||||
}
|
||||
if (a != null && b == null) {
|
||||
return false;
|
||||
}
|
||||
return a.equals(b);
|
||||
}
|
||||
|
||||
public boolean equalIcons(Icon a, Icon b) {
|
||||
if (a == b) return true;
|
||||
if (a.getType() != b.getType()) return false;
|
||||
@@ -908,7 +893,7 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
||||
if (targetAmount != currentAmount) {
|
||||
mDotAnimator = ObjectAnimator.ofFloat(this, DOT_APPEAR_AMOUNT,
|
||||
currentAmount, targetAmount);
|
||||
mDotAnimator.setInterpolator(interpolator);;
|
||||
mDotAnimator.setInterpolator(interpolator);
|
||||
mDotAnimator.setDuration(duration == 0 ? ANIMATION_DURATION_FAST
|
||||
: duration);
|
||||
final boolean runRunnable = !runnableAdded;
|
||||
@@ -965,22 +950,10 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVisibility(int visibility) {
|
||||
super.setVisibility(visibility);
|
||||
if (mOnVisibilityChangedListener != null) {
|
||||
mOnVisibilityChangedListener.onVisibilityChanged(visibility);
|
||||
}
|
||||
}
|
||||
|
||||
public float getDotAppearAmount() {
|
||||
return mDotAppearAmount;
|
||||
}
|
||||
|
||||
public void setOnVisibilityChangedListener(OnVisibilityChangedListener listener) {
|
||||
mOnVisibilityChangedListener = listener;
|
||||
}
|
||||
|
||||
public void setDozing(boolean dozing, boolean fade, long delay) {
|
||||
mDozer.setDozing(f -> {
|
||||
mDozeAmount = f;
|
||||
@@ -1014,14 +987,6 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
||||
outRect.bottom += translationY;
|
||||
}
|
||||
|
||||
public void setIsInShelf(boolean isInShelf) {
|
||||
mIsInShelf = isInShelf;
|
||||
}
|
||||
|
||||
public boolean isInShelf() {
|
||||
return mIsInShelf;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||
super.onLayout(changed, left, top, right, bottom);
|
||||
@@ -1103,8 +1068,4 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
||||
public boolean showsConversation() {
|
||||
return mShowsConversation;
|
||||
}
|
||||
|
||||
public interface OnVisibilityChangedListener {
|
||||
void onVisibilityChanged(int newVisibility);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,14 +33,11 @@ import com.android.systemui.statusbar.NotificationMediaManager;
|
||||
import com.android.systemui.statusbar.NotificationShelfController;
|
||||
import com.android.systemui.statusbar.StatusBarIconView;
|
||||
import com.android.systemui.statusbar.StatusBarState;
|
||||
import com.android.systemui.statusbar.notification.AnimatableProperty;
|
||||
import com.android.systemui.statusbar.notification.NotificationUtils;
|
||||
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
|
||||
import com.android.systemui.statusbar.notification.PropertyAnimator;
|
||||
import com.android.systemui.statusbar.notification.collection.ListEntry;
|
||||
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
|
||||
import com.android.systemui.statusbar.notification.collection.provider.SectionStyleProvider;
|
||||
import com.android.systemui.statusbar.notification.stack.AnimationProperties;
|
||||
import com.android.systemui.statusbar.window.StatusBarWindowController;
|
||||
import com.android.wm.shell.bubbles.Bubbles;
|
||||
|
||||
@@ -91,8 +88,6 @@ public class NotificationIconAreaController implements
|
||||
private final ArrayList<Rect> mTintAreas = new ArrayList<>();
|
||||
private final Context mContext;
|
||||
|
||||
private final DemoModeController mDemoModeController;
|
||||
|
||||
private final FeatureFlags mFeatureFlags;
|
||||
|
||||
private int mAodIconAppearTranslation;
|
||||
@@ -139,8 +134,7 @@ public class NotificationIconAreaController implements
|
||||
wakeUpCoordinator.addListener(this);
|
||||
mBypassController = keyguardBypassController;
|
||||
mBubblesOptional = bubblesOptional;
|
||||
mDemoModeController = demoModeController;
|
||||
mDemoModeController.addCallback(this);
|
||||
demoModeController.addCallback(this);
|
||||
mStatusBarWindowController = statusBarWindowController;
|
||||
mScreenOffAnimationController = screenOffAnimationController;
|
||||
notificationListener.addNotificationSettingsListener(mSettingsListener);
|
||||
@@ -163,7 +157,6 @@ public class NotificationIconAreaController implements
|
||||
LayoutInflater layoutInflater = LayoutInflater.from(context);
|
||||
mNotificationIconArea = inflateIconArea(layoutInflater);
|
||||
mNotificationIcons = mNotificationIconArea.findViewById(R.id.notificationIcons);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -185,16 +178,6 @@ public class NotificationIconAreaController implements
|
||||
updateIconLayoutParams(mContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update position of the view, with optional animation
|
||||
*/
|
||||
public void updatePosition(int x, AnimationProperties props, boolean animate) {
|
||||
if (mAodIcons != null) {
|
||||
PropertyAnimator.setProperty(mAodIcons, AnimatableProperty.TRANSLATION_X, x, props,
|
||||
animate);
|
||||
}
|
||||
}
|
||||
|
||||
public void setupShelf(NotificationShelfController notificationShelfController) {
|
||||
NotificationShelfController.assertRefactorFlagDisabled(mFeatureFlags);
|
||||
mShelfIcons = notificationShelfController.getShelfIcons();
|
||||
@@ -303,6 +286,7 @@ public class NotificationIconAreaController implements
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the notifications with the given list of notifications to display.
|
||||
*/
|
||||
|
||||
@@ -54,19 +54,13 @@ import java.util.function.Consumer;
|
||||
* correctly on the screen.
|
||||
*/
|
||||
public class NotificationIconContainer extends ViewGroup {
|
||||
/**
|
||||
* A float value indicating how much before the overflow start the icons should transform into
|
||||
* a dot. A value of 0 means that they are exactly at the end and a value of 1 means it starts
|
||||
* 1 icon width early.
|
||||
*/
|
||||
public static final float OVERFLOW_EARLY_AMOUNT = 0.2f;
|
||||
private static final int NO_VALUE = Integer.MIN_VALUE;
|
||||
private static final String TAG = "NotificationIconContainer";
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean DEBUG_OVERFLOW = false;
|
||||
private static final int CANNED_ANIMATION_DURATION = 100;
|
||||
private static final AnimationProperties DOT_ANIMATION_PROPERTIES = new AnimationProperties() {
|
||||
private AnimationFilter mAnimationFilter = new AnimationFilter().animateX();
|
||||
private final AnimationFilter mAnimationFilter = new AnimationFilter().animateX();
|
||||
|
||||
@Override
|
||||
public AnimationFilter getAnimationFilter() {
|
||||
@@ -75,7 +69,7 @@ public class NotificationIconContainer extends ViewGroup {
|
||||
}.setDuration(200);
|
||||
|
||||
private static final AnimationProperties ICON_ANIMATION_PROPERTIES = new AnimationProperties() {
|
||||
private AnimationFilter mAnimationFilter = new AnimationFilter()
|
||||
private final AnimationFilter mAnimationFilter = new AnimationFilter()
|
||||
.animateX()
|
||||
.animateY()
|
||||
.animateAlpha()
|
||||
@@ -92,7 +86,7 @@ public class NotificationIconContainer extends ViewGroup {
|
||||
* Temporary AnimationProperties to avoid unnecessary allocations.
|
||||
*/
|
||||
private static final AnimationProperties sTempProperties = new AnimationProperties() {
|
||||
private AnimationFilter mAnimationFilter = new AnimationFilter();
|
||||
private final AnimationFilter mAnimationFilter = new AnimationFilter();
|
||||
|
||||
@Override
|
||||
public AnimationFilter getAnimationFilter() {
|
||||
@@ -101,7 +95,7 @@ public class NotificationIconContainer extends ViewGroup {
|
||||
};
|
||||
|
||||
private static final AnimationProperties ADD_ICON_PROPERTIES = new AnimationProperties() {
|
||||
private AnimationFilter mAnimationFilter = new AnimationFilter().animateAlpha();
|
||||
private final AnimationFilter mAnimationFilter = new AnimationFilter().animateAlpha();
|
||||
|
||||
@Override
|
||||
public AnimationFilter getAnimationFilter() {
|
||||
@@ -115,7 +109,7 @@ public class NotificationIconContainer extends ViewGroup {
|
||||
*/
|
||||
private static final AnimationProperties UNISOLATION_PROPERTY_OTHERS
|
||||
= new AnimationProperties() {
|
||||
private AnimationFilter mAnimationFilter = new AnimationFilter().animateAlpha();
|
||||
private final AnimationFilter mAnimationFilter = new AnimationFilter().animateAlpha();
|
||||
|
||||
@Override
|
||||
public AnimationFilter getAnimationFilter() {
|
||||
@@ -128,7 +122,7 @@ public class NotificationIconContainer extends ViewGroup {
|
||||
* This animates the translation back to the right position.
|
||||
*/
|
||||
private static final AnimationProperties UNISOLATION_PROPERTY = new AnimationProperties() {
|
||||
private AnimationFilter mAnimationFilter = new AnimationFilter().animateX();
|
||||
private final AnimationFilter mAnimationFilter = new AnimationFilter().animateX();
|
||||
|
||||
@Override
|
||||
public AnimationFilter getAnimationFilter() {
|
||||
@@ -147,7 +141,6 @@ public class NotificationIconContainer extends ViewGroup {
|
||||
private boolean mIsStaticLayout = true;
|
||||
private final HashMap<View, IconState> mIconStates = new HashMap<>();
|
||||
private int mDotPadding;
|
||||
private int mStaticDotRadius;
|
||||
private int mStaticDotDiameter;
|
||||
private int mActualLayoutWidth = NO_VALUE;
|
||||
private float mActualPaddingEnd = NO_VALUE;
|
||||
@@ -170,7 +163,7 @@ public class NotificationIconContainer extends ViewGroup {
|
||||
private boolean mIsShowingOverflowDot;
|
||||
private StatusBarIconView mIsolatedIcon;
|
||||
private Rect mIsolatedIconLocation;
|
||||
private int[] mAbsolutePosition = new int[2];
|
||||
private final int[] mAbsolutePosition = new int[2];
|
||||
private View mIsolatedIconForAnimation;
|
||||
private int mThemedTextColorPrimary;
|
||||
|
||||
@@ -186,8 +179,8 @@ public class NotificationIconContainer extends ViewGroup {
|
||||
mMaxStaticIcons = getResources().getInteger(R.integer.max_notif_static_icons);
|
||||
|
||||
mDotPadding = getResources().getDimensionPixelSize(R.dimen.overflow_icon_dot_padding);
|
||||
mStaticDotRadius = getResources().getDimensionPixelSize(R.dimen.overflow_dot_radius);
|
||||
mStaticDotDiameter = 2 * mStaticDotRadius;
|
||||
int staticDotRadius = getResources().getDimensionPixelSize(R.dimen.overflow_dot_radius);
|
||||
mStaticDotDiameter = 2 * staticDotRadius;
|
||||
|
||||
final Context themedContext = new ContextThemeWrapper(getContext(),
|
||||
com.android.internal.R.style.Theme_DeviceDefault_DayNight);
|
||||
@@ -699,7 +692,6 @@ public class NotificationIconContainer extends ViewGroup {
|
||||
}
|
||||
|
||||
public class IconState extends ViewState {
|
||||
public static final int NO_VALUE = NotificationIconContainer.NO_VALUE;
|
||||
public float iconAppearAmount = 1.0f;
|
||||
public float clampedAppearAmount = 1.0f;
|
||||
public int visibleState;
|
||||
@@ -817,8 +809,6 @@ public class NotificationIconContainer extends ViewGroup {
|
||||
super.applyToView(view);
|
||||
}
|
||||
sTempProperties.setAnimationEndAction(null);
|
||||
boolean inShelf = iconAppearAmount == 1.0f;
|
||||
icon.setIsInShelf(inShelf);
|
||||
}
|
||||
justAdded = false;
|
||||
justReplaced = false;
|
||||
|
||||
Reference in New Issue
Block a user