diff options
author | Sam Mortimer <sam@mortimer.me.uk> | 2015-02-09 17:30:48 -0800 |
---|---|---|
committer | Clark Scheff <clark@cyngn.com> | 2016-06-01 11:02:43 -0700 |
commit | bdb7df21375e873634b127ec4a0d3cb78e9cf271 (patch) | |
tree | bb3996d9ec9290bcb59b56c6b3bb7ff9eaabff54 /packages | |
parent | ee43aa5034d92153204f55f3ac0f70af3a70844f (diff) | |
download | frameworks_base-bdb7df21375e873634b127ec4a0d3cb78e9cf271.zip frameworks_base-bdb7df21375e873634b127ec4a0d3cb78e9cf271.tar.gz frameworks_base-bdb7df21375e873634b127ec4a0d3cb78e9cf271.tar.bz2 |
Don't lookup application keyguard notification visibility unnecessarily
TICKET: CRACKLING-1127
Change-Id: I7a70f2c9d9e813c71544f2446c9bc6502f061c4f
Diffstat (limited to 'packages')
-rwxr-xr-x | packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 39b6072..26dc7ac 100755 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -1902,6 +1902,9 @@ public abstract class BaseStatusBar extends SystemUI implements } private boolean shouldShowOnKeyguard(StatusBarNotification sbn) { + if (!mShowLockscreenNotifications || mNotificationData.isAmbient(sbn.getKey())) { + return false; + } final int showOnKeyguard = mNoMan.getShowNotificationForPackageOnKeyguard( sbn.getPackageName(), sbn.getUid()); boolean isKeyguardAllowedForApp = @@ -1910,8 +1913,7 @@ public abstract class BaseStatusBar extends SystemUI implements isKeyguardAllowedForApp = (showOnKeyguard & Notification.SHOW_NO_ONGOING_NOTI_ON_KEYGUARD) == 0; } - return mShowLockscreenNotifications && !mNotificationData.isAmbient(sbn.getKey()) - && isKeyguardAllowedForApp; + return isKeyguardAllowedForApp; } protected void setZenMode(int mode) { |