Check if the activity translucency was converted before converted back. am: 39dd370d8e
am: 898385ed59
Change-Id: I5bee496498ebcff712184f417adfdf8ee5436e7d
This commit is contained in:
@@ -79,6 +79,7 @@ public class SwipeDismissLayout extends FrameLayout {
|
||||
private VelocityTracker mVelocityTracker;
|
||||
private float mTranslationX;
|
||||
private boolean mBlockGesture = false;
|
||||
private boolean mActivityTranslucencyConverted = false;
|
||||
|
||||
private final DismissAnimator mDismissAnimator = new DismissAnimator();
|
||||
|
||||
@@ -277,8 +278,9 @@ public class SwipeDismissLayout extends FrameLayout {
|
||||
protected void cancel() {
|
||||
if (!mIsWindowNativelyTranslucent) {
|
||||
Activity activity = findActivity();
|
||||
if (activity != null) {
|
||||
if (activity != null && mActivityTranslucencyConverted) {
|
||||
activity.convertFromTranslucent();
|
||||
mActivityTranslucencyConverted = false;
|
||||
}
|
||||
}
|
||||
if (mProgressListener != null) {
|
||||
@@ -319,7 +321,7 @@ public class SwipeDismissLayout extends FrameLayout {
|
||||
if (!mIsWindowNativelyTranslucent) {
|
||||
Activity activity = findActivity();
|
||||
if (activity != null) {
|
||||
activity.convertToTranslucent(null, null);
|
||||
mActivityTranslucencyConverted = activity.convertToTranslucent(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user