Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
86b87261
Commit
86b87261
authored
Jan 02, 2017
by
Tiago Cunha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quality tools fixes
parent
ec6255f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
PushNotificationHandler.java
...ava/chat/rocket/android/push/PushNotificationHandler.java
+3
-1
GCMIntentService.java
...n/java/chat/rocket/android/push/gcm/GCMIntentService.java
+3
-3
No files found.
app/src/main/java/chat/rocket/android/push/PushNotificationHandler.java
View file @
86b87261
...
...
@@ -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
);
...
...
app/src/main/java/chat/rocket/android/push/gcm/GCMIntentService.java
View file @
86b87261
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment