Commit 86b87261 authored by Tiago Cunha's avatar Tiago Cunha

Quality tools fixes

parent ec6255f5
......@@ -40,6 +40,8 @@ public class PushNotificationHandler implements PushConstants {
private static SparseArrayCompat<ArrayList<String>> messageMap = new SparseArrayCompat<>();
private Random random = new Random();
public void setNotification(int notId, String message) {
ArrayList<String> messageList = messageMap.get(notId);
if (messageList == null) {
......@@ -108,7 +110,7 @@ public class PushNotificationHandler implements PushConstants {
notificationIntent.putExtra(ROOM_ID, roomId);
notificationIntent.putExtra(NOT_ID, notId);
int requestCode = new Random().nextInt();
int requestCode = random.nextInt();
PendingIntent contentIntent = PendingIntent
.getActivity(context, requestCode, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
......
......@@ -137,11 +137,11 @@ public class GCMIntentService extends GcmListenerService implements PushConstant
*/
private Bundle normalizeExtras(Context context, Bundle extras) {
Log.d(LOG_TAG, "normalize extras");
Iterator<String> it = extras.keySet().iterator();
Iterator<String> keyIterator = extras.keySet().iterator();
Bundle newExtras = new Bundle();
while (it.hasNext()) {
String key = it.next();
while (keyIterator.hasNext()) {
String key = keyIterator.next();
Log.d(LOG_TAG, "key = " + key);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment