Change the corner radius of ArrowPopup containers

Bug: 123985787
Change-Id: Ibcdd25d2795743225579e8ebc48a4511472f87d8
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 7822e05..7804133 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -37,8 +37,6 @@
     <dimen name="dynamic_grid_hotseat_side_padding">0dp</dimen>
 
     <!-- Hotseat/all-apps scrim -->
-    <dimen name="all_apps_scrim_radius">8dp</dimen>
-    <dimen name="all_apps_scrim_margin">8dp</dimen>
     <dimen name="all_apps_scrim_blur">4dp</dimen>
     <dimen name="vertical_drag_handle_size">24dp</dimen>
     <dimen name="vertical_drag_handle_overlap_workspace">0dp</dimen>
diff --git a/src/com/android/launcher3/popup/ArrowPopup.java b/src/com/android/launcher3/popup/ArrowPopup.java
index 0d499c1..a229207 100644
--- a/src/com/android/launcher3/popup/ArrowPopup.java
+++ b/src/com/android/launcher3/popup/ArrowPopup.java
@@ -82,7 +82,8 @@
     public ArrowPopup(Context context, AttributeSet attrs, int defStyleAttr) {
         super(context, attrs, defStyleAttr);
         mInflater = LayoutInflater.from(context);
-        mOutlineRadius = getResources().getDimension(R.dimen.bg_round_rect_radius);
+        mOutlineRadius = Themes.getDialogCornerRadius(context,
+                getResources().getDimension(R.dimen.bg_round_rect_radius));
         mLauncher = Launcher.getLauncher(context);
         mIsRtl = Utilities.isRtl(getResources());
 
diff --git a/src/com/android/launcher3/util/Themes.java b/src/com/android/launcher3/util/Themes.java
index 675e2f4..17b7e8d 100644
--- a/src/com/android/launcher3/util/Themes.java
+++ b/src/com/android/launcher3/util/Themes.java
@@ -25,11 +25,24 @@
 import android.util.SparseArray;
 import android.util.TypedValue;
 
+import com.android.launcher3.R;
+
 /**
  * Various utility methods associated with theming.
  */
 public class Themes {
 
+    public static float getDialogCornerRadius(Context context, float defaultValue) {
+        return getDimension(context, android.R.attr.dialogCornerRadius, defaultValue);
+    }
+
+    public static float getDimension(Context context, int attr, float defaultValue) {
+        TypedArray ta = context.obtainStyledAttributes(new int[]{attr});
+        float value = ta.getDimension(0, defaultValue);
+        ta.recycle();
+        return value;
+    }
+
     public static int getColorAccent(Context context) {
         return getAttrColor(context, android.R.attr.colorAccent);
     }