Get rid of unnecessary indentations
This commit is contained in:
		
							parent
							
								
									96f358d94c
								
							
						
					
					
						commit
						4b32f92777
					
				| @ -262,38 +262,36 @@ public class UpdateService extends IntentService implements ProgressListener { | |||||||
| 
 | 
 | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             if (success && changes && notify) { |             if (success && changes && notify && (newUpdates > prevUpdates)) { | ||||||
|                 Log.d("FDroid", "Notifying updates. Apps before:" + prevUpdates |                 Log.d("FDroid", "Notifying updates. Apps before:" + prevUpdates | ||||||
|                         + ", apps after: " + newUpdates); |                         + ", apps after: " + newUpdates); | ||||||
|                 if (newUpdates > prevUpdates) { |                 NotificationCompat.Builder mBuilder = new NotificationCompat.Builder( | ||||||
|                     NotificationCompat.Builder mBuilder = new NotificationCompat.Builder( |                         this) | ||||||
|                             this) |                         .setSmallIcon(R.drawable.icon) | ||||||
|                             .setSmallIcon(R.drawable.icon) |                         .setLargeIcon( | ||||||
|                             .setLargeIcon( |                                 BitmapFactory.decodeResource( | ||||||
|                                     BitmapFactory.decodeResource( |                                         getResources(), R.drawable.icon)) | ||||||
|                                             getResources(), R.drawable.icon)) |                         .setAutoCancel(true) | ||||||
|                             .setAutoCancel(true) |                         .setContentTitle( | ||||||
|                             .setContentTitle( |                                 getString(R.string.fdroid_updates_available)); | ||||||
|                                     getString(R.string.fdroid_updates_available)); |                 Intent notifyIntent = new Intent(this, FDroid.class) | ||||||
|                     Intent notifyIntent = new Intent(this, FDroid.class) |                         .putExtra(FDroid.EXTRA_TAB_UPDATE, true); | ||||||
|                             .putExtra(FDroid.EXTRA_TAB_UPDATE, true); |                 if (newUpdates > 1) { | ||||||
|                     if (newUpdates > 1) { |                     mBuilder.setContentText(getString( | ||||||
|                         mBuilder.setContentText(getString( |                             R.string.many_updates_available, newUpdates)); | ||||||
|                                 R.string.many_updates_available, newUpdates)); |  | ||||||
| 
 | 
 | ||||||
|                     } else { |                 } else { | ||||||
|                         mBuilder.setContentText(getString(R.string.one_update_available)); |                     mBuilder.setContentText(getString(R.string.one_update_available)); | ||||||
|                     } |  | ||||||
|                     TaskStackBuilder stackBuilder = TaskStackBuilder |  | ||||||
|                             .create(this).addParentStack(FDroid.class) |  | ||||||
|                             .addNextIntent(notifyIntent); |  | ||||||
|                     PendingIntent pendingIntent = stackBuilder |  | ||||||
|                             .getPendingIntent(0, |  | ||||||
|                                     PendingIntent.FLAG_UPDATE_CURRENT); |  | ||||||
|                     mBuilder.setContentIntent(pendingIntent); |  | ||||||
|                     NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); |  | ||||||
|                     mNotificationManager.notify(1, mBuilder.build()); |  | ||||||
|                 } |                 } | ||||||
|  |                 TaskStackBuilder stackBuilder = TaskStackBuilder | ||||||
|  |                         .create(this).addParentStack(FDroid.class) | ||||||
|  |                         .addNextIntent(notifyIntent); | ||||||
|  |                 PendingIntent pendingIntent = stackBuilder | ||||||
|  |                         .getPendingIntent(0, | ||||||
|  |                                 PendingIntent.FLAG_UPDATE_CURRENT); | ||||||
|  |                 mBuilder.setContentIntent(pendingIntent); | ||||||
|  |                 NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); | ||||||
|  |                 mNotificationManager.notify(1, mBuilder.build()); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             if (!success) { |             if (!success) { | ||||||
| @ -302,9 +300,6 @@ public class UpdateService extends IntentService implements ProgressListener { | |||||||
|                 sendStatus(STATUS_ERROR, errmsg); |                 sendStatus(STATUS_ERROR, errmsg); | ||||||
|             } else { |             } else { | ||||||
|                 sendStatus(STATUS_COMPLETE); |                 sendStatus(STATUS_COMPLETE); | ||||||
|             } |  | ||||||
| 
 |  | ||||||
|             if (success) { |  | ||||||
|                 Editor e = prefs.edit(); |                 Editor e = prefs.edit(); | ||||||
|                 e.putLong("lastUpdateCheck", System.currentTimeMillis()); |                 e.putLong("lastUpdateCheck", System.currentTimeMillis()); | ||||||
|                 e.commit(); |                 e.commit(); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Daniel Martí
						Daniel Martí