summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2012-04-10 14:23:10 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-10 14:23:10 -0700
commit592647ee2e2eb64904a3a9c30e8f20b1f08c4ba0 (patch)
treee54c5afcf9f20b75d84aef690424ffae02e877ab
parent1bee28f4c8a429bba1d82fe778aadbe29b80ba61 (diff)
parent93a035cce1a3a3c70cd6f0e0a5f98ac0e4138337 (diff)
downloadframeworks_base-592647ee2e2eb64904a3a9c30e8f20b1f08c4ba0.zip
frameworks_base-592647ee2e2eb64904a3a9c30e8f20b1f08c4ba0.tar.gz
frameworks_base-592647ee2e2eb64904a3a9c30e8f20b1f08c4ba0.tar.bz2
Merge "Fix IndexOutOfBoundsException."
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 804ae06..3f611fc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -2047,7 +2047,10 @@ public class PhoneStatusBar extends BaseStatusBar {
snapshot.add(child);
}
}
- final int N = snapshot.size();
+ if (snapshot.isEmpty()) {
+ animateCollapse(false);
+ return;
+ }
new Thread(new Runnable() {
@Override
public void run() {
@@ -2063,6 +2066,7 @@ public class PhoneStatusBar extends BaseStatusBar {
mPile.setViewRemoval(false);
mPostCollapseCleanup = new Runnable() {
+ @Override
public void run() {
try {
mPile.setViewRemoval(true);
@@ -2073,9 +2077,8 @@ public class PhoneStatusBar extends BaseStatusBar {
View sampleView = snapshot.get(0);
int width = sampleView.getWidth();
- final int velocity = (int)(width * 8); // 1000/8 = 125 ms duration
- for (View v : snapshot) {
- final View _v = v;
+ final int velocity = width * 8; // 1000/8 = 125 ms duration
+ for (final View _v : snapshot) {
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
@@ -2091,6 +2094,7 @@ public class PhoneStatusBar extends BaseStatusBar {
// synchronize the end of those animations with the start of the collaps
// exactly.
mHandler.postDelayed(new Runnable() {
+ @Override
public void run() {
animateCollapse(false);
}