Merge "ktlint fixes" into qt-qpr1-dev

This commit is contained in:
Daniel Sandler
2019-08-15 15:21:54 +00:00
committed by Android (Google) Code Review

View File

@@ -41,7 +41,6 @@ import com.android.systemui.statusbar.notification.stack.NotificationStackScroll
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone import com.android.systemui.statusbar.phone.HeadsUpManagerPhone
import com.android.systemui.statusbar.phone.KeyguardBypassController import com.android.systemui.statusbar.phone.KeyguardBypassController
import com.android.systemui.statusbar.phone.ShadeController import com.android.systemui.statusbar.phone.ShadeController
import com.android.systemui.statusbar.policy.HeadsUpManager
import javax.inject.Inject import javax.inject.Inject
import javax.inject.Singleton import javax.inject.Singleton
@@ -52,11 +51,13 @@ import kotlin.math.max
*/ */
@Singleton @Singleton
class PulseExpansionHandler @Inject class PulseExpansionHandler @Inject
constructor(context: Context, constructor(
private val wakeUpCoordinator: NotificationWakeUpCoordinator, context: Context,
private val bypassController: KeyguardBypassController, private val wakeUpCoordinator: NotificationWakeUpCoordinator,
private val headsUpManager: HeadsUpManagerPhone, private val bypassController: KeyguardBypassController,
private val roundnessManager: NotificationRoundnessManager) : Gefingerpoken { private val headsUpManager: HeadsUpManagerPhone,
private val roundnessManager: NotificationRoundnessManager
) : Gefingerpoken {
companion object { companion object {
private val RUBBERBAND_FACTOR_STATIC = 0.25f private val RUBBERBAND_FACTOR_STATIC = 0.25f
private val SPRING_BACK_ANIMATION_LENGTH_MS = 375 private val SPRING_BACK_ANIMATION_LENGTH_MS = 375
@@ -124,8 +125,8 @@ constructor(context: Context,
} }
private fun maybeStartExpansion(event: MotionEvent): Boolean { private fun maybeStartExpansion(event: MotionEvent): Boolean {
if (!wakeUpCoordinator.canShowPulsingHuns || qsExpanded if (!wakeUpCoordinator.canShowPulsingHuns || qsExpanded ||
|| bouncerShowing) { bouncerShowing) {
return false return false
} }
if (velocityTracker == null) { if (velocityTracker == null) {
@@ -160,18 +161,18 @@ constructor(context: Context,
} }
MotionEvent.ACTION_UP -> { MotionEvent.ACTION_UP -> {
recycleVelocityTracker(); recycleVelocityTracker()
} }
MotionEvent.ACTION_CANCEL -> { MotionEvent.ACTION_CANCEL -> {
recycleVelocityTracker(); recycleVelocityTracker()
} }
} }
return false return false
} }
private fun recycleVelocityTracker() { private fun recycleVelocityTracker() {
velocityTracker?.recycle(); velocityTracker?.recycle()
velocityTracker = null velocityTracker = null
} }
@@ -216,7 +217,7 @@ constructor(context: Context,
"com.android.systemui:PULSEDRAG") "com.android.systemui:PULSEDRAG")
} }
shadeController.goToLockedShade(mStartingChild) shadeController.goToLockedShade(mStartingChild)
leavingLockscreen = true; leavingLockscreen = true
isExpanding = false isExpanding = false
if (mStartingChild is ExpandableNotificationRow) { if (mStartingChild is ExpandableNotificationRow) {
val row = mStartingChild as ExpandableNotificationRow? val row = mStartingChild as ExpandableNotificationRow?
@@ -227,7 +228,7 @@ constructor(context: Context,
private fun updateExpansionHeight(height: Float) { private fun updateExpansionHeight(height: Float) {
var expansionHeight = max(height, 0.0f) var expansionHeight = max(height, 0.0f)
if (!mReachedWakeUpHeight && height > mWakeUpHeight) { if (!mReachedWakeUpHeight && height > mWakeUpHeight) {
mReachedWakeUpHeight = true; mReachedWakeUpHeight = true
} }
if (mStartingChild != null) { if (mStartingChild != null) {
val child = mStartingChild!! val child = mStartingChild!!
@@ -317,9 +318,11 @@ constructor(context: Context,
} else null } else null
} }
fun setUp(stackScroller: NotificationStackScrollLayout, fun setUp(
expansionCallback: ExpansionCallback, stackScroller: NotificationStackScrollLayout,
shadeController: ShadeController) { expansionCallback: ExpansionCallback,
shadeController: ShadeController
) {
this.expansionCallback = expansionCallback this.expansionCallback = expansionCallback
this.shadeController = shadeController this.shadeController = shadeController
this.stackScroller = stackScroller this.stackScroller = stackScroller