Skip to content

Commit

Permalink
Fix lint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
saviukd authored and saviukd committed Dec 28, 2016
1 parent 94c3296 commit 03674fc
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public void startBlurAutoUpdate() {
rootView.getViewTreeObserver().addOnPreDrawListener(drawListener);
}

private void updateBlur() {
void updateBlur() {
isMeDrawingNow = true;
blurView.invalidate();
}
Expand All @@ -150,14 +150,19 @@ public void onGlobalLayout() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
blurView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
} else {
blurView.getViewTreeObserver().removeGlobalOnLayoutListener(this);
legacyRemoveOnGlobalLayoutListener();
}

int measuredWidth = blurView.getMeasuredWidth();
int measuredHeight = blurView.getMeasuredHeight();

init(measuredWidth, measuredHeight);
}

@SuppressWarnings("deprecation")
private void legacyRemoveOnGlobalLayoutListener() {
blurView.getViewTreeObserver().removeGlobalOnLayoutListener(this);
}
});
}

Expand Down

0 comments on commit 03674fc

Please sign in to comment.