aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Birg <roman@cyngn.com>2016-08-30 16:00:36 -0700
committerRoman Birg <roman@cyngn.com>2016-08-30 16:00:36 -0700
commit662cb516428ffe8483295714ad2b38f8613e482c (patch)
tree69a2737afbce3d486ef0424bc19025ca967ed12c
parent70da0ef9dcebf8425f65a7288872aff384c8a5dc (diff)
downloadvendor_cmsdk-662cb516428ffe8483295714ad2b38f8613e482c.zip
vendor_cmsdk-662cb516428ffe8483295714ad2b38f8613e482c.tar.gz
vendor_cmsdk-662cb516428ffe8483295714ad2b38f8613e482c.tar.bz2
cmsdk: fix visible check in hasChanged
Previously the visible check was comparing the newly set value to itself. Now we cache the old value, set new value, and can do a proper comparison. Change-Id: Idbe921bfe9e311551d6bfbad432c647c129f376e Signed-off-by: Roman Birg <roman@cyngn.com>
-rw-r--r--sdk/src/java/cyanogenmod/externalviews/ExternalViewProperties.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/sdk/src/java/cyanogenmod/externalviews/ExternalViewProperties.java b/sdk/src/java/cyanogenmod/externalviews/ExternalViewProperties.java
index 2b4404d..e8adddf 100644
--- a/sdk/src/java/cyanogenmod/externalviews/ExternalViewProperties.java
+++ b/sdk/src/java/cyanogenmod/externalviews/ExternalViewProperties.java
@@ -84,12 +84,12 @@ public class ExternalViewProperties {
if (mDecorView != null) {
mDecorView.getHitRect(mHitRect);
}
- boolean visible = mView.getLocalVisibleRect(mHitRect);
- mVisible = visible;
+ boolean wasVisible = mVisible;
+ mVisible = mView.getLocalVisibleRect(mHitRect);
// Check if anything actually changed
return previousX != newX || previousY != newY
|| previousWidth != mWidth || previousHeight != mHeight
- || mVisible != visible;
+ || mVisible != wasVisible;
}
}