Fix API review: Camera prewarm
Let the intent receiver of a camea launch intent declare a prewarm
service instead of sending broadcasts.
Bug: 21347653
Change-Id: I11e31aad4f788ad90eb46a661b819d3e808ddb51
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 5d48190..2fe98bb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -1934,12 +1934,12 @@
}
@Override
- public void onSwipingStarted(boolean isRightwardMotion) {
- boolean start = getLayoutDirection() == LAYOUT_DIRECTION_RTL ? isRightwardMotion
- : !isRightwardMotion;
- if (!start) {
+ public void onSwipingStarted(boolean rightIcon) {
+ boolean camera = getLayoutDirection() == LAYOUT_DIRECTION_RTL ? !rightIcon
+ : rightIcon;
+ if (camera) {
mSecureCameraLaunchManager.onSwipingStarted();
- mKeyguardBottomArea.prewarmCamera();
+ mKeyguardBottomArea.bindCameraPrewarmService();
}
requestDisallowInterceptTouchEvent(true);
mOnlyAffordanceInThisMotion = true;
@@ -1948,7 +1948,7 @@
@Override
public void onSwipingAborted() {
- mKeyguardBottomArea.maybeCooldownCamera();
+ mKeyguardBottomArea.unbindCameraPrewarmService(false /* launched */);
}
@Override