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) {
|
private PendingIntent getAppDetailsIntent(Apk apk) {
|
||||||
Intent notifyIntent = new Intent(context, AppDetails.class)
|
Intent notifyIntent = new Intent(context, AppDetails.class)
|
||||||
.putExtra(AppDetails.EXTRA_APPID, apk.packageName);
|
.putExtra(AppDetails.EXTRA_APPID, apk.packageName);
|
||||||
|
|
||||||
return TaskStackBuilder.create(context)
|
return TaskStackBuilder.create(context)
|
||||||
.addParentStack(AppDetails.class)
|
.addParentStack(AppDetails.class)
|
||||||
.addNextIntent(notifyIntent)
|
.addNextIntent(notifyIntent)
|
||||||
@ -324,11 +325,10 @@ public class AppUpdateStatusManager {
|
|||||||
private PendingIntent getAppErrorIntent(AppUpdateStatus entry) {
|
private PendingIntent getAppErrorIntent(AppUpdateStatus entry) {
|
||||||
String title = String.format(context.getString(R.string.install_error_notify_title), entry.app.name);
|
String title = String.format(context.getString(R.string.install_error_notify_title), entry.app.name);
|
||||||
|
|
||||||
Intent errorDialogIntent = new Intent(context, ErrorDialogActivity.class);
|
Intent errorDialogIntent = new Intent(context, ErrorDialogActivity.class)
|
||||||
errorDialogIntent.putExtra(
|
.putExtra(ErrorDialogActivity.EXTRA_TITLE, title)
|
||||||
ErrorDialogActivity.EXTRA_TITLE, title);
|
.putExtra(ErrorDialogActivity.EXTRA_MESSAGE, entry.errorText);
|
||||||
errorDialogIntent.putExtra(
|
|
||||||
ErrorDialogActivity.EXTRA_MESSAGE, entry.errorText);
|
|
||||||
return PendingIntent.getActivity(
|
return PendingIntent.getActivity(
|
||||||
context,
|
context,
|
||||||
0,
|
0,
|
||||||
|
@ -385,6 +385,7 @@ class NotificationHelper {
|
|||||||
text.append(", ");
|
text.append(", ");
|
||||||
text.append(app.name);
|
text.append(app.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updates.size() > MAX_UPDATES_TO_SHOW) {
|
if (updates.size() > MAX_UPDATES_TO_SHOW) {
|
||||||
int diff = updates.size() - MAX_UPDATES_TO_SHOW;
|
int diff = updates.size() - MAX_UPDATES_TO_SHOW;
|
||||||
inboxStyle.setSummaryText(context.getString(R.string.notification_summary_more, diff));
|
inboxStyle.setSummaryText(context.getString(R.string.notification_summary_more, diff));
|
||||||
@ -404,10 +405,12 @@ class NotificationHelper {
|
|||||||
.setLocalOnly(true)
|
.setLocalOnly(true)
|
||||||
.setVisibility(NotificationCompat.VISIBILITY_SECRET)
|
.setVisibility(NotificationCompat.VISIBILITY_SECRET)
|
||||||
.setStyle(inboxStyle);
|
.setStyle(inboxStyle);
|
||||||
|
|
||||||
if (useStackedNotifications()) {
|
if (useStackedNotifications()) {
|
||||||
builder.setGroup(GROUP_UPDATES)
|
builder.setGroup(GROUP_UPDATES)
|
||||||
.setGroupSummary(true);
|
.setGroupSummary(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Intent intentDeleted = new Intent(BROADCAST_NOTIFICATIONS_ALL_UPDATES_CLEARED);
|
Intent intentDeleted = new Intent(BROADCAST_NOTIFICATIONS_ALL_UPDATES_CLEARED);
|
||||||
PendingIntent piDeleted = PendingIntent.getBroadcast(context, 0, intentDeleted, 0);
|
PendingIntent piDeleted = PendingIntent.getBroadcast(context, 0, intentDeleted, 0);
|
||||||
builder.setDeleteIntent(piDeleted);
|
builder.setDeleteIntent(piDeleted);
|
||||||
@ -512,7 +515,9 @@ class NotificationHelper {
|
|||||||
} else {
|
} else {
|
||||||
// Load it for later!
|
// Load it for later!
|
||||||
ImageLoader.getInstance().loadImage(entry.app.iconUrl, new ImageSize(largeIconSize.x, largeIconSize.y), displayImageOptions, new ImageLoadingListener() {
|
ImageLoader.getInstance().loadImage(entry.app.iconUrl, new ImageSize(largeIconSize.x, largeIconSize.y), displayImageOptions, new ImageLoadingListener() {
|
||||||
|
|
||||||
AppUpdateStatusManager.AppUpdateStatus entry;
|
AppUpdateStatusManager.AppUpdateStatus entry;
|
||||||
|
|
||||||
ImageLoadingListener init(AppUpdateStatusManager.AppUpdateStatus entry) {
|
ImageLoadingListener init(AppUpdateStatusManager.AppUpdateStatus entry) {
|
||||||
this.entry = entry;
|
this.entry = entry;
|
||||||
return this;
|
return this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user