1
0
Fork 0
mirror of https://github.com/MatomoCamp/matomocamp-companion-android.git synced 2024-09-19 16:13:46 +02:00

Converted forgotten integer reference to Event id to long.

This commit is contained in:
Christophe Beyls 2014-01-23 23:35:04 +01:00
parent f72fd5966f
commit 4db8552e48
3 changed files with 6 additions and 6 deletions

View file

@ -84,9 +84,9 @@ public class EventDetailsActivity extends ActionBarActivity implements LoaderCal
private static class EventLoader extends LocalCacheLoader<Event> {
private final int eventId;
private final long eventId;
public EventLoader(Context context, int eventId) {
public EventLoader(Context context, long eventId) {
super(context);
this.eventId = eventId;
}
@ -99,7 +99,7 @@ public class EventDetailsActivity extends ActionBarActivity implements LoaderCal
@Override
public Loader<Event> onCreateLoader(int id, Bundle args) {
return new EventLoader(this, Integer.parseInt(getIntent().getDataString()));
return new EventLoader(this, Long.parseLong(getIntent().getDataString()));
}
@Override

View file

@ -381,7 +381,7 @@ public class DatabaseManager {
/**
* Returns the event with the specified id.
*/
public Event getEvent(int id) {
public Event getEvent(long id) {
String[] selectionArgs = new String[] { String.valueOf(id) };
Cursor cursor = helper
.getReadableDatabase()

View file

@ -119,7 +119,7 @@ public class AlarmIntentService extends IntentService {
}
} else if (AlarmReceiver.ACTION_NOTIFY_EVENT.equals(action)) {
int eventId = Integer.parseInt(intent.getDataString());
long eventId = Long.parseLong(intent.getDataString());
Event event = DatabaseManager.getInstance().getEvent(eventId);
if (event != null) {
@ -149,7 +149,7 @@ public class AlarmIntentService extends IntentService {
Notification notification = new NotificationCompat.Builder(this).setSmallIcon(R.drawable.ic_launcher).setWhen(event.getStartTime().getTime())
.setContentTitle(event.getTitle()).setContentText(contentText).setContentInfo(event.getRoomName()).setContentIntent(eventPendingIntent)
.setAutoCancel(true).setDefaults(defaultFlags).setPriority(NotificationCompat.PRIORITY_DEFAULT).build();
notificationManager.notify(eventId, notification);
notificationManager.notify((int) eventId, notification);
}
AlarmReceiver.completeWakefulIntent(intent);