mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
Notify system to report the rounded corners that task bar draws
Task bar draws fake rouned corner above itself and it should notify system to report that fake ones to apps. Bug: 196387239 Test: make Change-Id: I1d9732de71fbe653ed56e468e211b1bfb4dd2b37
This commit is contained in:
@@ -212,6 +212,8 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
mWindowLayoutParams.providedInternalImeInsets = Insets.of(0,
|
||||
getDefaultTaskbarWindowHeight() - mTaskbarHeightForIme, 0, 0);
|
||||
|
||||
mWindowLayoutParams.insetsRoundedCornerFrame = true;
|
||||
|
||||
// Initialize controllers after all are constructed.
|
||||
mControllers.init(sharedState);
|
||||
updateSysuiStateFlags(sharedState.sysuiStateFlags, true /* fromInit */);
|
||||
@@ -445,6 +447,18 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
return mIsFullscreen;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify system to inset the rounded corner frame based on the task bar insets.
|
||||
*/
|
||||
public void updateInsetRoundedCornerFrame(boolean shouldInsetsRoundedCorner) {
|
||||
if (!mDragLayer.isAttachedToWindow()
|
||||
|| mWindowLayoutParams.insetsRoundedCornerFrame == shouldInsetsRoundedCorner) {
|
||||
return;
|
||||
}
|
||||
mWindowLayoutParams.insetsRoundedCornerFrame = shouldInsetsRoundedCorner;
|
||||
mWindowManager.updateViewLayout(mDragLayer, mWindowLayoutParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the TaskbarContainer height (pass {@link #getDefaultTaskbarWindowHeight()} to reset).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user