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.
This commit is contained in:
Adrian Roos
2017-08-04 18:14:41 +02:00
parent fee661cafe
commit 91ffdc4194
2 changed files with 27 additions and 14 deletions

View File

@@ -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);
}

View File

@@ -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);
}