Welcome to mirror list, hosted at ThFree Co, Russian Federation.

NotificationActionReceiverDownloadWebPage.java « helper « owncloudnewsreader « luhmer « de « java « main « src « News-Android-App - github.com/nextcloud/news-android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3a6ad407cccb61f36c6a083f37e1bf3f522cebe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package de.luhmer.owncloudnewsreader.helper;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import org.greenrobot.eventbus.EventBus;

import de.luhmer.owncloudnewsreader.services.events.StopWebArchiveDownloadEvent;

import static de.luhmer.owncloudnewsreader.Constants.NOTIFICATION_ACTION_STOP_STRING;

public class NotificationActionReceiverDownloadWebPage extends BroadcastReceiver {
    private static final String TAG = NotificationActionReceiver.class.getCanonicalName();

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (NOTIFICATION_ACTION_STOP_STRING.equals(action)) {
            Log.d(TAG, "NOTIFICATION_ACTION_STOP_STRING");
            EventBus.getDefault().post(new StopWebArchiveDownloadEvent());
        } else {
            Log.d(TAG, action);
        }
    }
}