[Cleanup] Fixing Warnings

This commit is contained in:
Prathamesh More 2021-11-27 14:06:49 +05:30
parent 1fdd537253
commit fa976b1cba
68 changed files with 242 additions and 498 deletions

View file

@ -62,7 +62,7 @@ class AppWidgetBig : BaseAppWidget() {
context,
R.drawable.ic_skip_next,
MaterialValueHelper.getPrimaryTextColor(context, false)
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -71,16 +71,16 @@ class AppWidgetBig : BaseAppWidget() {
context,
R.drawable.ic_skip_previous,
MaterialValueHelper.getPrimaryTextColor(context, false)
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
R.id.button_toggle_play_pause, BaseAppWidget.createBitmap(
R.id.button_toggle_play_pause, createBitmap(
RetroUtil.getTintedVectorDrawable(
context,
R.drawable.ic_play_arrow_white_32dp,
MaterialValueHelper.getPrimaryTextColor(context, false)
)!!, 1f
), 1f
)
)
@ -127,7 +127,7 @@ class AppWidgetBig : BaseAppWidget() {
service,
playPauseRes,
primaryColor
)!!, 1f
), 1f
)
)
@ -138,7 +138,7 @@ class AppWidgetBig : BaseAppWidget() {
service,
R.drawable.ic_skip_next,
primaryColor
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -147,7 +147,7 @@ class AppWidgetBig : BaseAppWidget() {
service,
R.drawable.ic_skip_previous,
primaryColor
)!!, 1f
), 1f
)
)
@ -156,7 +156,7 @@ class AppWidgetBig : BaseAppWidget() {
// Load the album cover async and push the update on completion
val p = RetroUtil.getScreenSize(service)
val widgetImageSize = Math.min(p.x, p.y)
val widgetImageSize = p.x.coerceAtMost(p.y)
val appContext = service.applicationContext
service.runOnUiThread {
if (target != null) {

View file

@ -60,7 +60,7 @@ class AppWidgetCard : BaseAppWidget() {
context,
R.drawable.ic_skip_next,
secondaryColor
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -69,7 +69,7 @@ class AppWidgetCard : BaseAppWidget() {
context,
R.drawable.ic_skip_previous,
secondaryColor
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -78,7 +78,7 @@ class AppWidgetCard : BaseAppWidget() {
context,
R.drawable.ic_play_arrow_white_32dp,
secondaryColor
)!!, 1f
), 1f
)
)
@ -113,7 +113,7 @@ class AppWidgetCard : BaseAppWidget() {
service,
playPauseRes,
MaterialValueHelper.getSecondaryTextColor(service, true)
)!!, 1f
), 1f
)
)
@ -124,7 +124,7 @@ class AppWidgetCard : BaseAppWidget() {
service,
R.drawable.ic_skip_next,
MaterialValueHelper.getSecondaryTextColor(service, true)
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -133,7 +133,7 @@ class AppWidgetCard : BaseAppWidget() {
service,
R.drawable.ic_skip_previous,
MaterialValueHelper.getSecondaryTextColor(service, true)
)!!, 1f
), 1f
)
)

View file

@ -61,7 +61,7 @@ class AppWidgetClassic : BaseAppWidget() {
context,
R.drawable.ic_skip_next,
MaterialValueHelper.getSecondaryTextColor(context, true)
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -71,7 +71,7 @@ class AppWidgetClassic : BaseAppWidget() {
context,
R.drawable.ic_skip_previous,
MaterialValueHelper.getSecondaryTextColor(context, true)
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -81,7 +81,7 @@ class AppWidgetClassic : BaseAppWidget() {
context,
R.drawable.ic_play_arrow_white_32dp,
MaterialValueHelper.getSecondaryTextColor(context, true)
)!!, 1f
), 1f
)
)

View file

@ -59,7 +59,7 @@ class AppWidgetSmall : BaseAppWidget() {
context,
R.drawable.ic_skip_next,
MaterialValueHelper.getSecondaryTextColor(context, true)
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -69,7 +69,7 @@ class AppWidgetSmall : BaseAppWidget() {
context,
R.drawable.ic_skip_previous,
MaterialValueHelper.getSecondaryTextColor(context, true)
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -79,7 +79,7 @@ class AppWidgetSmall : BaseAppWidget() {
context,
R.drawable.ic_play_arrow_white_32dp,
MaterialValueHelper.getSecondaryTextColor(context, true)
)!!, 1f
), 1f
)
)
@ -161,7 +161,7 @@ class AppWidgetSmall : BaseAppWidget() {
R.id.button_toggle_play_pause, createBitmap(
RetroUtil.getTintedVectorDrawable(
service, playPauseRes, color
)!!, 1f
), 1f
)
)
@ -170,14 +170,14 @@ class AppWidgetSmall : BaseAppWidget() {
R.id.button_next, createBitmap(
RetroUtil.getTintedVectorDrawable(
service, R.drawable.ic_skip_next, color
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
R.id.button_prev, createBitmap(
RetroUtil.getTintedVectorDrawable(
service, R.drawable.ic_skip_previous, color
)!!, 1f
), 1f
)
)

View file

@ -18,7 +18,6 @@ import android.app.PendingIntent
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.provider.MediaStore
import android.text.TextUtils
import android.view.View
import android.widget.RemoteViews
@ -43,7 +42,7 @@ class AppWidgetText : BaseAppWidget() {
context, R.drawable.ic_skip_next, ContextCompat.getColor(
context, R.color.md_white_1000
)
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -52,7 +51,7 @@ class AppWidgetText : BaseAppWidget() {
context, R.drawable.ic_skip_previous, ContextCompat.getColor(
context, R.color.md_white_1000
)
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -61,7 +60,7 @@ class AppWidgetText : BaseAppWidget() {
context, R.drawable.ic_play_arrow_white_32dp, ContextCompat.getColor(
context, R.color.md_white_1000
)
)!!, 1f
), 1f
)
)
@ -137,7 +136,7 @@ class AppWidgetText : BaseAppWidget() {
App.getContext(), playPauseRes, ContextCompat.getColor(
App.getContext(), R.color.md_white_1000
)
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -148,7 +147,7 @@ class AppWidgetText : BaseAppWidget() {
ContextCompat.getColor(
App.getContext(), R.color.md_white_1000
)
)!!, 1f
), 1f
)
)
appWidgetView.setImageViewBitmap(
@ -159,7 +158,7 @@ class AppWidgetText : BaseAppWidget() {
ContextCompat.getColor(
App.getContext(), R.color.md_white_1000
)
)!!, 1f
), 1f
)
)