File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
AndroidExecLibrary/src/main/java/com/excellence/exec Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,10 @@ public void onSuccess(String message) {
136136
137137 void deploy () {
138138 try {
139+ // only wait task can deploy
140+ if (mStatus != STATUS_WAITING ) {
141+ return ;
142+ }
139143 mStatus = STATUS_RUNNING ;
140144 Observable .create (new ObservableOnSubscribe <String >() {
141145 @ Override
@@ -170,6 +174,10 @@ public void subscribe(ObservableEmitter<String> emitter) throws Exception {
170174 }
171175 }
172176
177+ private boolean isRunning () {
178+ return mStatus == STATUS_RUNNING ;
179+ }
180+
173181 private void cancel () {
174182 mStatus = STATUS_INTERRUPT ;
175183 if (mProcess != null ) {
@@ -178,10 +186,6 @@ private void cancel() {
178186 mTaskQueue .remove (this );
179187 }
180188
181- private boolean isRunning () {
182- return mStatus == STATUS_RUNNING ;
183- }
184-
185189 public void discard () {
186190 mStatus = STATUS_INTERRUPT ;
187191 if (mProcess != null ) {
You can’t perform that action at this time.
0 commit comments