summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android')
-rwxr-xr-xpackages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java54
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java11
6 files changed, 50 insertions, 29 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 0e726b5..7b608bb 100755
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -1927,8 +1927,9 @@ public abstract class BaseStatusBar extends SystemUI implements
boolean shouldInterrupt = shouldInterrupt(entry, notification);
boolean alertAgain = alertAgain(entry, n);
+ final StatusBarNotification oldNotification = entry.notification;
entry.notification = notification;
- mGroupManager.onEntryUpdated(entry, entry.notification);
+ mGroupManager.onEntryUpdated(entry, oldNotification);
boolean updateSuccessful = false;
if (applyInPlace) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index 1746693..ecaa809 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -353,10 +353,13 @@ public class SignalClusterView
for (PhoneState state : mPhoneStates) {
if (state.mMobile != null) {
+ state.maybeStopAnimatableDrawable(state.mMobile);
state.mMobile.setImageDrawable(null);
+ state.mLastMobileStrengthId = -1;
}
if (state.mMobileType != null) {
state.mMobileType.setImageDrawable(null);
+ state.mLastMobileTypeId = -1;
}
}
@@ -484,6 +487,8 @@ public class SignalClusterView
private final int mSubId;
private boolean mMobileVisible = false;
private int mMobileStrengthId = 0, mMobileTypeId = 0;
+ private int mLastMobileStrengthId = -1;
+ private int mLastMobileTypeId = -1;
private boolean mIsMobileTypeIconWide;
private String mMobileDescription, mMobileTypeDescription;
private boolean mShowRoamingIndicator;
@@ -509,25 +514,16 @@ public class SignalClusterView
public boolean apply(boolean isSecondaryIcon) {
if (mMobileVisible && !mIsAirplaneMode) {
- mMobile.setImageResource(mMobileStrengthId);
- Drawable mobileDrawable = mMobile.getDrawable();
- if (mobileDrawable instanceof Animatable) {
- Animatable ad = (Animatable) mobileDrawable;
- if (!ad.isRunning()) {
- ad.start();
- }
+ if (mLastMobileStrengthId != mMobileStrengthId) {
+ updateAnimatableIcon(mMobile, mMobileStrengthId);
+ updateAnimatableIcon(mMobileDark, mMobileStrengthId);
+ mLastMobileStrengthId = mMobileStrengthId;
}
- mMobileDark.setImageResource(mMobileStrengthId);
- Drawable mobileDarkDrawable = mMobileDark.getDrawable();
- if (mobileDarkDrawable instanceof Animatable) {
- Animatable ad = (Animatable) mobileDarkDrawable;
- if (!ad.isRunning()) {
- ad.start();
- }
+ if (mLastMobileTypeId != mMobileTypeId) {
+ mMobileType.setImageResource(mMobileTypeId);
+ mLastMobileTypeId = mMobileTypeId;
}
-
- mMobileType.setImageResource(mMobileTypeId);
mMobileGroup.setContentDescription(mMobileTypeDescription
+ " " + mMobileDescription);
mMobileGroup.setVisibility(View.VISIBLE);
@@ -552,6 +548,32 @@ public class SignalClusterView
return mMobileVisible;
}
+ private void updateAnimatableIcon(ImageView view, int resId) {
+ maybeStopAnimatableDrawable(view);
+ view.setImageResource(resId);
+ maybeStartAnimatableDrawable(view);
+ }
+
+ private void maybeStopAnimatableDrawable(ImageView view) {
+ Drawable drawable = view.getDrawable();
+ if (drawable instanceof Animatable) {
+ Animatable ad = (Animatable) drawable;
+ if (ad.isRunning()) {
+ ad.stop();
+ }
+ }
+ }
+
+ private void maybeStartAnimatableDrawable(ImageView view) {
+ Drawable drawable = view.getDrawable();
+ if (drawable instanceof Animatable) {
+ Animatable ad = (Animatable) drawable;
+ if (!ad.isRunning()) {
+ ad.start();
+ }
+ }
+ }
+
public void populateAccessibilityEvent(AccessibilityEvent event) {
if (mMobileVisible && mMobileGroup != null
&& mMobileGroup.getContentDescription() != null) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java
index 2912963..7135836 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java
@@ -173,7 +173,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
if (DEBUG_FP_WAKELOCK) {
Log.i(TAG, "fp wakelock: Authenticated, waking up...");
}
- mPowerManager.wakeUp(SystemClock.uptimeMillis());
+ mPowerManager.wakeUp(SystemClock.uptimeMillis(), "android.policy:FINGERPRINT");
}
releaseFingerprintWakeLock();
switch (mMode) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
index 5847f42..3d1212b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
@@ -457,7 +457,10 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
mReleaseOnExpandFinish = false;
} else {
for (NotificationData.Entry entry : mEntriesToRemoveAfterExpand) {
- removeHeadsUpEntry(entry);
+ if (isHeadsUp(entry.key)) {
+ // Maybe the heads-up was removed already
+ removeHeadsUpEntry(entry);
+ }
}
}
mEntriesToRemoveAfterExpand.clear();
@@ -576,6 +579,9 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
earliestRemovaltime = currentTime + mMinimumDisplayTime;
postTime = Math.max(postTime, currentTime);
removeAutoRemovalCallbacks();
+ if (mEntriesToRemoveAfterExpand.contains(entry)) {
+ mEntriesToRemoveAfterExpand.remove(entry);
+ }
if (!hasFullScreenIntent(entry)) {
long finishTime = postTime + mHeadsUpNotificationDecay;
long removeDelay = Math.max(finishTime - currentTime, mMinimumDisplayTime);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
index 435787e..b60b6c2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
@@ -476,6 +476,7 @@ public class MobileSignalController extends SignalController<
+ " dataState=" + state.getDataRegState());
}
mServiceState = state;
+ mDataNetType = state.getDataNetworkType();
updateTelephony();
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
index 2358f18..ddf623a 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
@@ -70,9 +70,7 @@ public class ZenModePanel extends LinearLayout {
private static final int SECONDS_MS = 1000;
private static final int MINUTES_MS = 60 * SECONDS_MS;
- private static final int[] MINUTE_BUCKETS = DEBUG
- ? new int[] { 0, 1, 2, 5, 15, 30, 45, 60, 120, 180, 240, 480 }
- : ZenModeConfig.MINUTE_BUCKETS;
+ private static final int[] MINUTE_BUCKETS = ZenModeConfig.MINUTE_BUCKETS;
private static final int MIN_BUCKET_MINUTES = MINUTE_BUCKETS[0];
private static final int MAX_BUCKET_MINUTES = MINUTE_BUCKETS[MINUTE_BUCKETS.length - 1];
private static final int DEFAULT_BUCKET_INDEX = Arrays.binarySearch(MINUTE_BUCKETS, 60);
@@ -608,13 +606,6 @@ public class ZenModePanel extends LinearLayout {
if (DEBUG) Log.d(mTag, "bind i=" + mZenConditions.indexOfChild(row) + " first=" + first
+ " condition=" + conditionId);
tag.rb.setEnabled(enabled);
- final boolean checked = (mSessionExitCondition != null
- || mAttachedZen != Global.ZEN_MODE_OFF)
- && (sameConditionId(mSessionExitCondition, tag.condition));
- if (checked != tag.rb.isChecked()) {
- if (DEBUG) Log.d(mTag, "bind checked=" + checked + " condition=" + conditionId);
- tag.rb.setChecked(checked);
- }
tag.rb.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {