Remove unneeded get color method

This commit is contained in:
CactiChameleon9 2024-08-31 13:45:32 +01:00
parent c0a486383c
commit 8dcf9cc39a

View File

@ -115,7 +115,7 @@ public class TrafficService extends Service {
notBuilder.setPriority(Integer.MAX_VALUE);
notBuilder.setCategory(NotificationCompat.CATEGORY_SERVICE);
notBuilder.setLocalOnly(true);
setColor(Color.TRANSPARENT);
notBuilder.setColor(Color.TRANSPARENT);
visibilityPublic(settings.getBoolean("lockscreen", true));
Log.d("HardwareService", "Setting up the service manager and the broadcast receiver");
@ -279,16 +279,6 @@ public class TrafficService extends Service {
}
}
/**
* Helper method that sets the background color of the notification icon by parsing the RGB value
* into an int.
*
* @param color The internal int representation of the RGB color to set as the background colour
*/
public void setColor(Integer color) {
notBuilder.setColor(color);
}
/**
* Binder method to allow the settings activity to bind to the service so the notification can be
* configured and updated while the activity is being toggles.
@ -382,9 +372,6 @@ public class TrafficService extends Service {
}
private void updateIcon(int value) {
if(Build.VERSION.SDK_INT != Build.VERSION_CODES.N) {
return;
}
Bitmap bmpIcon = BitmapFactory.decodeResource(this.ctxContext.getResources(), value);
TrafficService.notBuilder.setLargeIcon(bmpIcon);
}