Merge "Fix inset drawable's intrinsic size, replace ic_text_dot asset" into lmp-mr1-dev
diff --git a/core/res/res/drawable-hdpi/ic_text_dot.png b/core/res/res/drawable-hdpi/ic_text_dot.png
deleted file mode 100644
index fa69c69..0000000
--- a/core/res/res/drawable-hdpi/ic_text_dot.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_text_dot.png b/core/res/res/drawable-ldpi/ic_text_dot.png
deleted file mode 100644
index 4aff20c..0000000
--- a/core/res/res/drawable-ldpi/ic_text_dot.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_text_dot.png b/core/res/res/drawable-mdpi/ic_text_dot.png
deleted file mode 100644
index 2225bd5..0000000
--- a/core/res/res/drawable-mdpi/ic_text_dot.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_text_dot.png b/core/res/res/drawable-xhdpi/ic_text_dot.png
deleted file mode 100644
index 869dd95..0000000
--- a/core/res/res/drawable-xhdpi/ic_text_dot.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_text_dot.png b/core/res/res/drawable-xxhdpi/ic_text_dot.png
deleted file mode 100644
index a74c286..0000000
--- a/core/res/res/drawable-xxhdpi/ic_text_dot.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable/ic_text_dot.xml b/core/res/res/drawable/ic_text_dot.xml
new file mode 100644
index 0000000..f8f3964
--- /dev/null
+++ b/core/res/res/drawable/ic_text_dot.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:inset="10dp">
+ <shape android:shape="oval">
+ <solid android:color="?android:attr/textColorSecondary" />
+ <size android:width="4dp" android:height="4dp" />
+ </shape>
+</inset>
diff --git a/graphics/java/android/graphics/drawable/InsetDrawable.java b/graphics/java/android/graphics/drawable/InsetDrawable.java
index 88c36d4..60196c0 100644
--- a/graphics/java/android/graphics/drawable/InsetDrawable.java
+++ b/graphics/java/android/graphics/drawable/InsetDrawable.java
@@ -339,12 +339,14 @@
@Override
public int getIntrinsicWidth() {
- return mInsetState.mDrawable.getIntrinsicWidth();
+ return mInsetState.mDrawable.getIntrinsicWidth()
+ + mInsetState.mInsetLeft + mInsetState.mInsetRight;
}
@Override
public int getIntrinsicHeight() {
- return mInsetState.mDrawable.getIntrinsicHeight();
+ return mInsetState.mDrawable.getIntrinsicHeight()
+ + mInsetState.mInsetTop + mInsetState.mInsetBottom;
}
@Override