summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adrian Roos <roosa@google.com> 2017-08-04 18:14:41 +0200
committer Adrian Roos <roosa@google.com> 2017-08-04 18:25:50 +0200
commit91ffdc4194181f17e74c1faef4cb002274f04a75 (patch)
tree120461b085427236446e32c882c8bffed56cbeb9
parentfee661cafe8847a9c620d6e495a9e1fd9201dcce (diff)
AOD: Fix launching notifications from occluded AOD
Fixes an issue where launching notifications from AOD when a SHOW_WHEN_LOCKED activity was showing did not work because the bouncer got dismissed. After that was fixed and the bouncer showed, the launch transition did not work because the panel was not collapsible. Instead of waiting for the panel to collapse, just start keyguardDone directly if not collapsible. Change-Id: I8813f91c741da372c9cb559797f4dc0fe8578d8c Fixes: 63686192 Test: Disable TrustAgent if enabled, launch maps navigation, get notification, double tap on notification and/or actions. Verify Bouncer shows and unlock works.
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java37
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java4
2 files changed, 27 insertions, 14 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index 68caab1a7a8d..3d2213bf56e8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -5786,15 +5786,18 @@ public class StatusBar extends SystemUI implements DemoMode,
boolean handled = superOnClickHandler(view, pendingIntent, fillInIntent);
// close the shade if it was open
- if (handled) {
+ if (handled && !mNotificationPanel.isFullyCollapsed()) {
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL,
true /* force */);
visibilityChanged(false);
mAssistManager.hideAssist();
+
+ // Wait for activity start.
+ return true;
+ } else {
+ return false;
}
- // Wait for activity start.
- return handled;
}
}, afterKeyguardGone);
return true;
@@ -6844,12 +6847,16 @@ public class StatusBar extends SystemUI implements DemoMode,
}
}.start();
- // close the shade if it was open
- animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL,
- true /* force */, true /* delayed */);
- visibilityChanged(false);
+ if (!mNotificationPanel.isFullyCollapsed()) {
+ // close the shade if it was open
+ animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL,
+ true /* force */, true /* delayed */);
+ visibilityChanged(false);
- return true;
+ return true;
+ } else {
+ return false;
+ }
}
}, afterKeyguardGone);
}
@@ -7001,12 +7008,16 @@ public class StatusBar extends SystemUI implements DemoMode,
new Thread(runnable).start();
}
- // close the shade if it was open
- animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL,
- true /* force */, true /* delayed */);
- visibilityChanged(false);
+ if (!mNotificationPanel.isFullyCollapsed()) {
+ // close the shade if it was open
+ animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL,
+ true /* force */, true /* delayed */);
+ visibilityChanged(false);
- return true;
+ return true;
+ } else {
+ return false;
+ }
}
}, afterKeyguardGone);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index 5baa7ff4a633..ff01eb756b9d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -226,7 +226,9 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
if (mOccluded) {
mStatusBar.hideKeyguard();
mStatusBar.stopWaitingForKeyguardExit();
- hideBouncer(false /* destroyView */);
+ if (hideBouncerWhenShowing || mBouncer.needsFullscreenBouncer()) {
+ hideBouncer(false /* destroyView */);
+ }
} else {
showBouncerOrKeyguard(hideBouncerWhenShowing);
}