diff --git a/app/src/main/java/com/hippo/ehviewer/shortcuts/ShortcutsActivity.java b/app/src/main/java/com/hippo/ehviewer/shortcuts/ShortcutsActivity.java index 796629592..c3b11c8f8 100644 --- a/app/src/main/java/com/hippo/ehviewer/shortcuts/ShortcutsActivity.java +++ b/app/src/main/java/com/hippo/ehviewer/shortcuts/ShortcutsActivity.java @@ -30,17 +30,14 @@ public class ShortcutsActivity extends Activity{ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - String action = null; - action = getIntent().getAction(); - if (!action.isEmpty()){ - 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 = 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); } finish(); }