Skip to content

Clean up all deprecated and unchecked methods - #317

Open
brianjcoan wants to merge 7 commits into
5calls:mainfrom
brianjcoan:deprecated_methods
Open

Clean up all deprecated and unchecked methods#317
brianjcoan wants to merge 7 commits into
5calls:mainfrom
brianjcoan:deprecated_methods

Conversation

@brianjcoan

Copy link
Copy Markdown
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization

Description

Got rid of all the deprecated and unchecked errors.
See the attached file that showed what the build originally reported, now it runs clean

Related Issues

Were the changes tested?

  • Yes, all automated tests
  • Yes, manually tested: started up the app
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests
    5Calls_deprecated.txt

Comment thread 5calls/build.gradle

@dektar dektar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's really important that this doesn't cause regressions or behavior changes, so my comments are all around verifying the state is still OK. Thanks.

refreshButton.getCompoundDrawablesRelative()[0].mutate().setColorFilter(
ContextCompat.getColor(itemView.getContext(), R.color.colorAccent),
PorterDuff.Mode.MULTIPLY);
new PorterDuffColorFilter(ContextCompat.getColor(itemView.getContext(), R.color.colorAccent),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you verify this looks the same as before?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's a screenshot from the emulator of the main page, shows the refresh, search and location buttons.
Screenshot_20260902_161855


LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
String provider = locationManager.getBestProvider(new Criteria(), false);
String provider = LocationManager.NETWORK_PROVIDER;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make sure this works the same way as it did?

builder.setChannelId(CHANNEL_ID); // O and above require Notification Channels.
}
builder.setColor(ContextCompat.getColor(context, R.color.colorPrimary));
.setSmallIcon(R.drawable.app_icon_bw)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please confirm the notification still works as it did previously. notifications have been a headache!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've worked on this code before, could you describe your testing process please?

@dektar dektar Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I basically set up a reoccurring notification (reminder) in settings to happen 1-2 minutes from now, minimize/close the app, wait for it to come in, and then look at it. There's also a FREQUENT_NOTIFICATION_DEBUG_MODE you can set in NotificationUtils.java that should make them happen more often -- although it's been a while since I tried that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look quite right. The stars should be bigger in the circle. Here's the screenshot from my device, live app:
image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect it's just the resolution of my emulator, here's what it looks like for the same emulator built from the main branch
Screenshot_20260907_221742

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you deleting icons?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint reported none of these are used, since the minimum sdk is 23.
Seems like in a story about deprecated methods, removing deprecated/unused resources would be included?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM if they are unused.

@@ -1,4 +1,4 @@
<resources xmlns:xliff="http://schemas.android.com/tools">
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" xmlns:tools="http://schemas.android.com/tools">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain why you are adding urn:oasis... here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will remove here, now in the gradle upgrade PR

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, git correctly marks this as outdated

Comment thread 5calls/app/build.gradle Outdated
testOptions {
unitTests {
includeAndroidResources = true
returnDefaultValues = true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't seem related to the change description. should it be done in a separate change?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, git correctly marks this as outdated

Comment thread 5calls/build.gradle
@brianjcoan

Copy link
Copy Markdown
Contributor Author

@dektar hey just FYI as of Thursday Sept 10 I'll be traveling for a month and won't have my laptop, so won't be responding to comments. If you want to work on any of my PRs in order to get them merged in the next month, feel free to do so. I'd be interested in continuing to contribute to this project when I'm back in October, I'll pay more attention to issues that are marked priority, if you want to review the list of issues and add/remove such labels. Thanks. ...bjc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review usages of deprecated methods

2 participants