Remove unused flags from bubble controller

- ENABLE_BUBBLES_AT_TOP (default false)
- ENABLE_BUBBLE_FOOTER (default false)

Test: manual
Bug: 129546118
Change-Id: I6aaa33975d65fb20ba9b82a378e00c2100fd3164
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index a5aed87..56b231b 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -109,11 +109,6 @@
     /** Use an activityView for an auto-bubbled notifs if it has an appropriate content intent */
     private static final String ENABLE_BUBBLE_CONTENT_INTENT = "experiment_bubble_content_intent";
 
-    /** Whether the row of bubble circles are anchored to the top or bottom of the screen. */
-    private static final String ENABLE_BUBBLES_AT_TOP = "experiment_enable_top_bubbles";
-    /** Flag to position the header below the activity view */
-    private static final String ENABLE_BUBBLE_FOOTER = "experiment_enable_bubble_footer";
-
     private static final String BUBBLE_STIFFNESS = "experiment_bubble_stiffness";
     private static final String BUBBLE_BOUNCINESS = "experiment_bubble_bounciness";
 
@@ -607,22 +602,6 @@
                 ENABLE_BUBBLES, 1) != 0;
     }
 
-    /**
-     * Whether bubbles should be positioned at the top of the screen or not.
-     */
-    public static boolean showBubblesAtTop(Context context) {
-        return Settings.Secure.getInt(context.getContentResolver(),
-                ENABLE_BUBBLES_AT_TOP, 0) != 0;
-    }
-
-    /**
-     * Whether the bubble chrome should display as a footer or not (in which case it's a header).
-     */
-    public static boolean useFooter(Context context) {
-        return Settings.Secure.getInt(context.getContentResolver(),
-                ENABLE_BUBBLE_FOOTER, 0) != 0;
-    }
-
     /** Default stiffness to use for bubble physics animations. */
     public static int getBubbleStiffness(Context context, int defaultStiffness) {
         return Settings.Secure.getInt(
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java
index 6c2db76e..e8b1122 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java
@@ -74,10 +74,6 @@
 public class BubbleExpandedView extends LinearLayout implements View.OnClickListener {
     private static final String TAG = "BubbleExpandedView";
 
-    // Configurable via bubble settings; just for testing
-    private boolean mUseFooter;
-    private boolean mShowOnTop;
-
     // The triangle pointing to the expanded view
     private View mPointerView;
     private int mPointerMargin;
@@ -185,11 +181,8 @@
         int bgColor = ta.getColor(0, Color.WHITE);
         ta.recycle();
 
-        mShowOnTop = BubbleController.showBubblesAtTop(getContext());
-        mUseFooter = BubbleController.useFooter(getContext());
-
         ShapeDrawable triangleDrawable = new ShapeDrawable(
-                TriangleShape.create(width, height, mShowOnTop /* pointUp */));
+                TriangleShape.create(width, height, false /* pointUp */));
         triangleDrawable.setTint(bgColor);
         mPointerView.setBackground(triangleDrawable);
 
@@ -238,18 +231,6 @@
             }
             return view.onApplyWindowInsets(insets);
         });
-
-        if (!mShowOnTop) {
-            removeView(mPointerView);
-            if (mUseFooter) {
-                View divider = findViewById(R.id.divider);
-                viewWrapper.removeView(divider);
-                removeView(viewWrapper);
-                addView(divider);
-                addView(viewWrapper);
-            }
-            addView(mPointerView);
-        }
     }
 
     @Override
@@ -289,9 +270,7 @@
         final float cr = ta2.getDimension(0, 0f);
         ta2.recycle();
 
-        float[] radii = mUseFooter
-                ? new float[] {0, 0, 0, 0, cr, cr, cr, cr}
-                : new float[] {cr, cr, cr, cr, 0, 0, 0, 0};
+        float[] radii = new float[] {cr, cr, cr, cr, 0, 0, 0, 0};
         GradientDrawable chromeBackground = new GradientDrawable();
         chromeBackground.setShape(GradientDrawable.RECTANGLE);
         chromeBackground.setCornerRadii(radii);
@@ -353,11 +332,7 @@
                 // Still in the shade... remove it
                 parent.removeView(mNotifRow);
             }
-            if (mShowOnTop) {
-                addView(mNotifRow);
-            } else {
-                addView(mNotifRow, mUseFooter ? 0 : 1);
-            }
+            addView(mNotifRow, 1 /* index */);
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
index de4605b..0c933af 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
@@ -809,28 +809,16 @@
      * y position when the bubbles are expanded as well as the bounds of the dismiss target.
      */
     int getMaxExpandedHeight() {
-        boolean showOnTop = BubbleController.showBubblesAtTop(getContext());
         int expandedY = (int) mExpandedAnimationController.getExpandedY();
-        if (showOnTop) {
-            // PIP dismiss view uses FLAG_LAYOUT_IN_SCREEN so we need to subtract the bottom inset
-            int pipDismissHeight = mPipDismissHeight - getBottomInset();
-            return mDisplaySize.y - expandedY - mBubbleSize - pipDismissHeight;
-        } else {
-            return expandedY - getStatusBarHeight();
-        }
+        return expandedY - getStatusBarHeight();
     }
 
     /**
      * Calculates the y position of the expanded view when it is expanded.
      */
     float getYPositionForExpandedView() {
-        boolean showOnTop = BubbleController.showBubblesAtTop(getContext());
-        if (showOnTop) {
-            return getStatusBarHeight() + mBubbleSize + mBubblePadding;
-        } else {
-            return mExpandedAnimationController.getExpandedY()
-                    - mExpandedBubble.expandedView.getExpandedSize() - mBubblePadding;
-        }
+        return mExpandedAnimationController.getExpandedY()
+                - mExpandedBubble.expandedView.getExpandedSize() - mBubblePadding;
     }
 
     /**
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java b/packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java
index d601e63..95fbfe3 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java
@@ -26,7 +26,6 @@
 import androidx.dynamicanimation.animation.SpringForce;
 
 import com.android.systemui.R;
-import com.android.systemui.bubbles.BubbleController;
 
 import com.google.android.collect.Sets;
 
@@ -222,23 +221,14 @@
         if (mLayout == null || mLayout.getRootWindowInsets() == null) {
             return 0;
         }
-        final boolean showOnTop = BubbleController.showBubblesAtTop(mLayout.getContext());
         final WindowInsets insets = mLayout.getRootWindowInsets();
-        if (showOnTop) {
-            return mBubblePaddingPx + Math.max(
-                    mStatusBarHeight,
-                    insets.getDisplayCutout() != null
-                            ? insets.getDisplayCutout().getSafeInsetTop()
-                            : 0);
-        } else {
-            int keyboardHeight = insets.getSystemWindowInsetBottom()
-                    - insets.getStableInsetBottom();
-            float bottomInset = keyboardHeight > 0
-                    ? keyboardHeight
-                    : (mPipDismissHeight - insets.getStableInsetBottom());
-            // Stable insets are excluded from display size, so we must subtract it
-            return mDisplaySize.y - mBubbleSizePx - mBubblePaddingPx - bottomInset;
-        }
+        int keyboardHeight = insets.getSystemWindowInsetBottom()
+                - insets.getStableInsetBottom();
+        float bottomInset = keyboardHeight > 0
+                ? keyboardHeight
+                : (mPipDismissHeight - insets.getStableInsetBottom());
+        // Stable insets are excluded from display size, so we must subtract it
+        return mDisplaySize.y - mBubbleSizePx - mBubblePaddingPx - bottomInset;
     }
 
     @Override