summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2014-10-06 16:54:46 -0700
committerSelim Cinek <cinek@google.com>2014-10-06 16:54:46 -0700
commitface7c1795da82cf69e237c8283305f1af15fcc3 (patch)
treeff714cd1183f87f8eee7781254d8c9b4e87ee662
parent1e2e4307ff381e5cb9d8d19eb6a1aca763ba9415 (diff)
downloadframeworks_base-face7c1795da82cf69e237c8283305f1af15fcc3.zip
frameworks_base-face7c1795da82cf69e237c8283305f1af15fcc3.tar.gz
frameworks_base-face7c1795da82cf69e237c8283305f1af15fcc3.tar.bz2
Fixed a crash when the detail panel got very big
An example was when we have many casting devices or users, it was simply crashing. Also fixed a bug where the background would not be drawn anymore. Bug: 17699850 Change-Id: Ibdb8f75f53da2806dcd7dd1386ebcc345b012f47
-rw-r--r--packages/SystemUI/res/drawable/qs_background_primary.xml9
-rw-r--r--packages/SystemUI/res/values/dimens.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java3
3 files changed, 6 insertions, 9 deletions
diff --git a/packages/SystemUI/res/drawable/qs_background_primary.xml b/packages/SystemUI/res/drawable/qs_background_primary.xml
index b4e311f..e33ff1e 100644
--- a/packages/SystemUI/res/drawable/qs_background_primary.xml
+++ b/packages/SystemUI/res/drawable/qs_background_primary.xml
@@ -13,11 +13,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:top="@dimen/notification_material_rounded_rect_radius_negative" >
<solid android:color="@color/system_primary_color" />
- <corners
- android:topLeftRadius="0dp"
- android:topRightRadius="0dp"
- android:bottomLeftRadius="@dimen/notification_material_rounded_rect_radius"
- android:bottomRightRadius="@dimen/notification_material_rounded_rect_radius"/>
+ <corners android:radius="@dimen/notification_material_rounded_rect_radius"/>
</shape>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 4f41cd5..c478071 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -358,6 +358,9 @@
<!-- radius of the corners of the material rounded rect background -->
<dimen name="notification_material_rounded_rect_radius">2dp</dimen>
+ <!-- radius of the corners of the material rounded rect background but negative-->
+ <dimen name="notification_material_rounded_rect_radius_negative">-2dp</dimen>
+
<!-- end margin for multi user switch in expanded quick settings -->
<dimen name="multi_user_switch_expanded_margin">8dp</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java b/packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java
index eb4560d..111484b 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java
@@ -55,7 +55,6 @@ public class QSDetailClipper {
if (listener != null) {
mAnimator.addListener(listener);
}
- mDetail.setLayerType(View.LAYER_TYPE_HARDWARE, null);
if (in) {
mBackground.startTransition((int)(mAnimator.getDuration() * 0.6));
mAnimator.addListener(mVisibleOnStart);
@@ -82,7 +81,6 @@ public class QSDetailClipper {
}
public void onAnimationEnd(Animator animation) {
- mDetail.setLayerType(View.LAYER_TYPE_NONE, null);
mAnimator = null;
}
};
@@ -90,7 +88,6 @@ public class QSDetailClipper {
private final AnimatorListenerAdapter mGoneOnEnd = new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
- mDetail.setLayerType(View.LAYER_TYPE_NONE, null);
mDetail.setVisibility(View.GONE);
mBackground.resetTransition();
mAnimator = null;