Merge "Change Pinned taskbar corners to be fixed." into main
This commit is contained in:
commit
f3e12f2b31
4 files changed
+38
-38
No files matched your search
@@ -62,7 +62,6 @@ import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.view.Display;
|
||||
import android.view.Gravity;
|
||||
import android.view.RoundedCorner;
|
||||
import android.view.Surface;
|
||||
import android.view.View;
|
||||
import android.view.WindowInsets;
|
||||
@@ -166,7 +165,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
private final TaskbarControllers mControllers;
|
||||
|
||||
private final WindowManager mWindowManager;
|
||||
private final @Nullable RoundedCorner mLeftCorner, mRightCorner;
|
||||
private DeviceProfile mDeviceProfile;
|
||||
private WindowManager.LayoutParams mWindowLayoutParams;
|
||||
private boolean mIsFullscreen;
|
||||
@@ -227,16 +225,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
Context c = getApplicationContext();
|
||||
mWindowManager = c.getSystemService(WindowManager.class);
|
||||
|
||||
boolean phoneMode = isPhoneMode();
|
||||
mLeftCorner = phoneMode
|
||||
? null
|
||||
: display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_LEFT);
|
||||
mRightCorner = phoneMode
|
||||
? null
|
||||
: display.getRoundedCorner(RoundedCorner.POSITION_BOTTOM_RIGHT);
|
||||
|
||||
// Inflate views.
|
||||
int taskbarLayout = DisplayController.isTransientTaskbar(this) && !phoneMode
|
||||
int taskbarLayout = DisplayController.isTransientTaskbar(this) && !isPhoneMode()
|
||||
? R.layout.transient_taskbar
|
||||
: R.layout.taskbar;
|
||||
mDragLayer = (TaskbarDragLayer) mLayoutInflater.inflate(taskbarLayout, null, false);
|
||||
@@ -615,12 +605,9 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
return mImeDrawsImeNavBar;
|
||||
}
|
||||
|
||||
public int getLeftCornerRadius() {
|
||||
return mLeftCorner == null ? 0 : mLeftCorner.getRadius();
|
||||
}
|
||||
|
||||
public int getRightCornerRadius() {
|
||||
return mRightCorner == null ? 0 : mRightCorner.getRadius();
|
||||
public int getCornerRadius() {
|
||||
return isPhoneMode() ? 0 : getResources().getDimensionPixelSize(
|
||||
R.dimen.persistent_taskbar_corner_radius);
|
||||
}
|
||||
|
||||
public WindowManager.LayoutParams getWindowLayoutParams() {
|
||||
@@ -1013,7 +1000,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
|
||||
|
||||
return mDeviceProfile.taskbarHeight
|
||||
+ Math.max(getLeftCornerRadius(), getRightCornerRadius())
|
||||
+ getCornerRadius()
|
||||
+ extraHeightForTaskbarTooltips;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user