Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a038fb3b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Switch to small clock in split shade in certain edge scenarios" into...

Merge "Switch to small clock in split shade in certain edge scenarios" into udc-dev am: a4ddddd2 am: 68886d33 am: 04bb8f2d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23319175



Change-Id: I6fd4e541a712b6b842062d87703af224944b5704
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6f32959b 04bb8f2d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -314,6 +314,14 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
        }
    }

    /**
     * Returns true if the large clock will block the notification shelf in AOD
     */
    public boolean isLargeClockBlockingNotificationShelf() {
        ClockController clock = mKeyguardClockSwitchController.getClock();
        return clock != null && clock.getLargeClock().getConfig().getHasCustomWeatherDataDisplay();
    }

    /**
     * Updates the alignment of the KeyguardStatusView and animates the transition if requested.
     */
+6 −0
Original line number Diff line number Diff line
@@ -1570,6 +1570,12 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
            // When media is visible, it overlaps with the large clock. Use small clock instead.
            return SMALL;
        }
        // To prevent the weather clock from overlapping with the notification shelf on AOD, we use
        // the small clock here
        if (mKeyguardStatusViewController.isLargeClockBlockingNotificationShelf()
                && hasVisibleNotifications() && isOnAod()) {
            return SMALL;
        }
        return LARGE;
    }