summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java15
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);
+ }
+ }
}