MediaHierarchyManager: prevent crash when previousLocation is -1
This can happen when expanding split shade on lock screen with no media. Because we are expanding on lock screen in split shade, the transformation type is TRANSITION. Bug: 221193561 Test: Manually Change-Id: Ide21f54d80113e646729cd40c42ed1039d6a0413
This commit is contained in:
@@ -785,7 +785,11 @@ class MediaHierarchyManager @Inject constructor(
|
||||
* @return true if this transformation is guided by an external progress like a finger
|
||||
*/
|
||||
private fun isCurrentlyInGuidedTransformation(): Boolean {
|
||||
return getTransformationProgress() >= 0
|
||||
return hasValidStartAndEndLocations() && getTransformationProgress() >= 0
|
||||
}
|
||||
|
||||
private fun hasValidStartAndEndLocations(): Boolean {
|
||||
return previousLocation != -1 && desiredLocation != -1
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user