Merge "Switch to small clock in split shade in certain edge scenarios" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a4ddddd294
@@ -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.
|
* Updates the alignment of the KeyguardStatusView and animates the transition if requested.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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.
|
// When media is visible, it overlaps with the large clock. Use small clock instead.
|
||||||
return SMALL;
|
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;
|
return LARGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user