diff options
author | Lucas Dupin <dupin@google.com> | 2021-04-13 20:59:09 -0700 |
---|---|---|
committer | Lucas Dupin <dupin@google.com> | 2021-04-24 13:08:34 -0700 |
commit | 976de38e379842c54cc1844f4fd8fde3067ebfa0 (patch) | |
tree | 90b1aceec4221cd46b18253885d45f70491c84ae /packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java | |
parent | a80a2548ca3c583c86bf7d50eada94e50fc053df (diff) |
A new shade pull down animation
Test: manual
Test: atest ScrimViewTest
Test: atest ScrimControllerTest
Bug: 185683835
Fixes: 184891403
Change-Id: I1c51f3dc0d8afe97457aea8712c4322ebbda6ae4
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java index fc80dbe021a7..588f4bb20340 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java @@ -16,6 +16,7 @@ package com.android.keyguard; +import android.graphics.Rect; import android.os.UserHandle; import android.util.Slog; @@ -48,6 +49,7 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV private final ConfigurationController mConfigurationController; private final DozeParameters mDozeParameters; private final KeyguardVisibilityHelper mKeyguardVisibilityHelper; + private final Rect mClipBounds = new Rect(); private int mLockScreenMode = KeyguardUpdateMonitor.LOCK_SCREEN_MODE_NORMAL; @@ -299,4 +301,17 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV mView.updateLogoutView(shouldShowLogout()); } }; + + /** + * Rect that specifies how KSV should be clipped, on its parent's coordinates. + */ + public void setClipBounds(Rect clipBounds) { + if (clipBounds != null) { + mClipBounds.set(clipBounds.left, (int) (clipBounds.top - mView.getY()), + clipBounds.right, (int) (clipBounds.bottom - mView.getY())); + mView.setClipBounds(mClipBounds); + } else { + mView.setClipBounds(null); + } + } } |