mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Clarify receivers
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
c1c3775752
commit
8dfdf92118
1 changed files with 4 additions and 2 deletions
|
@ -41,7 +41,7 @@ public class ReceiversHelper {
|
|||
BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (!Device.getNetworkType(context).equals(JobRequest.NetworkType.ANY)) {
|
||||
if (Device.getNetworkType(context).equals(JobRequest.NetworkType.UNMETERED)) {
|
||||
FilesSyncHelper.restartJobsIfNeeded();
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,9 @@ public class ReceiversHelper {
|
|||
BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
FilesSyncHelper.restartJobsIfNeeded();
|
||||
if (intent.getAction().equals(Intent.ACTION_POWER_CONNECTED)) {
|
||||
FilesSyncHelper.restartJobsIfNeeded();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue