mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
Merge "Make Taskbar focusable when a popup is open."
This commit is contained in:
committed by
Android (Google) Code Review
commit
f2172eba8c
@@ -505,19 +505,30 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
return mTaskbarHeightForIme;
|
||||
}
|
||||
|
||||
/**
|
||||
* Either adds or removes {@link WindowManager.LayoutParams#FLAG_NOT_FOCUSABLE} on the taskbar
|
||||
* window.
|
||||
*/
|
||||
public void setTaskbarWindowFocusable(boolean focusable) {
|
||||
if (focusable) {
|
||||
mWindowLayoutParams.flags &= ~FLAG_NOT_FOCUSABLE;
|
||||
} else {
|
||||
mWindowLayoutParams.flags |= FLAG_NOT_FOCUSABLE;
|
||||
}
|
||||
mWindowManager.updateViewLayout(mDragLayer, mWindowLayoutParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Either adds or removes {@link WindowManager.LayoutParams#FLAG_NOT_FOCUSABLE} on the taskbar
|
||||
* window. If we're now focusable, also move nav buttons to a separate window above IME.
|
||||
*/
|
||||
public void setTaskbarWindowFocusableForIme(boolean focusable) {
|
||||
if (focusable) {
|
||||
mWindowLayoutParams.flags &= ~FLAG_NOT_FOCUSABLE;
|
||||
mControllers.navbarButtonsViewController.moveNavButtonsToNewWindow();
|
||||
} else {
|
||||
mWindowLayoutParams.flags |= FLAG_NOT_FOCUSABLE;
|
||||
mControllers.navbarButtonsViewController.moveNavButtonsBackToTaskbarWindow();
|
||||
}
|
||||
mWindowManager.updateViewLayout(mDragLayer, mWindowLayoutParams);
|
||||
setTaskbarWindowFocusable(focusable);
|
||||
}
|
||||
|
||||
/** Adds the given view to WindowManager with the provided LayoutParams (creates new window). */
|
||||
|
||||
Reference in New Issue
Block a user