summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java26
2 files changed, 11 insertions, 17 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 6176cff82f6f..8ebf57415b23 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -3562,7 +3562,7 @@ public class NotificationPanelView extends PanelView implements
private void updateShowEmptyShadeView() {
boolean showEmptyShadeView =
- mBarState != StatusBarState.KEYGUARD && mEntryManager.hasActiveNotifications();
+ mBarState != StatusBarState.KEYGUARD && !mEntryManager.hasActiveNotifications();
showEmptyShadeView(showEmptyShadeView);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java
index 1cf43cc310ba..b340813b42f8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java
@@ -40,6 +40,7 @@ import android.text.TextUtils;
import android.util.EventLog;
import android.util.Log;
import android.view.RemoteAnimationAdapter;
+import android.view.View;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.statusbar.IStatusBarService;
@@ -75,7 +76,7 @@ import com.android.systemui.statusbar.policy.KeyguardStateController;
*/
public class StatusBarNotificationActivityStarter implements NotificationActivityStarter {
- private static final String TAG = "NotificationClickHandler";
+ private static final String TAG = "NotifActivityStarter";
protected static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
private final AssistManager mAssistManager;
@@ -197,8 +198,6 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit
return;
}
- final String notificationKey = sbn.getKey();
-
boolean isActivityIntent = intent != null && intent.isActivity() && !isBubble;
final boolean afterKeyguardGone = isActivityIntent
&& mActivityIntentHelper.wouldLaunchResolverActivity(intent.getIntent(),
@@ -209,7 +208,7 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit
mLockscreenUserManager.getCurrentUserId());
ActivityStarter.OnDismissAction postKeyguardAction =
() -> handleNotificationClickAfterKeyguardDismissed(
- sbn, row, controller, intent, notificationKey,
+ sbn, row, controller, intent,
isActivityIntent, wasOccluded, showOverLockscreen);
if (showOverLockscreen) {
mIsCollapsingToShowActivityOverLockscreen = true;
@@ -225,12 +224,11 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit
ExpandableNotificationRow row,
RemoteInputController controller,
PendingIntent intent,
- String notificationKey,
boolean isActivityIntent,
boolean wasOccluded,
boolean showOverLockscreen) {
// TODO: Some of this code may be able to move to NotificationEntryManager.
- if (mHeadsUpManager != null && mHeadsUpManager.isAlerting(notificationKey)) {
+ if (mHeadsUpManager != null && mHeadsUpManager.isAlerting(sbn.getKey())) {
// Release the HUN notification to the shade.
if (mPresenter.isPresenterFullyCollapsed()) {
@@ -252,7 +250,7 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit
}
final StatusBarNotification parentToCancelFinal = parentToCancel;
final Runnable runnable = () -> handleNotificationClickAfterPanelCollapsed(
- sbn, row, controller, intent, notificationKey,
+ sbn, row, controller, intent,
isActivityIntent, wasOccluded, parentToCancelFinal);
if (showOverLockscreen) {
@@ -273,10 +271,10 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit
ExpandableNotificationRow row,
RemoteInputController controller,
PendingIntent intent,
- String notificationKey,
boolean isActivityIntent,
boolean wasOccluded,
StatusBarNotification parentToCancelFinal) {
+ String notificationKey = sbn.getKey();
try {
// The intent we are sending is for the application, which
// won't have permission to immediately start an activity after
@@ -310,7 +308,7 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit
if (!TextUtils.isEmpty(entry.remoteInputText)) {
remoteInputText = entry.remoteInputText;
}
- if (!TextUtils.isEmpty(remoteInputText) && !controller.isSpinning(entry.getKey())) {
+ if (!TextUtils.isEmpty(remoteInputText) && !controller.isSpinning(notificationKey)) {
fillInIntent = new Intent().putExtra(Notification.EXTRA_REMOTE_INPUT_DRAFT,
remoteInputText.toString());
}
@@ -326,14 +324,10 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit
collapseOnMainThread();
}
- //TODO(b/144306683): prove that this `activeEntry` is the same as `entry` above and simplify
- // this call stack
- NotificationEntry activeEntry =
- mEntryManager.getActiveNotificationUnfiltered(notificationKey);
final int count = mEntryManager.getActiveNotificationsCount();
- final int rank = activeEntry != null ? activeEntry.getRanking().getRank() : 0;
+ final int rank = entry.getRanking().getRank();
NotificationVisibility.NotificationLocation location =
- NotificationLogger.getNotificationLocation(activeEntry);
+ NotificationLogger.getNotificationLocation(entry);
final NotificationVisibility nv = NotificationVisibility.obtain(notificationKey,
rank, count, true, location);
try {
@@ -365,7 +359,7 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit
}
private void startNotificationIntent(PendingIntent intent, Intent fillInIntent,
- ExpandableNotificationRow row, boolean wasOccluded, boolean isActivityIntent) {
+ View row, boolean wasOccluded, boolean isActivityIntent) {
RemoteAnimationAdapter adapter = mActivityLaunchAnimator.getLaunchAnimation(row,
wasOccluded);
try {