Change Pinned taskbar corners to be fixed.
Based on new UX guidelines, the corners for the pinned taskbar should be 16 dp. Fix: 337872323 Test: Put device in 3 button mode and pinned taskbar and observe sharper, fixed corners. Transient taskbar remains unchanged. Flag: EXEMPT bugfix Change-Id: I2130e91dcdc0afb007fde93438f3fa603bc15af8
This commit is contained in:
@@ -63,7 +63,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;
|
||||
@@ -167,7 +166,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;
|
||||
@@ -228,16 +226,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);
|
||||
@@ -617,12 +607,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() {
|
||||
@@ -1015,7 +1002,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
|
||||
|
||||
return mDeviceProfile.taskbarHeight
|
||||
+ Math.max(getLeftCornerRadius(), getRightCornerRadius())
|
||||
+ getCornerRadius()
|
||||
+ extraHeightForTaskbarTooltips;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user