Skip to content

Commit 9cd4ae1

Browse files
committed
feat: remove unnecessary captcha image overlay
1 parent dd29c3a commit 9cd4ae1

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

app/src/main/java/tk/therealsuji/vtopchennai/helpers/VTOPHelper.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ public void onRequestCaptcha(int captchaType, Bitmap bitmap, WebView webView) {
9696
if (background instanceof MaterialShapeDrawable && ((MaterialShapeDrawable) background).getFillColor() != null) {
9797
// Getting the color and elevation of the dialog background
9898
int backgroundColor = Objects.requireNonNull(((MaterialShapeDrawable) background).getFillColor()).getDefaultColor();
99-
float backgroundElevation = ((MaterialShapeDrawable) background).getElevation();
10099
float[] colorMatrix = {
101100
0, 0, 0, 0, 255, // red
102101
0, 0, 0, 0, 255, // green
@@ -120,14 +119,8 @@ public void onRequestCaptcha(int captchaType, Bitmap bitmap, WebView webView) {
120119
colorMatrix[14] = 0;
121120
}
122121

123-
// Setting the alpha value for the captcha overlay
124-
int elevationOverlayColor = MaterialColors.getColor(context, R.attr.elevationOverlayColor, 0);
125-
ColorDrawable overlay = new ColorDrawable(elevationOverlayColor);
126-
overlay.setAlpha(new ElevationOverlayProvider(context).calculateOverlayAlpha(backgroundElevation));
127-
128122
// Updating the captcha image colors and adding the overlay
129123
captchaImage.setColorFilter(new ColorMatrixColorFilter(colorMatrix));
130-
captchaImage.setForeground(overlay);
131124
}
132125
}
133126

0 commit comments

Comments
 (0)