Skip to content

Commit

Permalink
update shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
onlymash authored and seven332 committed Mar 29, 2018
1 parent c5d5624 commit 00485ef
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ public class ShortcutsActivity extends Activity{
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

String action = getIntent().getAction();
Intent intent = new Intent(this, DownloadService.class);
if (action.equals(DownloadService.ACTION_START_ALL)){
intent.setAction(DownloadService.ACTION_START_ALL);
startService(intent);
} else if (action.equals(DownloadService.ACTION_STOP_ALL)){
intent.setAction(DownloadService.ACTION_STOP_ALL);
startService(intent);
String action = null;
Intent intent = getIntent();
if (intent != null){
action = intent.getAction();
if (action != null){
startService(new Intent(this, DownloadService.class).setAction(action));
}
}
finish();
}
Expand Down

0 comments on commit 00485ef

Please sign in to comment.