Skip to content

Commit

Permalink
Set type start Server
Browse files Browse the repository at this point in the history
  • Loading branch information
dvjdjvu committed Feb 16, 2023
1 parent f5f6e7c commit 6c14c1c
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,26 @@ public class PythonService extends Service implements Runnable {
private Intent startIntent = null;

private boolean autoRestartService = false;
private int start = START_NOT_STICKY;

public void setAutoRestartService(boolean restart) {
autoRestartService = restart;
}

public void setTypeStartSticky() {
start = START_STICKY;
}

public void setTypeStartNotSticky() {
start = START_NOT_STICKY;
}

public void setTypeStartRedeliverIntent() {
start = START_REDELIVER_INTENT;
}

public int startType() {
return START_NOT_STICKY;
return start;
}

@Override
Expand Down

0 comments on commit 6c14c1c

Please sign in to comment.