diff options
author | Selim Cinek <cinek@google.com> | 2014-08-13 13:46:55 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-12 23:14:48 +0000 |
commit | 059a49f8345f4717f48bab21dd04a7af8f9d27ad (patch) | |
tree | bc6a61521c8e9ec0012601c78ba541f3003ab409 /packages/SystemUI/src | |
parent | 1806b1fc25bcffaa005e72a55042031a42b168b1 (diff) | |
parent | ccd14fbcfe613eae71f0e00c39f38e5125749389 (diff) | |
download | frameworks_base-059a49f8345f4717f48bab21dd04a7af8f9d27ad.zip frameworks_base-059a49f8345f4717f48bab21dd04a7af8f9d27ad.tar.gz frameworks_base-059a49f8345f4717f48bab21dd04a7af8f9d27ad.tar.bz2 |
Merge "Reset the notification expanded states on screen off" into lmp-dev
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java | 5 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 13 |
2 files changed, 17 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index a275572..43b7707 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -152,6 +152,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { logExpansionEvent(true, wasExpanded); } + public void resetUserExpansion() { + mHasUserChangedExpansion = false; + mUserExpanded = false; + } + public boolean isUserLocked() { return mUserLocked; } 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 caecf1d..634c099 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -113,7 +113,6 @@ import com.android.systemui.R; import com.android.systemui.doze.DozeService; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.qs.QSPanel; -import com.android.systemui.qs.QSTile; import com.android.systemui.statusbar.ActivatableNotificationView; import com.android.systemui.statusbar.BaseStatusBar; import com.android.systemui.statusbar.CommandQueue; @@ -2928,6 +2927,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, notifyHeadsUpScreenOn(false); finishBarAnimations(); stopNotificationLogging(); + resetUserExpandedStates(); } else if (Intent.ACTION_SCREEN_ON.equals(action)) { mScreenOn = true; @@ -2956,6 +2956,17 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } }; + private void resetUserExpandedStates() { + ArrayList<Entry> activeNotifications = mNotificationData.getActiveNotifications(); + final int notificationCount = activeNotifications.size(); + for (int i = 0; i < notificationCount; i++) { + NotificationData.Entry entry = activeNotifications.get(i); + if (entry.row != null) { + entry.row.resetUserExpansion(); + } + } + } + @Override protected void dismissKeyguardThenExecute(final OnDismissAction action) { if (mStatusBarKeyguardViewManager.isShowing()) { |