Browse Source

Some code cleanup

Sebastián Katzer 12 năm trước cách đây
mục cha
commit
851697fb52
1 tập tin đã thay đổi với 6 bổ sung6 xóa
  1. 6 6
      src/android/LocalNotificationReceiver.java

+ 6 - 6
src/android/LocalNotificationReceiver.java

@@ -41,8 +41,8 @@ public class LocalNotificationReceiver extends BroadcastReceiver {
 
 	@Override
 	public void onReceive (Context context, Intent intent) {
-		LocalNotificationOptions options    = null;
-		Bundle bundle                       = intent.getExtras();
+		LocalNotificationOptions options = null;
+		Bundle bundle                    = intent.getExtras();
 		JSONObject args;
 
 		try {
@@ -137,8 +137,8 @@ public class LocalNotificationReceiver extends BroadcastReceiver {
 	@SuppressWarnings("deprecation")
 	@SuppressLint("NewApi")
 	private void showNotification (Builder notification) {
-		NotificationManager notificationMgr = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
-		int id                              = 0;
+		NotificationManager mgr = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
+		int id                  = 0;
 
 		try {
 			id = Integer.parseInt(options.getId());
@@ -146,10 +146,10 @@ public class LocalNotificationReceiver extends BroadcastReceiver {
 
         if (Build.VERSION.SDK_INT<16) {
             // build notification for HoneyComb to ICS
-            notificationMgr.notify(id, notification.getNotification());
+        	mgr.notify(id, notification.getNotification());
         } else if (Build.VERSION.SDK_INT>15) {
             // Notification for Jellybean and above
-        	notificationMgr.notify(id, notification.build());
+        	mgr.notify(id, notification.build());
         }
 	}