Merge "Check if the activity translucency was converted before converted back." into cw-f-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6d7dc11e01
@@ -79,6 +79,7 @@ public class SwipeDismissLayout extends FrameLayout {
|
|||||||
private VelocityTracker mVelocityTracker;
|
private VelocityTracker mVelocityTracker;
|
||||||
private float mTranslationX;
|
private float mTranslationX;
|
||||||
private boolean mBlockGesture = false;
|
private boolean mBlockGesture = false;
|
||||||
|
private boolean mActivityTranslucencyConverted = false;
|
||||||
|
|
||||||
private final DismissAnimator mDismissAnimator = new DismissAnimator();
|
private final DismissAnimator mDismissAnimator = new DismissAnimator();
|
||||||
|
|
||||||
@@ -277,8 +278,9 @@ public class SwipeDismissLayout extends FrameLayout {
|
|||||||
protected void cancel() {
|
protected void cancel() {
|
||||||
if (!mIsWindowNativelyTranslucent) {
|
if (!mIsWindowNativelyTranslucent) {
|
||||||
Activity activity = findActivity();
|
Activity activity = findActivity();
|
||||||
if (activity != null) {
|
if (activity != null && mActivityTranslucencyConverted) {
|
||||||
activity.convertFromTranslucent();
|
activity.convertFromTranslucent();
|
||||||
|
mActivityTranslucencyConverted = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mProgressListener != null) {
|
if (mProgressListener != null) {
|
||||||
@@ -319,7 +321,7 @@ public class SwipeDismissLayout extends FrameLayout {
|
|||||||
if (!mIsWindowNativelyTranslucent) {
|
if (!mIsWindowNativelyTranslucent) {
|
||||||
Activity activity = findActivity();
|
Activity activity = findActivity();
|
||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
activity.convertToTranslucent(null, null);
|
mActivityTranslucencyConverted = activity.convertToTranslucent(null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user