mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Revert "Draw rounded corners above the taskbar"
This reverts commit 157d3b950d.
Reason for revert: b/197129604
Bug: 197129604
Change-Id: Idf2267528fade23291aedea9787d98601495537c
This commit is contained in:
@@ -36,7 +36,6 @@ import android.view.ContextThemeWrapper;
|
||||
import android.view.Display;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.RoundedCorner;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.FrameLayout;
|
||||
@@ -84,7 +83,6 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
private final TaskbarControllers mControllers;
|
||||
|
||||
private final WindowManager mWindowManager;
|
||||
private final RoundedCorner mLeftCorner, mRightCorner;
|
||||
private WindowManager.LayoutParams mWindowLayoutParams;
|
||||
private boolean mIsFullscreen;
|
||||
// The size we should return to when we call setTaskbarWindowFullscreen(false)
|
||||
@@ -138,12 +136,10 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
? windowContext.getApplicationContext()
|
||||
: windowContext.getApplicationContext().createDisplayContext(display);
|
||||
mWindowManager = c.getSystemService(WindowManager.class);
|
||||
mLeftCorner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_LEFT);
|
||||
mRightCorner = display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_RIGHT);
|
||||
}
|
||||
|
||||
public void init() {
|
||||
mLastRequestedNonFullscreenHeight = getDefaultTaskbarWindowHeight();
|
||||
mLastRequestedNonFullscreenHeight = mDeviceProfile.taskbarSize;
|
||||
mWindowLayoutParams = new WindowManager.LayoutParams(
|
||||
MATCH_PARENT,
|
||||
mLastRequestedNonFullscreenHeight,
|
||||
@@ -173,14 +169,6 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
return mNavMode == Mode.THREE_BUTTONS;
|
||||
}
|
||||
|
||||
public RoundedCorner getLeftCorner() {
|
||||
return mLeftCorner;
|
||||
}
|
||||
|
||||
public RoundedCorner getRightCorner() {
|
||||
return mRightCorner;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LayoutInflater getLayoutInflater() {
|
||||
return mLayoutInflater;
|
||||
@@ -262,12 +250,8 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
setTaskbarWindowHeight(fullscreen ? MATCH_PARENT : mLastRequestedNonFullscreenHeight);
|
||||
}
|
||||
|
||||
public boolean isTaskbarWindowFullscreen() {
|
||||
return mIsFullscreen;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the TaskbarContainer height (pass {@link #getDefaultTaskbarWindowHeight()} to reset).
|
||||
* Updates the TaskbarContainer height (pass deviceProfile.taskbarSize to reset).
|
||||
*/
|
||||
public void setTaskbarWindowHeight(int height) {
|
||||
if (mWindowLayoutParams.height == height || mIsDestroyed) {
|
||||
@@ -287,14 +271,6 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
mWindowManager.updateViewLayout(mDragLayer, mWindowLayoutParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default height of the window, including the static corner radii above taskbar.
|
||||
*/
|
||||
public int getDefaultTaskbarWindowHeight() {
|
||||
return mDeviceProfile.taskbarSize
|
||||
+ Math.max(mLeftCorner.getRadius(), mRightCorner.getRadius());
|
||||
}
|
||||
|
||||
protected void onTaskbarIconClicked(View view) {
|
||||
Object tag = view.getTag();
|
||||
if (tag instanceof Task) {
|
||||
|
||||
Reference in New Issue
Block a user