Merge "Make StatusBarWindowController aware of assist session in progress." into qt-dev
This commit is contained in:
@@ -3294,6 +3294,11 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (mStatusBarWindowController.hasAssistActiveSession()) {
|
||||
// Back pressed during an assist session, cancel it.
|
||||
mAssistManager.hideAssist();
|
||||
return true;
|
||||
}
|
||||
if (mState != StatusBarState.KEYGUARD && mState != StatusBarState.SHADE_LOCKED) {
|
||||
if (mNotificationPanel.canPanelBeCollapsed()) {
|
||||
animateCollapsePanels();
|
||||
|
||||
@@ -208,7 +208,8 @@ public class StatusBarWindowController implements Callback, Dumpable, Configurat
|
||||
|| state.bubbleExpanded) {
|
||||
mLpChanged.flags &= ~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
|
||||
mLpChanged.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
|
||||
} else if (state.isKeyguardShowingAndNotOccluded() || panelFocusable) {
|
||||
} else if (state.isKeyguardShowingAndNotOccluded() || panelFocusable
|
||||
|| state.assistActiveSession) {
|
||||
mLpChanged.flags &= ~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
|
||||
mLpChanged.flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
|
||||
} else {
|
||||
@@ -501,9 +502,13 @@ public class StatusBarWindowController implements Callback, Dumpable, Configurat
|
||||
|
||||
/**
|
||||
* Sets whether assist UI is showing on the screen.
|
||||
*
|
||||
* @param assistShowing whether any assist UI is being shown.
|
||||
* @param activeSession whether AssistManager has an active assist session in progress.
|
||||
*/
|
||||
public void setAssistShowing(boolean assistShowing) {
|
||||
public void setAssistState(boolean assistShowing, boolean activeSession) {
|
||||
mCurrentState.assistShowing = assistShowing;
|
||||
mCurrentState.assistActiveSession = activeSession;
|
||||
apply(mCurrentState);
|
||||
}
|
||||
|
||||
@@ -514,6 +519,13 @@ public class StatusBarWindowController implements Callback, Dumpable, Configurat
|
||||
return mCurrentState.assistShowing;
|
||||
}
|
||||
|
||||
/**
|
||||
* The AssistManager is handling an active assist session.
|
||||
*/
|
||||
public boolean hasAssistActiveSession() {
|
||||
return mCurrentState.assistActiveSession;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets if there is a bubble being expanded on the screen.
|
||||
*/
|
||||
@@ -590,7 +602,10 @@ public class StatusBarWindowController implements Callback, Dumpable, Configurat
|
||||
boolean notTouchable;
|
||||
boolean bubblesShowing;
|
||||
boolean bubbleExpanded;
|
||||
// Assist manager is rendering any UI.
|
||||
boolean assistShowing;
|
||||
// Assist manager is handling an active assist session.
|
||||
boolean assistActiveSession;
|
||||
|
||||
/**
|
||||
* The {@link StatusBar} state from the status bar.
|
||||
|
||||
Reference in New Issue
Block a user