Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 389ee9c4 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

Remove ScannerJob.java

- Remove foundation.e.drive.job.ScannerJob.java
- Remove entry in AndroidManifest.xml about Service for ScannerJob
- Remove job package in foundation.e.drive
parent f79e5bb6
Loading
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -61,9 +61,6 @@ http://www.gnu.org/licenses/gpl.html
                <action android:name="drive.services.ResetService" />
            </intent-filter>
        </service>
        <service
            android:name=".jobs.ScannerJob"
            android:permission="android.permission.BIND_JOB_SERVICE" />
        <service
            android:name=".services.ObserverService"
            android:enabled="true" />
+0 −47
Original line number Diff line number Diff line
/*
 * Copyright © Vincent Bourgmayer (/e/ foundation).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 */

package foundation.e.drive.jobs;

import android.app.job.JobParameters;
import android.app.job.JobService;
import android.content.Intent;
import android.util.Log;

import foundation.e.drive.services.ObserverService;
import foundation.e.drive.utils.CommonUtils;

/**
 * @author Vincent Bourgmayer
 */
public class ScannerJob extends JobService {
    final private String TAG = ScannerJob.class.getSimpleName(); //Tag for log

    @Override
    public boolean onStartJob(JobParameters params) {
        Log.i(TAG, "onStartJob()");

        Intent observerServiceIntent = new Intent(this, ObserverService.class);
        this.startService(observerServiceIntent);
        jobFinished(params, false);
        return true;
    }

    /**
     *
     * @param params
     * @return default return... ?
     */
    @Override
    public boolean onStopJob(JobParameters params) {
        Log.i(TAG, "onStopJob");
        Intent observerServiceIntent = new Intent(this, ObserverService.class);
        this.stopService(observerServiceIntent);
        return false;
    }
}