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

Commit 124782ad authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Implement Job.getWarningNotification()" into main

parents c89bda91 8d26fdfc
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -97,11 +97,6 @@ final class DeleteJob extends ResolvedResourcesJob {
                R.plurals.delete_error_notification_title, R.drawable.ic_menu_delete);
    }

    @Override
    Notification getWarningNotification() {
        throw new UnsupportedOperationException();
    }

    private String getProgressMessage() {
        switch (getState()) {
            case Job.STATE_SET_UP:
+4 −1
Original line number Diff line number Diff line
@@ -188,7 +188,10 @@ abstract public class Job implements Runnable {
    abstract Notification getProgressNotification();
    abstract Notification getFailureNotification();

    abstract Notification getWarningNotification();
    /** Must be implemented if hasWarnings() can return true. */
    Notification getWarningNotification() {
        throw new UnsupportedOperationException();
    }

    abstract JobProgress getJobProgress();

+0 −5
Original line number Diff line number Diff line
@@ -92,11 +92,6 @@ public class TestJob extends Job {
                R.plurals.copy_error_notification_title, R.drawable.ic_menu_copy);
    }

    @Override
    Notification getWarningNotification() {
        throw new UnsupportedOperationException();
    }

    JobProgress getJobProgress() {
        return new JobProgress(id, operationType, getState(), "test job", false);
    }