Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up unused methods. #4043

Merged
merged 1 commit into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,30 +109,6 @@ static DisplayNotificationInfo createNotificationInfo(
manifestMetadata);
}

/**
* Legacy method that creates a DisplayNotificationInfo from NotificationParams that allows
* specifying components so the calling Context can be different from the Context used for the
* notification (resources, etc.).
*/
public static DisplayNotificationInfo createNotificationInfo(
Context context,
String pkgName,
NotificationParams params,
String channelId,
Resources appResources,
PackageManager appPackageManager,
Bundle manifestMetadata) {
return createNotificationInfo(
context,
context,
params,
channelId,
manifestMetadata,
pkgName,
appResources,
appPackageManager);
}

/**
* Creates a DisplayNotificationInfo from NotificationParams that allows specifying a calling
* Context to be used for creating PendingIntents and one Context that the notification is
Expand All @@ -147,27 +123,6 @@ public static DisplayNotificationInfo createNotificationInfo(
String pkgName = appContext.getPackageName();
Resources appResources = appContext.getResources();
PackageManager appPackageManager = appContext.getPackageManager();
return createNotificationInfo(
callingContext,
appContext,
params,
channelId,
manifestMetadata,
pkgName,
appResources,
appPackageManager);
}

public static DisplayNotificationInfo createNotificationInfo(
Context callingContext,
Context appContext,
NotificationParams params,
String channelId,
Bundle manifestMetadata,
String pkgName,
Resources appResources,
PackageManager appPackageManager) {

NotificationCompat.Builder builder = new NotificationCompat.Builder(appContext, channelId);

String title =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ private static Task<Integer> bindToMessagingService(Context context, Intent inte
WakeLockHolder.sendWakefulServiceIntent(
context, getServiceConnection(context, ServiceStarter.ACTION_MESSAGING_EVENT), intent);
} else {
getServiceConnection(context, ServiceStarter.ACTION_MESSAGING_EVENT).sendIntent(intent);
// Ignore result since we're no longer blocking on the service handling the intent.
Task<Void> unused =
getServiceConnection(context, ServiceStarter.ACTION_MESSAGING_EVENT).sendIntent(intent);
}

return Tasks.forResult(ServiceStarter.SUCCESS);
Expand Down