Merge "Don't report INSETS_ROUNDED_CORNER on phones" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
243e95fd5f
@@ -598,6 +598,11 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
return isPhoneMode() && !isThreeButtonNav();
|
||||
}
|
||||
|
||||
/** Returns whether Taskbar draws its own background, vs being translucent for apps to draw. */
|
||||
public boolean drawsTaskbarBackground() {
|
||||
return !isPhoneMode();
|
||||
}
|
||||
|
||||
/** Returns {@code true} iff a tiny version of taskbar is shown on phone. */
|
||||
public boolean isTinyTaskbar() {
|
||||
return enableTinyTaskbar() && mDeviceProfile.isPhone && mDeviceProfile.isTaskbarPresent;
|
||||
|
||||
@@ -215,7 +215,7 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa
|
||||
}
|
||||
|
||||
private void updateBackgroundAlpha() {
|
||||
if (mActivity.isPhoneMode() || mActivity.isDestroyed()) {
|
||||
if (!mActivity.drawsTaskbarBackground() || mActivity.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,9 +109,9 @@ class TaskbarInsetsController(val context: TaskbarActivityContext) : LoggableTas
|
||||
val taskbarStashController = controllers.taskbarStashController
|
||||
val tappableHeight = taskbarStashController.tappableHeightToReportToApps
|
||||
// We only report tappableElement height for unstashed, persistent taskbar,
|
||||
// which is also when we draw the rounded corners above taskbar.
|
||||
// which is also when we draw the rounded corners above taskbar on tablets.
|
||||
val insetsRoundedCornerFlag =
|
||||
if (tappableHeight > 0) {
|
||||
if (tappableHeight > 0 && context.drawsTaskbarBackground()) {
|
||||
FLAG_INSETS_ROUNDED_CORNER
|
||||
} else {
|
||||
0
|
||||
|
||||
Reference in New Issue
Block a user