Minor formatting.
Neither pmd/checkstyle/many-devs are particularly precious about hard rules of when to wrap a line. In this case we could've brought the `ErrorDialogActivity` onto the same line as `putExtra`, but instead opted to chain the method calls as per the `getAppDetailsIntent` method.
This commit is contained in:
parent
f7e12b4f25
commit
c81b2c7fe4
@ -315,6 +315,7 @@ public class AppUpdateStatusManager {
|
||||
private PendingIntent getAppDetailsIntent(Apk apk) {
|
||||
Intent notifyIntent = new Intent(context, AppDetails.class)
|
||||
.putExtra(AppDetails.EXTRA_APPID, apk.packageName);
|
||||
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(AppDetails.class)
|
||||
.addNextIntent(notifyIntent)
|
||||
@ -324,11 +325,10 @@ public class AppUpdateStatusManager {
|
||||
private PendingIntent getAppErrorIntent(AppUpdateStatus entry) {
|
||||
String title = String.format(context.getString(R.string.install_error_notify_title), entry.app.name);
|
||||
|
||||
Intent errorDialogIntent = new Intent(context, ErrorDialogActivity.class);
|
||||
errorDialogIntent.putExtra(
|
||||
ErrorDialogActivity.EXTRA_TITLE, title);
|
||||
errorDialogIntent.putExtra(
|
||||
ErrorDialogActivity.EXTRA_MESSAGE, entry.errorText);
|
||||
Intent errorDialogIntent = new Intent(context, ErrorDialogActivity.class)
|
||||
.putExtra(ErrorDialogActivity.EXTRA_TITLE, title)
|
||||
.putExtra(ErrorDialogActivity.EXTRA_MESSAGE, entry.errorText);
|
||||
|
||||
return PendingIntent.getActivity(
|
||||
context,
|
||||
0,
|
||||
|
@ -385,6 +385,7 @@ class NotificationHelper {
|
||||
text.append(", ");
|
||||
text.append(app.name);
|
||||
}
|
||||
|
||||
if (updates.size() > MAX_UPDATES_TO_SHOW) {
|
||||
int diff = updates.size() - MAX_UPDATES_TO_SHOW;
|
||||
inboxStyle.setSummaryText(context.getString(R.string.notification_summary_more, diff));
|
||||
@ -404,10 +405,12 @@ class NotificationHelper {
|
||||
.setLocalOnly(true)
|
||||
.setVisibility(NotificationCompat.VISIBILITY_SECRET)
|
||||
.setStyle(inboxStyle);
|
||||
|
||||
if (useStackedNotifications()) {
|
||||
builder.setGroup(GROUP_UPDATES)
|
||||
.setGroupSummary(true);
|
||||
}
|
||||
|
||||
Intent intentDeleted = new Intent(BROADCAST_NOTIFICATIONS_ALL_UPDATES_CLEARED);
|
||||
PendingIntent piDeleted = PendingIntent.getBroadcast(context, 0, intentDeleted, 0);
|
||||
builder.setDeleteIntent(piDeleted);
|
||||
@ -512,7 +515,9 @@ class NotificationHelper {
|
||||
} else {
|
||||
// Load it for later!
|
||||
ImageLoader.getInstance().loadImage(entry.app.iconUrl, new ImageSize(largeIconSize.x, largeIconSize.y), displayImageOptions, new ImageLoadingListener() {
|
||||
|
||||
AppUpdateStatusManager.AppUpdateStatus entry;
|
||||
|
||||
ImageLoadingListener init(AppUpdateStatusManager.AppUpdateStatus entry) {
|
||||
this.entry = entry;
|
||||
return this;
|
||||
|
Loading…
x
Reference in New Issue
Block a user