diff --git a/packages/SystemUI/res/drawable/ic_empty_bubble_overflow_dark.xml b/packages/SystemUI/res/drawable/ic_empty_bubble_overflow_dark.xml
new file mode 100644
index 0000000000000..8f8f1b6646924
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_empty_bubble_overflow_dark.xml
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/SystemUI/res/drawable/ic_empty_bubble_overflow_light.xml b/packages/SystemUI/res/drawable/ic_empty_bubble_overflow_light.xml
new file mode 100644
index 0000000000000..5e02f67700e7c
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_empty_bubble_overflow_light.xml
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/SystemUI/res/layout/bubble_overflow_activity.xml b/packages/SystemUI/res/layout/bubble_overflow_activity.xml
index b3c7cf74941a5..306061911f8dc 100644
--- a/packages/SystemUI/res/layout/bubble_overflow_activity.xml
+++ b/packages/SystemUI/res/layout/bubble_overflow_activity.xml
@@ -41,6 +41,13 @@
android:orientation="vertical"
android:gravity="center">
+
+
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 9074dad608ce1..5b213edd5f0ff 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -1155,6 +1155,10 @@
15dp
7dp
+
+ 200dp
+
+ 50dp
4dp
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java
index 3f985ef37746f..37841f24a3cfc 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java
@@ -21,18 +21,17 @@ import static com.android.systemui.bubbles.BubbleDebugConfig.TAG_BUBBLES;
import static com.android.systemui.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME;
import android.app.Activity;
-import android.app.Notification;
-import android.app.Person;
+import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.os.Bundle;
-import android.os.Parcelable;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -55,6 +54,7 @@ public class BubbleOverflowActivity extends Activity {
private static final String TAG = TAG_WITH_CLASS_NAME ? "BubbleOverflowActivity" : TAG_BUBBLES;
private LinearLayout mEmptyState;
+ private ImageView mEmptyStateImage;
private BubbleController mBubbleController;
private BubbleOverflowAdapter mAdapter;
private RecyclerView mRecyclerView;
@@ -73,6 +73,7 @@ public class BubbleOverflowActivity extends Activity {
mEmptyState = findViewById(R.id.bubble_overflow_empty_state);
mRecyclerView = findViewById(R.id.bubble_overflow_recycler);
+ mEmptyStateImage = findViewById(R.id.bubble_overflow_empty_state_image);
Resources res = getResources();
final int columns = res.getInteger(R.integer.bubbles_overflow_columns);
@@ -98,6 +99,31 @@ public class BubbleOverflowActivity extends Activity {
mBubbleController.setOverflowCallback(() -> {
onDataChanged(mBubbleController.getOverflowBubbles());
});
+ onThemeChanged();
+ }
+
+ /**
+ * Handle theme changes.
+ */
+ void onThemeChanged() {
+ final int mode =
+ getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
+ switch (mode) {
+ case Configuration.UI_MODE_NIGHT_NO:
+ if (DEBUG_OVERFLOW) {
+ Log.d(TAG, "Set overflow UI to light mode");
+ }
+ mEmptyStateImage.setImageDrawable(
+ getResources().getDrawable(R.drawable.ic_empty_bubble_overflow_light));
+ break;
+ case Configuration.UI_MODE_NIGHT_YES:
+ if (DEBUG_OVERFLOW) {
+ Log.d(TAG, "Set overflow UI to dark mode");
+ }
+ mEmptyStateImage.setImageDrawable(
+ getResources().getDrawable(R.drawable.ic_empty_bubble_overflow_dark));
+ break;
+ }
}
void setBackgroundColor() {
@@ -138,6 +164,7 @@ public class BubbleOverflowActivity extends Activity {
@Override
public void onResume() {
super.onResume();
+ onThemeChanged();
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
index 6a7b0da0d8d8a..eff6934364511 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
@@ -713,7 +713,7 @@ public class BubbleStackView extends FrameLayout {
} else {
mBubbleContainer.removeView(mBubbleOverflow.getBtn());
mBubbleOverflow.updateIcon(mContext, this);
- overflowBtnIndex = mBubbleContainer.getChildCount() - 1;
+ overflowBtnIndex = mBubbleContainer.getChildCount();
}
mBubbleContainer.addView(mBubbleOverflow.getBtn(), overflowBtnIndex,
new FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));