(Canvas canvas)
| 345 | } |
| 346 | |
| 347 | @Override |
| 348 | protected void onDraw(Canvas canvas) { |
| 349 | if (getVisibility() != VISIBLE) { |
| 350 | return; |
| 351 | } |
| 352 | |
| 353 | int width = LayoutHelper.dp(31); |
| 354 | int thumb = LayoutHelper.dp(20); |
| 355 | int x = (getMeasuredWidth() - width) / 2; |
| 356 | float y = (getMeasuredHeight() - LayoutHelper.dpf2(14)) / 2; |
| 357 | int tx = x + LayoutHelper.dp(7) + (int) (LayoutHelper.dp(17) * progress); |
| 358 | int ty = getMeasuredHeight() / 2; |
| 359 | |
| 360 | |
| 361 | int color1; |
| 362 | int color2; |
| 363 | float colorProgress; |
| 364 | int r1; |
| 365 | int r2; |
| 366 | int g1; |
| 367 | int g2; |
| 368 | int b1; |
| 369 | int b2; |
| 370 | int a1; |
| 371 | int a2; |
| 372 | int red; |
| 373 | int green; |
| 374 | int blue; |
| 375 | int alpha; |
| 376 | int color; |
| 377 | |
| 378 | for (int a = 0; a < 2; a++) { |
| 379 | if (a == 1 && overrideColorProgress == 0) { |
| 380 | continue; |
| 381 | } |
| 382 | Canvas canvasToDraw = a == 0 ? canvas : overlayCanvas[0]; |
| 383 | |
| 384 | if (a == 1) { |
| 385 | overlayBitmap[0].eraseColor(0); |
| 386 | paint.setColor(0xff000000); |
| 387 | overlayMaskCanvas.drawRect(0, 0, overlayMaskBitmap.getWidth(), overlayMaskBitmap.getHeight(), paint); |
| 388 | overlayMaskCanvas.drawCircle(overlayCx - getX(), overlayCy - getY(), overlayRad, overlayEraserPaint); |
| 389 | } |
| 390 | if (overrideColorProgress == 1) { |
| 391 | colorProgress = a == 0 ? 0 : 1; |
| 392 | } else if (overrideColorProgress == 2) { |
| 393 | colorProgress = a == 0 ? 1 : 0; |
| 394 | } else { |
| 395 | colorProgress = progress; |
| 396 | } |
| 397 | |
| 398 | color1 = Theme.getColor(trackColorKey); |
| 399 | color2 = Theme.getColor(trackCheckedColorKey); |
| 400 | if (a == 0 && iconDrawable != null && lastIconColor != (isChecked ? color2 : color1)) { |
| 401 | iconDrawable.setColorFilter(new PorterDuffColorFilter(lastIconColor = (isChecked ? color2 : color1), PorterDuff.Mode.MULTIPLY)); |
| 402 | } |
| 403 | |
| 404 | r1 = Color.red(color1); |
nothing calls this directly
no test coverage detected